I want to use a function in a dll that returns unsigned short*.
How do I declare this function in VB?
Printable View
I want to use a function in a dll that returns unsigned short*.
How do I declare this function in VB?
There are no unsigned types in VB, but you can use the equivalent signed types.
Private Declare Function YourFunc Lib "your.dll" (Params As Types) As Long
There isn't a pointer type in VB either and a function cannot return ByRef. You can either use Long to represent the pointer (and have difficulties to get the actual value) or not return a pointer. Which is probably the better idea anyway.