BOOL GetCommProperties(hCommDEv, lpcp) | |||||
HANDLE hCommDEv; | /* identifies the comm device to query | */ | |||
LPCOMMPROP lpcp; | /* address of the comm properties | */ |
The GetCommProperties function returns the communications properties for the specified device.
hCommDEv
Identifies the device to return properties for. The CreateFile function returns this value.
lpcp
Points to a COMMPROP data structure that is filled in with the communications properties.
The COMMPROP structure has the following form:
typedef struct _COMMPROP { /* cmmp */
WORD wPacketLength;
WORD wPacketVersion;
DWORD dwServiceMask;
DWORD dwReserved1;
DWORD dwMaxTxQueue;
DWORD dwMaxRxQueue;
DWORD dwMaxBaud;
DWORD dwProvSubType;
DWORD dwProvCapabilities;
DWORD dwSettableParams;
DWORD dwSettableBaud;
WORD wSettableData;
WORD wSettableStopParity;
DWORD dwCurrentTxQueue;
DWORD dwCurrentRxQueue;
DWORD dwProvSpec1;
DWORD dwProvSpec2;
WCHAR wcProvChar[1];
} COMMPROP;
The return value is TRUE if the function was successful, or FALSE if an error occurred.
Use the GetLastError function to obtain extended error information.