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