SetCommTimeouts Function

Sets the time-out parameters for all read and write operations on a specified communications device.

Syntax

C++
BOOL WINAPI SetCommTimeouts(
  __in  HANDLE hFile,
  __in  LPCOMMTIMEOUTS lpCommTimeouts
);

Parameters

hFile [in]

A handle to the communications device. The CreateFile function returns this handle.

lpCommTimeouts [in]

A pointer to a COMMTIMEOUTS structure that contains the new time-out values.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

Communications Functions
Communications Resources
COMMTIMEOUTS
GetCommTimeouts
ReadFile
ReadFileEx
WriteFile
WriteFileEx

Send comments about this topic to Microsoft

Build date: 7/30/2009

Tags :


Page view tracker