The xxx_Read function reads data from the device identified by the open context.
DWORD xxx_Read( DWORD hOpenContext, LPVOID pBuffer,
DWORD Count );
Returns 0 for the end-of-file, –1 for an error, or the number of bytes read for success.
An application calls ReadFile to read from the device. The operating system, in turn, invokes xxx_Read. The hFile argument is a handle for your device. The pData argument points to the buffer that contains the data read from the device. The Size argument indicates the number of bytes the application wants to read from the device. The pSizeRead argument is the address of a value where xxx_Read can store the number of bytes actually read from the device. The value returned from xxx_Read is equal to the value contained in pSizeRead, unless xxx_Read returns -1 for an error. If xxx_Read returns an error, then pSizeRead will contain 0.