1 out of 1 rated this helpful - Rate this topic

SetDefaultCommConfig function

Applies to: desktop apps only

Sets the default configuration for a communications device.

Syntax

BOOL WINAPI SetDefaultCommConfig(
  __in  LPCTSTR lpszName,
  __in  LPCOMMCONFIG lpCC,
  __in  DWORD dwSize
);

Parameters

lpszName [in]

The name of the device. For example, COM1 through COM9 are serial ports and LPT1 through LPT9 are parallel ports.

lpCC [in]

A pointer to a COMMCONFIG structure.

dwSize [in]

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

Minimum supported server

Windows Server 2003

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

Unicode and ANSI names

SetDefaultCommConfigW (Unicode) and SetDefaultCommConfigA (ANSI)

See also

COMMCONFIG
Communications Functions
Communications Resources
GetDefaultCommConfig

 

 

Send comments about this topic to Microsoft

Build date: 2/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ