ComDBResizeDatabase function (msports.h)
ComDBResizeDatabase resizes the COM port database.
Syntax
LONG ComDBResizeDatabase(
[in] HCOMDB HComDB,
[in] DWORD NewSize
);
Parameters
[in] HComDB
Handle to the COM port database that was returned by ComDBOpen.
[in] NewSize
Specifies a new size for the COM port database, where the database size is the number of port numbers currently arbitrated in the database. This value must be an integer multiple of 1024, must be greater than the current size, and must be less than or equal to COMDB_MAX_PORTS_ARBITRATED.
Return value
ComDBResizeDatabase returns one of the following status values.
Return code | Description |
---|---|
|
The database was successfully resized. |
|
NewSize is less than or equal to the current database size, or it is greater than COMDB_MAX_PORTS_ARBITRATED. |
|
The routine could not write to the database. |
|
One of the following is true: The specified handle to the COM port database is not valid. NewSize is not a multiple of 1024. |
|
The routine could not access the database. To get extended error information, call GetLastError. |
Remarks
Use ComDBGetCurrentPortUsage to obtain the current database size.
ComDBResizeDatabase runs in user mode.
For more information, see Resizing the COM Port Database.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | msports.h (include Msports.h) |
Library | Msports.lib |
DLL | Msports.dll |