Open and Close Functions

To open the port, VCOMM calls the PortOpen function for the port driver that best supports the device. If successful, the PortOpen function returns the address of a _PORTINFORMATION structure. This address is used to identify the open port in all subsequent calls to port driver functions. The first field of the _PORTINFORMATION structure must be a _PORTDATA structure, but additional fields can be defined by the port driver. The _PORTDATA structure contains information about an open communications device that is used by VCOMM, the port driver, or both. It includes a pointer to the port driver's _PORTFUNCTIONS structure, that contains the addresses of all the port driver functions except Enumerator, Inquire, and PortOpen.

To close a communications port, VCOMM calls the port driver's PortClose function.

See Also

PortClose, _PORTDATA, _PORTFUNCTIONS, _PORTINFORMATION, PortOpen