PortSetWriteCallback

cCall [pPortSetWriteCallback], <hPort, TxTrigger, \
    <OFFSET32 CommNotifyProc>, lReferenceData>
or      eax, eax
jz      error_handler
 

Called by the _VCOMM_SetWriteCallback service to set the notification threshold for the transmit queue, and register a callback function for transmit-queue threshold notification.

hPort
Address of a _PORTINFORMATION structure returned by the PortOpen function.
TxTrigger
Transmit-queue notification threshold. When the number of bytes in the transmit queue reaches this value, the port driver calls the function specified by CommNotifyProc. Can be –1 to disable transmit-queue notification.
CommNotifyProc
Address of the callback function for transmit-queue notification. Can be different from the notification function for event notification and receive-queue notification. For more information, see the CommNotifyProc function.
lReferenceData
A client-defined 32-bit value that is passed to the callback function. Can be different from the reference data specified for event notification and receive-queue notification.

See Also

CommNotifyProc, _PORTINFORMATION, PortOpen, _VCOMM_SetWriteCallback