SetCommConfig function

Sets the current configuration of a communications device.

Syntax

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

Parameters

hCommDev

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

lpCC

A pointer to a COMMCONFIG structure.

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

   
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