1 /***********************************************************************\
2 *                               lmchdev.d                               *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module win32.lmchdev;
11 
12 // COMMENT: This file might be deprecated.
13 
14 private import win32.lmcons, win32.windef;
15 
16 const CHARDEVQ_NO_REQUESTS  = -1;
17 const CHARDEV_CLOSE         = 0;
18 const CHARDEVQ_MAX_PRIORITY = 1;
19 const CHARDEVQ_DEV_PARMNUM  = 1;
20 
21 const HANDLE_INFO_LEVEL_1 = 1;
22 const HANDLE_CHARTIME_PARMNUM = 1;
23 const HANDLE_CHARCOUNT_PARMNUM = 2;
24 
25 const CHARDEV_STAT_OPENED = 2;
26 const CHARDEVQ_PRIORITY_PARMNUM = 2;
27 const CHARDEVQ_DEVS_PARMNUM = 3;
28 const CHARDEV_STAT_ERROR = 4;
29 const CHARDEVQ_NUMUSERS_PARMNUM = 4;
30 const CHARDEVQ_NUMAHEAD_PARMNUM = 5;
31 const CHARDEVQ_DEF_PRIORITY = 5;
32 const CHARDEVQ_PRIORITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+CHARDEVQ_PRIORITY_PARMNUM;
33 const CHARDEVQ_DEVS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+CHARDEVQ_DEVS_PARMNUM;
34 const CHARDEVQ_MIN_PRIORITY = 9;
35 
36 struct CHARDEV_INFO_0 {
37  LPWSTR ch0_dev;
38 }
39 alias CHARDEV_INFO_0* PCHARDEV_INFO_0, LPCHARDEV_INFO_0;
40 
41 struct CHARDEV_INFO_1{
42 	LPWSTR ch1_dev;
43 	DWORD ch1_status;
44 	LPWSTR ch1_username;
45 	DWORD ch1_time;
46 }
47 alias CHARDEV_INFO_1* PCHARDEV_INFO_1, LPCHARDEV_INFO_1;
48 
49 struct CHARDEVQ_INFO_0 {
50  LPWSTR cq0_dev;
51 }
52 alias CHARDEVQ_INFO_0* PCHARDEVQ_INFO_0, LPCHARDEVQ_INFO_0;
53 
54 struct CHARDEVQ_INFO_1{
55 	LPWSTR cq1_dev;
56 	DWORD cq1_priority;
57 	LPWSTR cq1_devs;
58 	DWORD cq1_numusers;
59 	DWORD cq1_numahead;
60 }
61 alias CHARDEVQ_INFO_1* PCHARDEVQ_INFO_1, LPCHARDEVQ_INFO_1;
62 
63 struct CHARDEVQ_INFO_1002 {
64 	DWORD cq1002_priority;
65 }
66 alias CHARDEVQ_INFO_1002* PCHARDEVQ_INFO_1002, LPCHARDEVQ_INFO_1002;
67 
68 struct CHARDEVQ_INFO_1003 {
69 	LPWSTR cq1003_devs;
70 }
71 alias CHARDEVQ_INFO_1003* PCHARDEVQ_INFO_1003, LPCHARDEVQ_INFO_1003;
72 
73 struct HANDLE_INFO_1{
74 	DWORD hdli1_chartime;
75 	DWORD hdli1_charcount;
76 }
77 alias HANDLE_INFO_1* PHANDLE_INFO_1, LPHANDLE_INFO_1;
78 
79 extern (Windows) {
80 	NET_API_STATUS NetCharDevEnum(LPCWSTR, DWORD, PBYTE*, DWORD, PDWORD, PDWORD, PDWORD);
81 	NET_API_STATUS NetCharDevGetInfo(LPCWSTR, LPCWSTR, DWORD, PBYTE*);
82 	NET_API_STATUS NetCharDevControl(LPCWSTR, LPCWSTR, DWORD);
83 	NET_API_STATUS NetCharDevQEnum(LPCWSTR, LPCWSTR, DWORD, PBYTE*, DWORD, PDWORD, PDWORD, PDWORD);
84 	NET_API_STATUS NetCharDevQGetInfo(LPCWSTR, LPCWSTR, LPCWSTR, DWORD, PBYTE*);
85 	NET_API_STATUS NetCharDevQSetInfo(LPCWSTR, LPCWSTR, DWORD, PBYTE, PDWORD);
86 	NET_API_STATUS NetCharDevQPurge(LPCWSTR, LPCWSTR);
87 	NET_API_STATUS NetCharDevQPurgeSelf(LPCWSTR, LPCWSTR, LPCWSTR);
88 	NET_API_STATUS NetHandleGetInfo(HANDLE, DWORD, PBYTE*);
89 	NET_API_STATUS NetHandleSetInfo(HANDLE, DWORD, PBYTE, DWORD, PDWORD);
90 }