GetCommProperties function

Retrieves information about the communications properties for a specified communications device.

Syntax


BOOL WINAPI GetCommProperties(
  _In_   HANDLE hFile,
  _Out_  LPCOMMPROP lpCommProp
);

Parameters

hFile [in]

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

lpCommProp [out]

A pointer to a COMMPROP structure in which the communications properties information is returned. This information can be used in subsequent calls to the SetCommState, SetCommTimeouts, or SetupComm function to configure the communications device.

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.

Remarks

The GetCommProperties function returns information from a device driver about the configuration settings that are supported by the driver.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

COMMPROP
Communications Functions
Communications Resources
CreateFile
SetCommState
SetCommTimeouts
SetupComm

 

 

Community Additions

ADD
Show:
© 2014 Microsoft