To all gurus,
I am currently converting some of C++ codes to VB.net
The C++ Codes is as follows :
=============== == C++ CODE =============== ===
typedef struct _tagBBCameraPar ameter
{
unsigned int preview_width;
unsigned int preview_height;
unsigned int preview_x;
unsigned int preview_y;
unsigned int preview_format;
unsigned int preview_zoom;
const TCHAR* capture_file_na me;
unsigned int contrast;
unsigned int saturation;
unsigned int brightness;
} BBCameraParamet er;
typedef LPVOID HBBCAMERA;
BBAPI DWORD WINAPI BBCameraPreview Start(HBBCAMERA ,
BBCameraParamet er*);
BBAPI DWORD WINAPI BBCameraPreview Stop(HBBCAMERA) ;
=============== == END C++ CODE =============== ===
I managed to convert most of the codes to VB.Net but when I try to fun
BBCameraPreview Start function, it gives error.
'============== ===Partial VB.Net Code
Public Shared Function BBCameraPreview Start(ByVal HBBCamera As IntPtr,
ByRef BBParam1 As BBCameraParamet er) As Integer
End Function
Public Shared Function BBCameraPreview Stop(ByVal HBBCamera As IntPtr)
As Integer
End Function
'=========== END OF PARTIAL VB.NET CODES
This is how i pass the parameters;
Dim BBParam as BBCameraParamet er '// already declared but not shown
here
Dim HBBCamera as IntPtr '//Handle
'I have no problems getting handle but once i set the parameters for
BBParam and pass as follows, i get error (not much help from the
message).
BBCameraPreview Start(HBBCAMERA , BBParam)
How do I call function BBCameraPreview Start correctly? Did i do it
correctly?
Please advices.
Thanks
I am currently converting some of C++ codes to VB.net
The C++ Codes is as follows :
=============== == C++ CODE =============== ===
typedef struct _tagBBCameraPar ameter
{
unsigned int preview_width;
unsigned int preview_height;
unsigned int preview_x;
unsigned int preview_y;
unsigned int preview_format;
unsigned int preview_zoom;
const TCHAR* capture_file_na me;
unsigned int contrast;
unsigned int saturation;
unsigned int brightness;
} BBCameraParamet er;
typedef LPVOID HBBCAMERA;
BBAPI DWORD WINAPI BBCameraPreview Start(HBBCAMERA ,
BBCameraParamet er*);
BBAPI DWORD WINAPI BBCameraPreview Stop(HBBCAMERA) ;
=============== == END C++ CODE =============== ===
I managed to convert most of the codes to VB.Net but when I try to fun
BBCameraPreview Start function, it gives error.
'============== ===Partial VB.Net Code
Public Shared Function BBCameraPreview Start(ByVal HBBCamera As IntPtr,
ByRef BBParam1 As BBCameraParamet er) As Integer
End Function
Public Shared Function BBCameraPreview Stop(ByVal HBBCamera As IntPtr)
As Integer
End Function
'=========== END OF PARTIAL VB.NET CODES
This is how i pass the parameters;
Dim BBParam as BBCameraParamet er '// already declared but not shown
here
Dim HBBCamera as IntPtr '//Handle
'I have no problems getting handle but once i set the parameters for
BBParam and pass as follows, i get error (not much help from the
message).
BBCameraPreview Start(HBBCAMERA , BBParam)
How do I call function BBCameraPreview Start correctly? Did i do it
correctly?
Please advices.
Thanks
Comment