Elo TouchSystems MonitorMouse FOR WINDOWS NT Version 2.0 Guia do Utilizador Página 172

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 249
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 171
Section 5. Example Applications
49
DWORD read_len=0;
char wbuff[1];
char* p;
while (!quit)
{
rs = ReadFile(drv_h, wbuff, sizeof(wbuff), &read_len, &ov_r);
if(!rs)
{
rs = GetLastError ();
if ( rs != ERROR_IO_PENDING)
{
printf("DeviceIOControl (Read) Error : %i (0x%x)\n", rs, rs );
break;
}
}
rs = WaitForSingleObject ( ov_r.hEvent, INFINITE);
rs = GetOverlappedResult (
drv_h, // handle of file, pipe, or communications device
&ov_r, // address of overlapped structure
&read_len, // address of actual bytes count
FALSE // wait flag
);
if (quit)
break;
if(rs)
{
p = wbuff;
while (read_len >0)
{
if (*p == 0x1a)
{
quit = TRUE;
printf("\n\nExiting Test...");
break;
}
putch (*p);
++p;
--read_len;
}
}
}
};
//endoffile
Vista de página 171
1 2 ... 167 168 169 170 171 172 173 174 175 176 177 ... 248 249

Comentários a estes Manuais

Sem comentários