M
Monk
Hello,
I have a DLL function that I'm trying to call. I've been successful
with the other calls to this DLL, but am hung up on this one.
Here's the function header from the header file. The source is not
available for the DLL, but they did publish the function header.
CP2101_SetVid(
HANDLE cyHandle,
WORD wVid
);
The documentation says that I should pass a 2 byte value at wVid to
this function. Elsewhere it says that this is an unsigned value. I'm
wondering can someone help me with the following 2 questions.
How do I create a 2 byte value in managed code?
What should my DLLImport statement look like once I've done this? Does
this look correct?
Monk
<DllImport("CP2101")> Friend Shared Function CP2101_SetVid(ByVal
Handle As Int32, <MarshalAs(UnmanagedType.U2)> ByVal VendorID As
Int16) As Int32
Any help or pointer to the right spot in the documentation would be
appreciated.
I have a DLL function that I'm trying to call. I've been successful
with the other calls to this DLL, but am hung up on this one.
Here's the function header from the header file. The source is not
available for the DLL, but they did publish the function header.
CP2101_SetVid(
HANDLE cyHandle,
WORD wVid
);
The documentation says that I should pass a 2 byte value at wVid to
this function. Elsewhere it says that this is an unsigned value. I'm
wondering can someone help me with the following 2 questions.
How do I create a 2 byte value in managed code?
What should my DLLImport statement look like once I've done this? Does
this look correct?
Monk
<DllImport("CP2101")> Friend Shared Function CP2101_SetVid(ByVal
Handle As Int32, <MarshalAs(UnmanagedType.U2)> ByVal VendorID As
Int16) As Int32
Any help or pointer to the right spot in the documentation would be
appreciated.