annotate win32/lmrepl.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 * lmrepl.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.lmrepl;
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 private import win32.lmcons, win32.windef;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
14
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
15 const REPL_ROLE_EXPORT=1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
16 const REPL_ROLE_IMPORT=2;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
17 const REPL_ROLE_BOTH=3;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
18
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
19 const REPL_INTERVAL_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+0;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
20 const REPL_PULSE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
21 const REPL_GUARDTIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+2;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
22 const REPL_RANDOM_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+3;
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 const REPL_UNLOCK_NOFORCE=0;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
25 const REPL_UNLOCK_FORCE=1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
26 const REPL_STATE_OK=0;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
27 const REPL_STATE_NO_MASTER=1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
28 const REPL_STATE_NO_SYNC=2;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
29 const REPL_STATE_NEVER_REPLICATED=3;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
30 const REPL_INTEGRITY_FILE=1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
31 const REPL_INTEGRITY_TREE=2;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
32 const REPL_EXTENT_FILE=1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
33 const REPL_EXTENT_TREE=2;
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 REPL_EXPORT_INTEGRITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+0;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
36 const REPL_EXPORT_EXTENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
37
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
38 struct REPL_INFO_0 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
39 DWORD rp0_role;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
40 LPWSTR rp0_exportpath;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
41 LPWSTR rp0_exportlist;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
42 LPWSTR rp0_importpath;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
43 LPWSTR rp0_importlist;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
44 LPWSTR rp0_logonusername;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
45 DWORD rp0_interval;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
46 DWORD rp0_pulse;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
47 DWORD rp0_guardtime;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
48 DWORD rp0_random;
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 alias REPL_INFO_0* PREPL_INFO_0, LPREPL_INFO_0;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
51
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
52 struct REPL_INFO_1000 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
53 DWORD rp1000_interval;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
54 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
55 alias REPL_INFO_1000* PREPL_INFO_1000, LPREPL_INFO_1000;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
56
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
57 struct REPL_INFO_1001 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
58 DWORD rp1001_pulse;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
59 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
60 alias REPL_INFO_1001* PREPL_INFO_1001, LPREPL_INFO_1001;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
61
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
62 struct REPL_INFO_1002 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
63 DWORD rp1002_guardtime;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
64 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
65 alias REPL_INFO_1002* PREPL_INFO_1002, LPREPL_INFO_1002;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
66
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
67 struct REPL_INFO_1003 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
68 DWORD rp1003_random;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
69 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
70 alias REPL_INFO_1003* PREPL_INFO_1003, LPREPL_INFO_1003;
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 struct REPL_EDIR_INFO_0 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
73 LPWSTR rped0_dirname;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
74 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
75 alias REPL_EDIR_INFO_0* PREPL_EDIR_INFO_0, LPREPL_EDIR_INFO_0;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
76
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
77 struct REPL_EDIR_INFO_1 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
78 LPWSTR rped1_dirname;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
79 DWORD rped1_integrity;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
80 DWORD rped1_extent;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
81 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
82 alias REPL_EDIR_INFO_1* PREPL_EDIR_INFO_1, LPREPL_EDIR_INFO_1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
83
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
84 struct REPL_EDIR_INFO_2 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
85 LPWSTR rped2_dirname;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
86 DWORD rped2_integrity;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
87 DWORD rped2_extent;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
88 DWORD rped2_lockcount;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
89 DWORD rped2_locktime;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
90 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
91 alias REPL_EDIR_INFO_2* PREPL_EDIR_INFO_2, LPREPL_EDIR_INFO_2;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
92
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
93 struct REPL_EDIR_INFO_1000 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
94 DWORD rped1000_integrity;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
95 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
96 alias REPL_EDIR_INFO_1000* PREPL_EDIR_INFO_1000, LPREPL_EDIR_INFO_1000;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
97
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
98 struct REPL_EDIR_INFO_1001 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
99 DWORD rped1001_extent;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
100 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
101 alias REPL_EDIR_INFO_1001* PREPL_EDIR_INFO_1001, LPREPL_EDIR_INFO_1001;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
102
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
103 struct REPL_IDIR_INFO_0 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
104 LPWSTR rpid0_dirname;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
105 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
106 alias REPL_IDIR_INFO_0* PREPL_IDIR_INFO_0, LPREPL_IDIR_INFO_0;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
107
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
108 struct REPL_IDIR_INFO_1 {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
109 LPWSTR rpid1_dirname;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
110 DWORD rpid1_state;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
111 LPWSTR rpid1_mastername;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
112 DWORD rpid1_last_update_time;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
113 DWORD rpid1_lockcount;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
114 DWORD rpid1_locktime;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
115 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
116 alias REPL_IDIR_INFO_1* PREPL_IDIR_INFO_1, LPREPL_IDIR_INFO_1;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
117
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
118 extern (Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
119 NET_API_STATUS NetReplGetInfo(LPCWSTR,DWORD,PBYTE*);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
120 NET_API_STATUS NetReplSetInfo(LPCWSTR,DWORD,PBYTE,PDWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
121 NET_API_STATUS NetReplExportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
122 NET_API_STATUS NetReplExportDirDel(LPCWSTR,LPCWSTR);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
123 NET_API_STATUS NetReplExportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
124 NET_API_STATUS NetReplExportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
125 NET_API_STATUS NetReplExportDirSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
126 NET_API_STATUS NetReplExportDirLock(LPCWSTR,LPCWSTR);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
127 NET_API_STATUS NetReplExportDirUnlock(LPCWSTR,LPCWSTR,DWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
128 NET_API_STATUS NetReplImportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
129 NET_API_STATUS NetReplImportDirDel(LPCWSTR,LPCWSTR);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
130 NET_API_STATUS NetReplImportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
131 NET_API_STATUS NetReplImportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
132 NET_API_STATUS NetReplImportDirLock(LPCWSTR,LPCWSTR);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
133 NET_API_STATUS NetReplImportDirUnlock(LPCWSTR,LPCWSTR,DWORD);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
134 }