include vcomm.inc VxDcall _VCOMM_ReadComm, <hPort, <OFFSET32 achBuffer>, \ cchRequested, <OFFSET32 cchReceived>> or eax, eax jz error_handler
Reads characters from the receive queue for the specified port, and returns immediately. Uses the C calling convention. This is an asynchronous service.
hPort
Handle of a communications resource.
achBuffer
Address of a buffer that receives the data.
cchRequested
Number of characters to read from the receive queue.
cchReceived
Address of a 32-bit variable that receives the number of characters to read. This value is less than cchRequested if the receive queue does not contain enough characters; it is zero if a communications error occurs.
If a communications error has occurred, the service returns TRUE, but doesn't read any characters. In this case, call _VCOMM_ClearCommError.
See also _VCOMM_ClearCommError, _VCOMM_GetLastError