26
/* Try to open the device */
Status = OlImgOpenDevice(lpcszAlias, &DevId);
if ( ! OlImgIsOkay( Status ) )
{
mexPrintf("OlImgOpenDevice failed.\n");
return FALSE;
}
CurDevInfo.DevId = DevId;
CurDevInfo.InputSource = 0;
OlImgQueryDeviceCaps(CurDevInfo.DevId,OLC_IMG_DC_DEVICE_NAME,DeviceNa
me,sizeof(STRING));
if ( (!strcmp("DT3153",DeviceName)) ||
(!strcmp("DT3154",DeviceName)) ||
(!strcmp("DT3133",DeviceName)) ||
(!strcmp("DT3132",DeviceName)) ||
(!strcmp("DT3131",DeviceName)) ||
(!strcmp("DT3130",DeviceName)) ||
(!strcmp("DT3120",DeviceName)) )
{
// This is harcoded to avoid having to include
// header files that are related only to the
// color SDK.
#define WRITE 8
#define RGB_32 7
#define RGB_24 6
#define RGB_16 4
#define MONO 1
OLT_APISTATUS (*StorageMode) (OLT_IMG_DEV_ID,unsigned
int,unsigned int,unsigned int*);
HINSTANCE DtColorLib;
unsigned int value = RGB_32;
StorageMode = NULL;
DtColorLib = LoadLibraryEx("DtColorSDK",NULL,0);
StorageMode = (void*)
GetProcAddress(DtColorLib,"DtColorStorageMode");
if (StorageMode)
{
// Set the board in 32 bits RGB
StorageMode(CurDevInfo.DevId,0,WRITE,&value);
}
}
return TRUE;
}
}
Comentários a estes Manuais