33c801551a9844fe455eea0944ba3fff1c628105
[reactos.git] / reactos / include / ddk / msports.h
1 #ifndef _MSPORTS_
2 #define _MSPORTS_
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 DECLARE_HANDLE(HCOMDB);
9 typedef HCOMDB *PHCOMDB;
10 #define HCOMDB_INVALID_HANDLE_VALUE ((HCOMDB)INVALID_HANDLE_VALUE)
11
12 #define COMDB_MIN_PORTS_ARBITRATED 256
13 #define COMDB_MAX_PORTS_ARBITRATED 4096
14
15 LONG
16 WINAPI
17 ComDBClaimNextFreePort(IN HCOMDB hComDB,
18 OUT LPDWORD ComNumber);
19
20 LONG
21 WINAPI
22 ComDBClaimPort(IN HCOMDB hComDB,
23 IN DWORD ComNumber,
24 IN BOOL ForceClaim,
25 OUT PBOOL Forced);
26
27 LONG
28 WINAPI
29 ComDBClose(IN HCOMDB hComDB);
30
31 LONG
32 WINAPI
33 ComDBGetCurrentPortUsage(IN HCOMDB hComDB,
34 OUT PBYTE Buffer,
35 IN DWORD BufferSize,
36 IN DWORD ReportType,
37 OUT LPDWORD MaxPortsReported);
38
39 LONG
40 WINAPI
41 ComDBOpen(OUT HCOMDB *phComDB);
42
43 LONG
44 WINAPI
45 ComDBReleasePort(IN HCOMDB hComDB,
46 IN DWORD ComNumber);
47
48 LONG
49 WINAPI
50 ComDBResizeDatabase(IN HCOMDB hComDB,
51 IN DWORD NewSize);
52
53 #ifdef __cplusplus
54 }
55 #endif
56
57 #endif /* _MSPORTS_ */