annotate win32/lmuse.d @ 1:4a9dcbd9e54f

-files of 0.13 beta -fixes so that it now compiles with the current dmd version
author marton@basel.hu
date Tue, 05 Apr 2011 20:44:01 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
1 /***********************************************************************\
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
2 * lmuse.d *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
3 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
4 * Windows API header module *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
5 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
6 * Translated from MinGW Windows headers *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
7 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
8 * Placed into public domain *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
9 \***********************************************************************/
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
10 module win32.lmuse;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
11 pragma(lib, "netapi32.lib");
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
12
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
13 import win32.lmuseflg;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
14 private import win32.lmcons, win32.windef;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
15
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
16 enum {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
17 USE_LOCAL_PARMNUM = 1,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
18 USE_REMOTE_PARMNUM,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
19 USE_PASSWORD_PARMNUM,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
20 USE_ASGTYPE_PARMNUM,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
21 USE_USERNAME_PARMNUM,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
22 USE_DOMAINNAME_PARMNUM
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
23 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
24
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
25 enum {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
26 USE_OK,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
27 USE_PAUSED,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
28 USE_SESSLOST,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
29 USE_DISCONN = USE_SESSLOST,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
30 USE_NETERR,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
31 USE_CONN,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
32 USE_RECONN
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
33 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
34
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
35 const DWORD USE_WILDCARD = -1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
36
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
37 enum {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
38 USE_DISKDEV,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
39 USE_SPOOLDEV,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
40 USE_CHARDEV,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
41 USE_IPC
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
42 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
43
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
44 struct USE_INFO_0 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
45 LPWSTR ui0_local;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
46 LPWSTR ui0_remote;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
47 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
48 alias USE_INFO_0* PUSE_INFO_0, LPUSE_INFO_0;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
49
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
50 struct USE_INFO_1 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
51 LPWSTR ui1_local;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
52 LPWSTR ui1_remote;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
53 LPWSTR ui1_password;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
54 DWORD ui1_status;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
55 DWORD ui1_asg_type;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
56 DWORD ui1_refcount;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
57 DWORD ui1_usecount;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
58 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
59 alias USE_INFO_1* PUSE_INFO_1, LPUSE_INFO_1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
60
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
61 struct USE_INFO_2 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
62 LPWSTR ui2_local;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
63 LPWSTR ui2_remote;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
64 LPWSTR ui2_password;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
65 DWORD ui2_status;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
66 DWORD ui2_asg_type;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
67 DWORD ui2_refcount;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
68 DWORD ui2_usecount;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
69 LPWSTR ui2_username;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
70 LPWSTR ui2_domainname;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
71 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
72 alias USE_INFO_2* PUSE_INFO_2, LPUSE_INFO_2;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
73
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
74 extern (Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
75 NET_API_STATUS NetUseAdd(LPWSTR, DWORD, PBYTE, PDWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
76 NET_API_STATUS NetUseDel(LPWSTR, LPWSTR, DWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
77 NET_API_STATUS NetUseEnum(LPWSTR, DWORD, PBYTE*, DWORD, PDWORD, PDWORD,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
78 PDWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
79 NET_API_STATUS NetUseGetInfo(LPWSTR, LPWSTR, DWORD, PBYTE*);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
80 }