// tcpxcv.h
typedef struct _PORT_DATA_1 {
WCHAR sztPortName[MAX_PORTNAME_LEN];
DWORD dwVersion;
DWORD dwProtocol;
DWORD cbSize;
DWORD dwReserved;
WCHAR sztHostAddress[MAX_NETWORKNAME_LEN];
WCHAR sztSNMPCommunity[MAX_SNMP_COMMUNITY_STR_LEN];
DWORD dwDoubleSpool;
WCHAR sztQueue[MAX_QUEUENAME_LEN];
WCHAR sztIPAddress[MAX_IPADDR_STR_LEN];
BYTE Reserved[540];
DWORD dwPortNumber;
DWORD dwSNMPEnabled;
DWORD dwSNMPDevIndex;
} PORT_DATA_1, *PPORT_DATA_1;
View the official Windows Driver Kit DDI referenceNo description available.
The XcvData function uses a PORT_DATA_1 structure when it adds a port or configures an existing port.
sztPortNameSpecifies the name of the port. The MAX_PORTNAME_LEN constant is defined in tcpxcv.h.
dwVersionSpecifies the version number of the PORT_DATA_1 structure, which is currently 1.
dwProtocolSpecifies the protocol to use for the port. This value can be either PROTOCOL_RAWTCP_TYPE or PROTOCOL_LPR_TYPE, constants that are defined in tcpxcv.h.
cbSizeSpecifies the size, in bytes of this structure. Use sizeof(PORT_DATA_1) for this value.
dwReservedReserved, must be set to zero.
sztHostAddressSpecifies the IP Address or host name of the printer. The MAX_NETWORKNAME_LEN constant is defined in tcpxcv.h.
sztSNMPCommunitySpecifies the SNMP community name of the printer. The MAX_SNMP_COMMUNITY_STR_LEN constant is defined in tcpxcv.h.
dwDoubleSpoolIf TRUE, indicates that double spooling is enabled. If FALSE, double spooling is disabled.
sztQueueSpecifies the LPR queue name. The MAX_QUEUENAME_LEN constant is defined in tcpxcv.h.
sztIPAddressSpecifies the IP address of the printer. The MAX_IPADDR_STR_LEN constant is defined in tcpxcv.h.
ReservedReserved, must be set to zero.
dwPortNumberSpecifies the port number of the device.
dwSNMPEnabledIf TRUE, indicates that the device supports Simple Network Management Protocol (SNMP).
dwSNMPDevIndexSpecifies the SNMP device index.
When the XcvData function is called either to add a port or configure an existing port, its pOutputData parameter must be set with the address of a PORT_DATA_1 structure, which will be filled in when the function returns. To add a port, set this function's pszDataName parameter to the string L"AddPort". To configure a port, set this parameter to L"ConfigPort".
See TCPMON Xcv Interface for more information.