How do I pass an HWND from a VB.net app to a 'C' DLL?

  • Thread starter Thread starter soxmax
  • Start date Start date
S

soxmax

This is driving me crazy. Here is the C interface:

int displayLiveVideo(int width, int height, HWND windowHandle);

I have created a PictureBox in my VB.net application and tried passing
a handle like this:

Dim winHandlePtr As IntPtr
winHandlePtr = PictureBox1.Handle
status = displayLiveVideo(width, height, winHandlePtr)

What am I doing wrong? Any help is appreciated.

Best Regards,
Derek
 
This is driving me crazy. Here is the C interface:
int displayLiveVideo(int width, int height, HWND windowHandle);

I have created a PictureBox in my VB.net application and tried passing
a handle like this:

Dim winHandlePtr As IntPtr
winHandlePtr = PictureBox1.Handle
status = displayLiveVideo(width, height, winHandlePtr)

What am I doing wrong? Any help is appreciated.


Nothing as far as I can see. In what way does it fail?


Mattias
 
Back
Top