D
Dave A
Hi, I have the following function that I need to call from C#.
HRESULT CamPreviewGetBGR16(HANDLE hCamera,LPBYTE pBuffer);
but I am stuggling with the LPBYTE pBuffer. I have decalred it as
[DllImport("mobilecamapi.dll",EntryPoint="CamPreviewGetBGR16")]
public static extern int CamPreviewGetBGR16(uint hCamera, byte[] pBuffer);
and have called it via:
byte[] buffer = new byte[width * height * 2];
result = CamPreviewGetBGR16(cameraHandle, buffer);
It is returning with a missing method exception. I think the 'byte[]
pBuffer' in the API definition needs to be a 'uint pBuffer' but then how do
I convert the 'byte[] buffer' in the calling code to be a uint? (I am a bit
of a novice at all of this Interop stuff)
Any suggestions are greatly appreaciated.
Thanks
Dave A
HRESULT CamPreviewGetBGR16(HANDLE hCamera,LPBYTE pBuffer);
but I am stuggling with the LPBYTE pBuffer. I have decalred it as
[DllImport("mobilecamapi.dll",EntryPoint="CamPreviewGetBGR16")]
public static extern int CamPreviewGetBGR16(uint hCamera, byte[] pBuffer);
and have called it via:
byte[] buffer = new byte[width * height * 2];
result = CamPreviewGetBGR16(cameraHandle, buffer);
It is returning with a missing method exception. I think the 'byte[]
pBuffer' in the API definition needs to be a 'uint pBuffer' but then how do
I convert the 'byte[] buffer' in the calling code to be a uint? (I am a bit
of a novice at all of this Interop stuff)
Any suggestions are greatly appreaciated.
Thanks
Dave A