467,881 Members | 1,178 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,881 developers. It's quick & easy.

Passing Unsigned values by reference for COM objects

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
  • viewed: 1290
Share:
1 Reply
Expert 8TB
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.

Similar topics

3 posts views Thread by domeceo | last post: by
2 posts views Thread by Morgan | last post: by
25 posts views Thread by Stuart Hilditch | last post: by
11 posts views Thread by John Pass | last post: by
11 posts views Thread by Bob Yang | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.