By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,646 Members | 2,098 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,646 IT Pros & Developers. It's quick & easy.

Passing Unsigned values by reference for COM objects

P: 2
So I have a COM library that uses 3 parameters which take in Uints. These ints are in C++ so it should be an unsigned Long in VB 6.0 but there is no ULONG in VB 6.0. How do I call the function and still get it to compile?


example code

myCOMObject.WaitForData(ID, Size, DataString, Waitresponse, 1)

ID, Size, and Wait Response are all supposed to be ULONGs. What should I use instead?
Nov 15 '06 #1
Share this Question
Share on Google+
1 Reply


Expert 5K+
P: 8,434
So I have a COM library that uses 3 parameters which take in Uints. These ints are in C++ so it should be an unsigned Long in VB 6.0 but there is no ULONG in VB 6.0. How do I call the function and still get it to compile?


example code

myCOMObject.WaitForData(ID, Size, DataString, Waitresponse, 1)

ID, Size, and Wait Response are all supposed to be ULONGs. What should I use instead?
Have a look at http://support.microsoft.com/kb/q189323/
Among other things it mentions...
UnsignedToLong
The function takes a Double containing a value in the range of an unsigned Long and returns a Long that you can pass to an API that requires an unsigned Long.
Nov 15 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.