_PORTDATA

include vcomm.inc

_PortData STRUC
PDLength            DW  ?  ; size of this structure
PDVersion           DW  ?  ; version of this structure
PDfunctions         DD  ?  ; address of _PORTFUNCTIONS
PDNumFunctions      DD  ?  ; last supported function
dwLastError         DD  ?  ; see below
dwClientEventMask   DD  ?  ; see below
lpClientEventNotify DD  ?  ; see below
lpClientReadNotify  DD  ?  ; see below
lpClientWriteNotify DD  ?  ; see below
dwClientRefData     DD  ?  ; see below
dwWin31Req          DD  ?  ; reserved
dwClientEvent       DD  ?  ; see below
dwCallerVMID        DD  ?  ; reserved
dwDetectedEvents    DD  ?  ; see below
dwCommError         DD  ?  ; detected I/O errors; see below
bMSRShadow          DB  ?  ; see below
wFlags              DW  ?  ; reserved
LossByte            DB  ?  ; reserved
QInAddr             DD  ?  ; base address of receive queue
QInSize             DD  ?  ; size of receive queue
QOutAddr            DD  ?  ; base address of transmit queue
QOutSize            DD  ?  ; size of transmit queue
QInCount            DD  ?  ; num. bytes in receive queue
QInGet              DD  ?  ; see below
QInPut              DD  ?  ; see below
QOutCount           DD  ?  ; num. bytes in transmit queue
QOutGet             DD  ?  ; see below
QOutPut             DD  ?  ; see below
ValidPortData       DD  ?  ; reserved
lpLoadHandle        DD  ?  ; see below
cmto COMMTIMEOUTS <>       ; see below
lpReadRequestQueue  DD  ?  ; reserved
lpWriteRequestQueue DD  ?  ; reserved
dwLastReceivedTime  DD  ?  ; time of last reception of data
dwReserved1         DD  ?  ; reserved
dwReserved2         DD  ?  ; reserved
_PortData ENDS
 

Contains information about an open port. Some of the information in this structure is used by VCOMM, and some by the port driver. The port driver is responsible for initializing the fields whose names begin with PD.

Members

dwLastError
Error value for the last operation. The port driver sets this value during each call to a port-driver function.
dwClientEventMask
Zero or more values specifying enabled communications events. VCOMM sets this value when the _VCOMM_SetCommEventMask service is called. For a list of events, see the PortGetEventMask function.
lpClientEventNotify, lpClientReadNotify, and lpClientWriteNotify
Addresses of client-defined callback functions for event notification, receive-queue threshold notification, and transmit-queue threshold notification.
dwClientRefData
Reference data for event notification (not for threshold notifications). The port driver sets this value when the PortEnableNotification function is called.
dwClientEvent
One or more values specifying detected events that VCOMM is waiting to sent to a non-VxD client. Port drivers should ignore this field.
dwDetectedEvents
One or more values specifying enabled events that were detected. The port driver maintains this value. For a list of events, see the PortGetEventMask function.
dwCommError
Value specifying detected I/O errors. The port driver maintains this value. For a list of possible values, see the _VCOMM_ClearCommError service.
bMSRShadow
The initial location of the modem status shadow. The port driver must update this value whenever the register changes. The PortSetModemStatusShadow function sets the location of the modem status shadow.
QInGet and QInPut
Current read and write offsets within the receive queue. The first character in the queue is at the location specified by QInGet. Additional characters are added to the queue starting at the location specified by QInPut. Both VCOMM and the port driver modify these values.
QOutGet and QOutPut
Current read and write offsets within the transmit queue. The first character in the queue is at the location specified by QInGet. Additional characters are added to the queue starting at the location specified by QInPut. Both VCOMM and the port driver modify these values.
lpLoadHandle
Load handle of the port-driver VxD. This field is used by VCOMM only.
cmto
A COMMTIMEOUTS structure specifying the read and write time-outs for the communications port.

See Also

commtimeouts, PortEnableNotification, _PORTFUNCTIONS, PortGetEventMask, PortSetModemStatusShadow, _VCOMM_ClearCommError, _VCOMM_SetCommEventMask