EasyManua.ls Logo

Elo TouchSystems ET1229L Series

Elo TouchSystems ET1229L Series
249 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Table of Contents

Related product manuals