I have to call a function. This is from the SDK:
INT is_GetActSeqBuf (HIDS hf, INT* pnNum, char** ppcMem, char** ppcMemLast);
I have demo C# code that works. Here is the prototype:
[DllImport(DRIVER_DLL_NAME ,EntryPoint="is_GetActSeqBuf")]
private static extern int is_GetActSeqBuf (int hCam, ref int pnNum, ref IntPtr ppcMem, ref IntPtr ppcMemLast);
And this is the way it is used in the C# code.
IntPtr pMem = new IntPtr();
IntPtr pLast = new IntPtr();
is_GetActSeqBuf(hCam, pNum, pMem, pLast)
The C# code works. I used it to attempt a conversion to VB.NET by using the
http://authors.aspalliance.com/aldot...translate.aspx translation tool
and this is what it looks like:
Declare Function is_GetActSeqBuf Lib "ueye_api.dll" Alias "is_GetActSeqBuf" (ByVal hCam As Integer, ByRef pnNum As Integer, ByRef ppcMem As IntPtr, ByRef ppcMemLast As IntPtr) As Integer
Dim pMem As New IntPtr()
Dim pLast As New IntPtr()
is_GetActSeqBuf(hCam, pNum, pMem, pLast)
It doesn't throw an exception, it just doesn't give a pointer back for pMem and pLast. VB.NET takes the IntPtr() as acceptable but indicates it doesn't support it for API's that return unsafe types.
I've been able to get other calls to the driver to work up to this point. Any suggestions?
Thanks.