BOOL GetCommTimeouts(hCommDev, lpct) | |||||
HANDLE hCommDev; | /* identifies the comm device | */ | |||
LPCOMMTIMEOUTS lpct; | /* address of structure for timeout values | */ |
The GetCommTimeouts function retrieves the timeout characteristics for read and write operations on the specified communications device.
hCommDev
Identifies the communication device to query for timeout values. The CreateFile function returns this value.
lpct
Points to a COMMTIMEOUTS structure for the current communications timeout values.
The COMMTIMEOUTS structure has the following format:
typedef struct _COMMTIMEOUTS { /* ctmo */
DWORD ReadIntervalTimeout;
DWORD ReadTotalTimeoutMultiplier;
DWORD ReadTotalTimeoutConstant;
DWORD WriteTotalTimeoutMultiplier;
DWORD WriteTotalTimeoutConstant;
} COMMTIMEOUTS,*LPCOMMTIMEOUTS;
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.
See the SetCommTimeouts function for more information about the timeout values.
SetCommTimeouts