I have tested out your code and it seems to be fine, however the return value from WMI for this call is an I4 value, which is a signed 32bit integer. As far as I can tell, mIRC is correctly using the value that the WMI is passing back. It appears that WMI should be returning the value as an I8 or as text but it isn't.