J
Joey Wu
Dear All.
As title. How can I complete this?
Cause I have to use OpenNETCF.IO.StreamInterfaceDriver.DeviceIOControl to
get a CCD capture on my device.
The document show that I need pass some infos into driver with a structure.
Please give me a hand and thanks a lot~~!!
I have C++ sample code here
====================================
struct video_mmap
{
DWORD frame; //Reserved, no use here
WORD height,width; //specify the height and width to capture
DWORD format; //RGB15 = 6 //rgb16 = 3
};
typedef struct Capture {
BOOL Rflag, Wflag; //Reserved, not used.
BYTE ioctlBUF[VBUFSIZE]; //capture buffer passed to driver, returned
with captured image data
} BTVCapture;
struct video_mmap vm; //contain parameters and pass to driver
BTVCapture CAP; //capture buffer
DeviceIoControl(hFile, VIDIOCSYNC, &vm, sizeof(vm), CAP.ioctlBUF,
sizeof(CAP.ioctlBUF), NULL, NULL);
// description: generate a request to bt878 to capture a image and save the
image in the buffer "CAP.ioctlBUF"
// with buffer size "sizeof(CAP.ioctlBUF)". the maximan size is (512*480*2)
bytes. vm structure
// conatins informations of capture height, width, and color format.
====================================
As title. How can I complete this?
Cause I have to use OpenNETCF.IO.StreamInterfaceDriver.DeviceIOControl to
get a CCD capture on my device.
The document show that I need pass some infos into driver with a structure.
Please give me a hand and thanks a lot~~!!
I have C++ sample code here
====================================
struct video_mmap
{
DWORD frame; //Reserved, no use here
WORD height,width; //specify the height and width to capture
DWORD format; //RGB15 = 6 //rgb16 = 3
};
typedef struct Capture {
BOOL Rflag, Wflag; //Reserved, not used.
BYTE ioctlBUF[VBUFSIZE]; //capture buffer passed to driver, returned
with captured image data
} BTVCapture;
struct video_mmap vm; //contain parameters and pass to driver
BTVCapture CAP; //capture buffer
DeviceIoControl(hFile, VIDIOCSYNC, &vm, sizeof(vm), CAP.ioctlBUF,
sizeof(CAP.ioctlBUF), NULL, NULL);
// description: generate a request to bt878 to capture a image and save the
image in the buffer "CAP.ioctlBUF"
// with buffer size "sizeof(CAP.ioctlBUF)". the maximan size is (512*480*2)
bytes. vm structure
// conatins informations of capture height, width, and color format.
====================================