SetCommConfig function (winbase.h)

Sets the current configuration of a communications device.

Syntax

BOOL SetCommConfig(
  [in] HANDLE       hCommDev,
  [in] LPCOMMCONFIG lpCC,
  [in] DWORD        dwSize
);

Parameters

[in] hCommDev

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

[in] lpCC

A pointer to a COMMCONFIG structure.

[in] dwSize

The size of the structure pointed to by lpCC, in bytes.

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

Requirement Value
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

COMMCONFIG

Communications Functions

Communications Resources

CreateFile

GetCommConfig