ComDBOpen function (msports.h)

ComDBOpen returns a handle to the COM port database.

Syntax

LONG ComDBOpen(
  [out] PHCOMDB PHComDB
);

Parameters

[out] PHComDB

Pointer, if the routine succeeds, to a handle to the COM port database. Otherwise, the routine sets *PHComDB to HCOMDB_INVALID_HANDLE_VALUE. PHComDB must be non-NULL.

Return value

ComDBOpen returns one of the following status values.

Return code Description
ERROR_SUCCESS
The COM port database was successfully opened.
ERROR_ACCESS_DENIED
The routine could not open the database. To get extended error information, call GetLastError.

Remarks

To close the COM port database, call ComDBClose and supply the handle that was returned by ComDBOpen.

ComDBOpen is called from user mode.

For more information, see Opening and Closing the COM Port Database.

Requirements

Requirement Value
Target Platform Desktop
Header msports.h (include Msports.h)
Library Msports.lib
DLL Msports.dll

See also

ComDBClose