Code:
%DBT_DEVICEARRIVAL = &H8000 '32768 - Device or piece of media has been inserted and is now available
%DBT_DEVICEARRIVAL_DECIMAL = 32768
Cast these (and all) equates to a 32-bit type here:
Code:
%DBT_DEVICEARRIVAL = &H8000&
%DBT_DEVICEARRIVAL_DECIMAL = 32768&
Five bucks says you are running into compiler defaults treating &h8000 as a 16-bit item and 32768 as a 32-bit item, or vice versa.
Just make 'em all 32-bit by suffixing "&" or "??"
MCM
%DBT_DEVICEARRIVAL = &H8000 '32768 - Device or piece of media has been inserted and is now available
%DBT_DEVICEARRIVAL_DECIMAL = 32768
Cast these (and all) equates to a 32-bit type here:
Code:
%DBT_DEVICEARRIVAL = &H8000&
%DBT_DEVICEARRIVAL_DECIMAL = 32768&
Five bucks says you are running into compiler defaults treating &h8000 as a 16-bit item and 32768 as a 32-bit item, or vice versa.
Just make 'em all 32-bit by suffixing "&" or "??"
MCM
%DBT_DEVICEARRIVAL = &H8000
Integer has range of -32,768 to +32,767
Long has range of -2,147,483,648 to +2,147,483,647
Dword has a range of 0 to 4,294,967,295
But declaring equates technically no matter the value the equates is
-32,768 to +32,767
So the value passed was -32768 and not the expected 32768 and I was only looking for positive values, not the inverse
%DBT_DEVICEARRIVAL = &H8000 '32768
No matter how I declare the value passed, both my equates and the value passed must match in order for me to catch the value passed......
Leave a comment: