BOOL CGPIODLLApp::CameraOpen(int width, int height)
{
//打开驱动
Camerahl = CreateFile (_T("CIS1:"), GENERIC_WRITE|GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
if(Camerahl==INVALID_HANDLE_VALUE )
{
return FALSE;
}
//打开摄像头
DeviceIoControl(Camerahl,CAM_IOCTL_MOVIE_START,NULL,0,NULL,0,NULL,NULL);
DeviceIoControl(Camerahl,IOCTL_CAM_SETGAMMA,NULL,0,NULL,0,NULL,NULL);
unsigned char i,pOut;
unsigned char inbuffer320240[][2]={
{ 0xfc, 0x00},
{ 0x02, 0x03}, // 1600*1200//00 02
{ 0xfc, 0x01},
{ 0x02, 0x77}
};// 03 OK 07 1OK;
unsigned char inbuffer640480[][2]={
{ 0xfc, 0x00},
{ 0x02, 0x02}, // 1600*1200//00 02
{ 0xfc, 0x01},
{ 0x02, 0x67}
};// 03 OK 07 1OK;
unsigned char inbuffer12801024[][2]={
{ 0xfc, 0x00},
{ 0x02, 0x01}, // 1600*1200//00 02
{ 0xfc, 0x01},
{ 0x02, 0x57}
};// 03 OK 07 1OK;
if( width==320 && height==240)
{
for(i=0;i