Pulnix TMC-7DSP Manual de usuario Pagina 26

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 32
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 25
25
/* Allocate space for info */
hDevInfoList = GlobalAlloc(GHND, iCount * sizeof(OLT_IMGDEVINFO));
if ( !hDevInfoList )
{
FILE *file_out;
file_out = fopen ("ERROR0.txt", "w");
fprintf(file_out, "Unable to allocate memory for device list;
GlobalAlloc failed.");
return FALSE;
}
lpDevInfoList = (LPOLT_IMGDEVINFO) GlobalLock(hDevInfoList);
if ( !lpDevInfoList )
{
FILE *file_out;
file_out = fopen ("ERROR1.txt", "w");
fprintf(file_out, "Unable to lock memory for device list;
GlobalLock failed.");
GlobalFree(hDevInfoList);
return FALSE;
}
/* Fill in the device info */
lpDevInfoList->StructSize = sizeof(OLT_IMGDEVINFO);
if ( (Status = OlImgGetDeviceInfo(lpDevInfoList, iCount *
sizeof(OLT_IMGDEVINFO))) )
{
FILE *file_out;
file_out = fopen ("ERROR2.txt", "w");
fprintf(file_out, "OlImgGetDeviceInfo failed (status =
%#08lx).", Status);
GlobalUnlock(hDevInfoList);
GlobalFree(hDevInfoList);
return FALSE;
}
/* Select wanted alias */
strcpy(CurDevInfo.Alias,lpDevInfoList[index].Alias);
/* Free the memory */
GlobalUnlock(hDevInfoList);
GlobalFree(hDevInfoList);
return TRUE;
}
/********************************************************************/
BOOL NewDevice(LPCSTR lpcszAlias)
{
{
OLT_IMG_DEV_ID DevId = NULL;
OLT_APISTATUS Status = OLC_STS_NORMAL;
char DeviceName[20];
Vista de pagina 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 32

Comentarios a estos manuales

Sin comentarios