Re: passing BYTE array pointer in vb.net
From: Paul G. Tobey [eMVP] (ptobey_no_spam_at_instrument_no_spam.com)
Date: 02/04/04
- Next message: Neville Lang: "Re: Copy from device to desktop?"
- Previous message: Dante: "passing BYTE array pointer in vb.net"
- In reply to: Dante: "passing BYTE array pointer in vb.net"
- Next in thread: Alex Feinman [MVP]: "Re: passing BYTE array pointer in vb.net"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 4 Feb 2004 15:34:18 -0700
Are you sure that the byte array you are passing is the size you've
indicated to the function? That's the only thing I see there.
Paul T.
"Dante" <anonymous@discussions.microsoft.com> wrote in message
news:365F3B0A-DF1F-4A4B-B676-498D6652F346@microsoft.com...
> I need to call a function from within VB.net to a function in a dll writen
in c++ that looks like this in the c++ driver:
> extern "C" BOOL USBDownloadPictureData(BYTE *buffer, DWORD Size)
> {
> ...
> }
>
> in VB.net, my dll import looks like this:
> <DllImport("camera.dll")> _
> Function USBDownloadPictureData(ByRef buffer As Byte(), ByVal Size As
Int32) As Int32
> End Function
>
> everytime i call this from VB.net, i get a native exception error. I have
other functions from the same dll that i call with no problem that don't
have a BYTE array pointer in it's arguments, So the problem is passing the
pointer from VB.net to unmanaged c++. Anyone know how to do this?
>
>
>
>
>
- Next message: Neville Lang: "Re: Copy from device to desktop?"
- Previous message: Dante: "passing BYTE array pointer in vb.net"
- In reply to: Dante: "passing BYTE array pointer in vb.net"
- Next in thread: Alex Feinman [MVP]: "Re: passing BYTE array pointer in vb.net"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|