void **ppImageBuffer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Experts,

I am trying to use a C++ dll from my VB .NET program, but I don't know how
to handle things like void **ppImageBuffer. Please see the following and help
me out.

Thanks.

//C++ dll
int WINAPI CameraSetValue(short nParameter, void *pValue);

int WINAPI CameraGetImages(int nNumImages, void **ppImageBuffer);

'VB .NET
<DllImport("Camera.dll")>
Public shared Function SpotSetValue(ByVal nParameter As Short,
????What_to_put_here????) As Integer
End Function

<DllImport("Camera.dll")>
Public shared Function CameraGetImages(int nNumImages,
????What_to_put_here????) As Integer
End Function
 
//C++ dll
int WINAPI CameraSetValue(short nParameter, void *pValue);

int WINAPI CameraGetImages(int nNumImages, void **ppImageBuffer);

'VB .NET
<DllImport("Camera.dll")>
Public shared Function SpotSetValue(ByVal nParameter As Short,
????What_to_put_here????) As Integer
End Function

<DllImport("Camera.dll")>
Public shared Function CameraGetImages(int nNumImages,
????What_to_put_here????) As Integer
End Function

In the most general form

Public shared Function SpotSetValue(ByVal nParameter As Short,
ByVal pValue As IntPtr) As Integer

and

Public shared Function CameraGetImages(int nNumImages, ByRef
ppImageBuffer As IntPtr) As Integer

But if you acually know what tyoe of data you're going to pass in and
get back, there's a good chance you can save some work by using a more
specific parameter type.


Mattias
 
Back
Top