HWGetBytes

This function gets 0 or more bytes from the device.

Syntax

ULONG HWGetBytes( PVOID pContext, PUCHAR pTargetBuffer,
PULONG pByteNumber );

Parameters

pContext
Pointer to a context structure returned by the HWInit function that contains implementation-specific data describing the hardware device.
pTargetBuffer
Pointer to the target buffer in which to put the data.
pByteNumber
Pointer to, on entry, the maximum number of bytes to read. On exit, the number of bytes read.

Return Values

The return value is the number of bytes dropped by the hardware.

Remarks

This function gets several characters from the hardware receive buffer and puts them into the location pointed to by the second parameter. If there are no characters available for reading, this function returns immediately. This function is called in response to a receive interrupt indication from the HWGetIntrType function.

This function supports the implementation of the PDDs of serial port drivers. This function is defined in the header file SerHW.h, and is available in Windows CE version 1.0 and later.

See Also

HWInit, HWGetIntrType