include vcomm.inc VxDcall _VCOMM_EscapeCommFunction, <hPort, lFunc, \ InData, <OFFSET32 OutData>> or eax, eax jz error_handler
Directs the communications port driver to carry out an extended function. Uses the C calling convention. This is an asynchronous service.
hPort
Handle of a communications resource.
lFunc
Value identifying the extended function to carry out. The following common extended functions are defined in VCOMM.INC.
Value | Meaning |
CLEARBREAK | Clears break condition, resuming transmission. |
CLRDTR | Clears the DTR signal. |
CLRRTS | Clears the RTS signal. |
DUMMY | Performs no action. |
GETCLOSEPROP | Returns the close property of the port driver in the address specified by the OutData parameter. See below. |
RESET | Asserts a signal on the reset line of an LPT port, if available. This can be used to reset a printer. No action is taken if the hPort parameter identifies a COM port. |
SETBREAK | Sets the break condition, halting transmission. |
SETCLOSEPROP | Sets the close property of the port driver to the InData parameter. The previous close property is returned in the address specified by the OutData parameter. See below. |
SETDTR | Sets the DTR signal. |
SETRTS | Sets the RTS signal. |
SETXOFF | Causes transmission to act as if an XOFF character has been received. |
SETXON | Causes transmission to act as if an XON character has been received. |
Port drivers can define additional extended functions to expose device-specific features. Extended functions can be used in conjunction with driver-defined events to facilitate two-way message passing between an application and port driver.
InData
Function-specific 32-bit parameter.
OutData
Address to receive function-specific data.
Except for GETCLOSEPROP and SETCLOSEPROP, the extended functions defined in VCOMM.INC ignore the InData and OutData parameters.
See also _VCOMM_CloseComm, _VCOMM_GetLastError