2011-05-23 17:54:16 +00:00
|
|
|
#ifndef _MSPORTS_
|
|
|
|
#define _MSPORTS_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
DECLARE_HANDLE(HCOMDB);
|
|
|
|
typedef HCOMDB *PHCOMDB;
|
|
|
|
#define HCOMDB_INVALID_HANDLE_VALUE ((HCOMDB)INVALID_HANDLE_VALUE)
|
|
|
|
|
2011-06-05 13:26:43 +00:00
|
|
|
/* Limits for ComDBResizeDatabase NewSize */
|
2011-05-23 17:54:16 +00:00
|
|
|
#define COMDB_MIN_PORTS_ARBITRATED 256
|
|
|
|
#define COMDB_MAX_PORTS_ARBITRATED 4096
|
|
|
|
|
2011-06-05 13:26:43 +00:00
|
|
|
/* ReportType flags for ComDBGetCurrentPortUsage */
|
|
|
|
#define CDB_REPORT_BITS 0x0
|
|
|
|
#define CDB_REPORT_BYTES 0x1
|
2011-06-05 12:50:02 +00:00
|
|
|
|
2011-05-25 10:52:12 +00:00
|
|
|
LONG
|
|
|
|
WINAPI
|
|
|
|
ComDBClaimNextFreePort(IN HCOMDB hComDB,
|
|
|
|
OUT LPDWORD ComNumber);
|
|
|
|
|
2011-05-23 17:54:16 +00:00
|
|
|
LONG
|
|
|
|
WINAPI
|
|
|
|
ComDBClaimPort(IN HCOMDB hComDB,
|
|
|
|
IN DWORD ComNumber,
|
|
|
|
IN BOOL ForceClaim,
|
|
|
|
OUT PBOOL Forced);
|
|
|
|
|
|
|
|
LONG
|
|
|
|
WINAPI
|
|
|
|
ComDBClose(IN HCOMDB hComDB);
|
|
|
|
|
|
|
|
LONG
|
|
|
|
WINAPI
|
|
|
|
ComDBGetCurrentPortUsage(IN HCOMDB hComDB,
|
|
|
|
OUT PBYTE Buffer,
|
|
|
|
IN DWORD BufferSize,
|
2011-05-25 10:52:12 +00:00
|
|
|
IN DWORD ReportType,
|
2011-05-23 17:54:16 +00:00
|
|
|
OUT LPDWORD MaxPortsReported);
|
|
|
|
|
|
|
|
LONG
|
|
|
|
WINAPI
|
|
|
|
ComDBOpen(OUT HCOMDB *phComDB);
|
|
|
|
|
|
|
|
LONG
|
|
|
|
WINAPI
|
|
|
|
ComDBReleasePort(IN HCOMDB hComDB,
|
|
|
|
IN DWORD ComNumber);
|
|
|
|
|
|
|
|
LONG
|
|
|
|
WINAPI
|
|
|
|
ComDBResizeDatabase(IN HCOMDB hComDB,
|
|
|
|
IN DWORD NewSize);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _MSPORTS_ */
|