1 /***********************************************************************\
2 *                                rpcdce.d                               *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module win32.rpcdce;
11 pragma(lib, "Rpcrt4.lib");
12 
13 // TODO: I think MinGW got this wrong. RPC_UNICODE_SUPPORTED should be
14 // replaced aliases for version(Unicode)
15 
16 public import win32.rpcdcep;
17 private import win32.basetyps, win32.w32api, win32.windef;
18 
19 // FIXME: clean up Windows version support
20 
21 alias UUID uuid_t;
22 alias UUID_VECTOR uuid_vector_t;
23 alias void RPC_MGR_EPV;
24 
25 // for RpcMgmtSetComTimeout()
26 enum : uint {
27 	RPC_C_BINDING_MIN_TIMEOUT      = 0,
28 	RPC_C_BINDING_DEFAULT_TIMEOUT  = 5,
29 	RPC_C_BINDING_MAX_TIMEOUT      = 9,
30 	RPC_C_BINDING_INFINITE_TIMEOUT = 10
31 }
32 
33 const RPC_C_CANCEL_INFINITE_TIMEOUT= -1;
34 const RPC_C_LISTEN_MAX_CALLS_DEFAULT=1234;
35 const RPC_C_PROTSEQ_MAX_REQS_DEFAULT=10;
36 const RPC_C_BIND_TO_ALL_NICS=1;
37 const RPC_C_USE_INTERNET_PORT=1;
38 const RPC_C_USE_INTRANET_PORT=2;
39 
40 // for RPC_STATS_VECTOR, used by RpcMgmyInqStats
41 enum : uint {
42 	RPC_C_STATS_CALLS_IN  = 0,
43 	RPC_C_STATS_CALLS_OUT,
44 	RPC_C_STATS_PKTS_IN,
45 	RPC_C_STATS_PKTS_OUT
46 }
47 
48 const RPC_IF_AUTOLISTEN=0x0001;
49 const RPC_IF_OLE=2;
50 const RPC_C_MGMT_INQ_IF_IDS=0;
51 const RPC_C_MGMT_INQ_PRINC_NAME=1;
52 const RPC_C_MGMT_INQ_STATS=2;
53 const RPC_C_MGMT_IS_SERVER_LISTEN=3;
54 const RPC_C_MGMT_STOP_SERVER_LISTEN=4;
55 
56 // Inquiry Type for RpcMgmtEpEltInqBegin()
57 enum : uint {
58 	RPC_C_EP_ALL_ELTS = 0,
59 	RPC_C_EP_MATCH_BY_IF,
60 	RPC_C_EP_MATCH_BY_OBJ,
61 	RPC_C_EP_MATCH_BY_BOTH
62 }
63 
64 // for RpcMgmtEpEltInqNext()
65 enum : uint {
66 	RPC_C_VERS_ALL = 1,
67 	RPC_C_VERS_COMPATIBLE,
68 	RPC_C_VERS_EXACT,
69 	RPC_C_VERS_MAJOR_ONLY,
70 	RPC_C_VERS_UPTO
71 }
72 
73 const DCE_C_ERROR_STRING_LEN=256;
74 const RPC_C_PARM_MAX_PACKET_LENGTH=1;
75 const RPC_C_PARM_BUFFER_LENGTH=2;
76 const RPC_C_AUTHN_LEVEL_DEFAULT=0;
77 const RPC_C_AUTHN_LEVEL_NONE=1;
78 const RPC_C_AUTHN_LEVEL_CONNECT=2;
79 const RPC_C_AUTHN_LEVEL_CALL=3;
80 const RPC_C_AUTHN_LEVEL_PKT=4;
81 const RPC_C_AUTHN_LEVEL_PKT_INTEGRITY=5;
82 const RPC_C_AUTHN_LEVEL_PKT_PRIVACY=6;
83 const RPC_C_IMP_LEVEL_ANONYMOUS=1;
84 const RPC_C_IMP_LEVEL_IDENTIFY=2;
85 const RPC_C_IMP_LEVEL_IMPERSONATE=3;
86 const RPC_C_IMP_LEVEL_DELEGATE=4;
87 const RPC_C_QOS_IDENTITY_STATIC=0;
88 const RPC_C_QOS_IDENTITY_DYNAMIC=1;
89 const RPC_C_QOS_CAPABILITIES_DEFAULT=0;
90 const RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH=1;
91 
92 // These enums were buggy in MinGW !
93 const RPC_C_PROTECT_LEVEL_DEFAULT = RPC_C_AUTHN_LEVEL_DEFAULT;
94 const RPC_C_PROTECT_LEVEL_NONE = RPC_C_AUTHN_LEVEL_NONE;
95 const RPC_C_PROTECT_LEVEL_CONNECT = RPC_C_AUTHN_LEVEL_CONNECT;
96 const RPC_C_PROTECT_LEVEL_CALL = RPC_C_AUTHN_LEVEL_CALL;
97 const RPC_C_PROTECT_LEVEL_PKT = RPC_C_AUTHN_LEVEL_PKT;
98 const RPC_C_PROTECT_LEVEL_PKT_INTEGRITY = RPC_C_AUTHN_LEVEL_PKT_INTEGRITY;
99 const RPC_C_PROTECT_LEVEL_PKT_PRIVACY = RPC_C_AUTHN_LEVEL_PKT_PRIVACY;
100 
101 const RPC_C_AUTHN_NONE=0;
102 const RPC_C_AUTHN_DCE_PRIVATE=1;
103 const RPC_C_AUTHN_DCE_PUBLIC=2;
104 const RPC_C_AUTHN_DEC_PUBLIC=4;
105 const RPC_C_AUTHN_WINNT=10;
106 const RPC_C_AUTHN_DEFAULT=0xFFFFFFFF;
107 //const RPC_C_SECURITY_QOS_VERSION=L; // FIXME(MinGW): This is nonsense!
108 const SEC_WINNT_AUTH_IDENTITY_ANSI=0x1;
109 const SEC_WINNT_AUTH_IDENTITY_UNICODE=0x2;
110 const RPC_C_AUTHZ_NONE=0;
111 const RPC_C_AUTHZ_NAME=1;
112 const RPC_C_AUTHZ_DCE=2;
113 const RPC_C_AUTHZ_DEFAULT=0xFFFFFFFF;
114 
115 alias I_RPC_HANDLE RPC_BINDING_HANDLE;
116 alias RPC_BINDING_HANDLE handle_t;
117 
118 struct RPC_BINDING_VECTOR {
119 	uint Count;
120 	RPC_BINDING_HANDLE BindingH[1];
121 }
122 
123 alias RPC_BINDING_HANDLE rpc_binding_handle_t;
124 alias RPC_BINDING_VECTOR rpc_binding_vector_t;
125 
126 
127 struct UUID_VECTOR {
128 	uint Count;
129 	UUID* Uuid[1];
130 }
131 
132 alias void* RPC_IF_HANDLE;
133 
134 struct RPC_IF_ID {
135 	UUID Uuid;
136 	ushort VersMajor;
137 	ushort VersMinor;
138 }
139 
140 struct RPC_POLICY {
141 	uint Length;
142 	uint EndpointFlags;
143 	uint NICFlags;
144 }
145 alias RPC_POLICY* PRPC_POLICY;
146 
147 extern (Windows) {
148 	alias void function(UUID*, UUID*, RPC_STATUS*) RPC_OBJECT_INQ_FN;
149 	alias RPC_STATUS function(RPC_IF_HANDLE, void*) RPC_IF_CALLBACK_FN;
150 }
151 
152 struct RPC_STATS_VECTOR {
153 	uint    Count;
154 	uint[1] Stats;
155 }
156 
157 struct RPC_IF_ID_VECTOR {
158 	uint          Count;
159 	RPC_IF_ID*[1] IfId;
160 }
161 alias HANDLE RPC_AUTH_IDENTITY_HANDLE, RPC_AUTHZ_HANDLE;
162 
163 struct RPC_SECURITY_QOS {
164 	uint Version;
165 	uint Capabilities;
166 	uint IdentityTracking;
167 	uint ImpersonationType;
168 }
169 alias RPC_SECURITY_QOS* PRPC_SECURITY_QOS;
170 
171 struct SEC_WINNT_AUTH_IDENTITY_W {
172 	ushort* User;
173 	uint UserLength;
174 	ushort* Domain;
175 	uint DomainLength;
176 	ushort* Password;
177 	uint PasswordLength;
178 	uint Flags;
179 }
180 alias SEC_WINNT_AUTH_IDENTITY_W* PSEC_WINNT_AUTH_IDENTITY_W;
181 
182 struct SEC_WINNT_AUTH_IDENTITY_A {
183 	ubyte* User;
184 	uint UserLength;
185 	ubyte* Domain;
186 	uint DomainLength;
187 	ubyte* Password;
188 	uint PasswordLength;
189 	uint Flags;
190 }
191 alias SEC_WINNT_AUTH_IDENTITY_A* PSEC_WINNT_AUTH_IDENTITY_A;
192 
193 struct RPC_CLIENT_INFORMATION1 {
194 	ubyte* UserName;
195 	ubyte* ComputerName;
196 	ushort Privilege;
197 	uint AuthFlags;
198 }
199 alias RPC_CLIENT_INFORMATION1* PRPC_CLIENT_INFORMATION1;
200 alias I_RPC_HANDLE* RPC_EP_INQ_HANDLE;
201 extern (Windows) {
202 	alias int function(RPC_BINDING_HANDLE, uint, RPC_STATUS*) RPC_MGMT_AUTHORIZATION_FN;
203 }
204 
205 static if(_WIN32_WINNT_ONLY) {
206 
207 	struct RPC_PROTSEQ_VECTORA {
208 		uint Count;
209 		ubyte*[1] Protseq;
210 	}
211 
212 	struct RPC_PROTSEQ_VECTORW {
213 		uint Count;
214 		ushort*[1] Protseq;
215 	}
216 
217 	extern (Windows) {
218 		RPC_STATUS RpcBindingFromStringBindingA(char*, RPC_BINDING_HANDLE*);
219 		RPC_STATUS RpcBindingFromStringBindingW(wchar*, RPC_BINDING_HANDLE*);
220 		RPC_STATUS RpcBindingToStringBindingA(RPC_BINDING_HANDLE, char**);
221 		RPC_STATUS RpcBindingToStringBindingW(RPC_BINDING_HANDLE, wchar**);
222 		RPC_STATUS RpcStringBindingComposeA(char*, char*, char*, char*, char*, char**);
223 		RPC_STATUS RpcStringBindingComposeW(wchar*, wchar*, wchar*, wchar*, wchar*, wchar**);
224 		RPC_STATUS RpcStringBindingParseA(char*, char**, char**, char**, char**, char**);
225 		RPC_STATUS RpcStringBindingParseW(wchar*, wchar**, wchar**, wchar**, wchar**, wchar**);
226 		RPC_STATUS RpcStringFreeA(char**);
227 		RPC_STATUS RpcStringFreeW(wchar**);
228 		RPC_STATUS RpcNetworkIsProtseqValidA(char*);
229 		RPC_STATUS RpcNetworkIsProtseqValidW(wchar*);
230 		RPC_STATUS RpcNetworkInqProtseqsA(RPC_PROTSEQ_VECTORA**);
231 		RPC_STATUS RpcNetworkInqProtseqsW(RPC_PROTSEQ_VECTORW**);
232 		RPC_STATUS RpcProtseqVectorFreeA(RPC_PROTSEQ_VECTORA**);
233 		RPC_STATUS RpcProtseqVectorFreeW(RPC_PROTSEQ_VECTORW**);
234 		RPC_STATUS RpcServerUseProtseqA(char*, uint, void*);
235 		RPC_STATUS RpcServerUseProtseqW(wchar*, uint, void*);
236 		RPC_STATUS RpcServerUseProtseqExA(char*, uint MaxCalls, void*, PRPC_POLICY);
237 		RPC_STATUS RpcServerUseProtseqExW(wchar*, uint, void*, PRPC_POLICY);
238 		RPC_STATUS RpcServerUseProtseqEpA(char*, uint, char*, void*);
239 		RPC_STATUS RpcServerUseProtseqEpExA(char*, uint, char*, void*, PRPC_POLICY);
240 		RPC_STATUS RpcServerUseProtseqEpW(wchar*, uint, wchar*, void*);
241 		RPC_STATUS RpcServerUseProtseqEpExW(wchar*, uint, wchar*, void*, PRPC_POLICY);
242 		RPC_STATUS RpcServerUseProtseqIfA(char*, uint, RPC_IF_HANDLE, void*);
243 		RPC_STATUS RpcServerUseProtseqIfExA(char*, uint, RPC_IF_HANDLE, void*, PRPC_POLICY);
244 		RPC_STATUS RpcServerUseProtseqIfW(wchar*, uint, RPC_IF_HANDLE, void*);
245 		RPC_STATUS RpcServerUseProtseqIfExW(wchar*, uint, RPC_IF_HANDLE, void*, PRPC_POLICY);
246 		RPC_STATUS RpcMgmtInqServerPrincNameA(RPC_BINDING_HANDLE, uint, char**);
247 		RPC_STATUS RpcMgmtInqServerPrincNameW(RPC_BINDING_HANDLE, uint, wchar**);
248 		RPC_STATUS RpcServerInqDefaultPrincNameA(uint, char**);
249 		RPC_STATUS RpcServerInqDefaultPrincNameW(uint, wchar**);
250 		RPC_STATUS RpcNsBindingInqEntryNameA(RPC_BINDING_HANDLE, uint, char**);
251 		RPC_STATUS RpcNsBindingInqEntryNameW(RPC_BINDING_HANDLE, uint, wchar**);
252 		RPC_STATUS RpcBindingInqAuthClientA(RPC_BINDING_HANDLE, RPC_AUTHZ_HANDLE*, char**, uint*, uint*, uint*);
253 		RPC_STATUS RpcBindingInqAuthClientW(RPC_BINDING_HANDLE, RPC_AUTHZ_HANDLE*, wchar**, uint*, uint*, uint*);
254 		RPC_STATUS RpcBindingInqAuthInfoA(RPC_BINDING_HANDLE, char**, uint*, uint*, RPC_AUTH_IDENTITY_HANDLE*, uint*);
255 		RPC_STATUS RpcBindingInqAuthInfoW(RPC_BINDING_HANDLE, wchar**, uint*, uint*, RPC_AUTH_IDENTITY_HANDLE*, uint*);
256 		RPC_STATUS RpcBindingSetAuthInfoA(RPC_BINDING_HANDLE, char*, uint, uint, RPC_AUTH_IDENTITY_HANDLE, uint);
257 		RPC_STATUS RpcBindingSetAuthInfoExA(RPC_BINDING_HANDLE, char*, uint, uint, RPC_AUTH_IDENTITY_HANDLE, uint, RPC_SECURITY_QOS*);
258 		RPC_STATUS RpcBindingSetAuthInfoW(RPC_BINDING_HANDLE, wchar*, uint, uint, RPC_AUTH_IDENTITY_HANDLE, uint);
259 		RPC_STATUS RpcBindingSetAuthInfoExW(RPC_BINDING_HANDLE, wchar*, uint, uint, RPC_AUTH_IDENTITY_HANDLE, uint, RPC_SECURITY_QOS*);
260 		RPC_STATUS RpcBindingInqAuthInfoExA(RPC_BINDING_HANDLE, char**, uint*, uint*, RPC_AUTH_IDENTITY_HANDLE*, uint*, uint, RPC_SECURITY_QOS*);
261 		RPC_STATUS RpcBindingInqAuthInfoExW(RPC_BINDING_HANDLE, wchar**, uint*, uint*, RPC_AUTH_IDENTITY_HANDLE*, uint*, uint, RPC_SECURITY_QOS*);
262 		alias void function(void*, wchar*, uint, void**, RPC_STATUS*) RPC_AUTH_KEY_RETRIEVAL_FN;
263 		RPC_STATUS RpcServerRegisterAuthInfoA(char*, uint, RPC_AUTH_KEY_RETRIEVAL_FN, void*);
264 		RPC_STATUS RpcServerRegisterAuthInfoW(wchar*, uint, RPC_AUTH_KEY_RETRIEVAL_FN, void*);
265 		RPC_STATUS UuidToStringA(UUID*, char**);
266 		RPC_STATUS UuidFromStringA(char*, UUID*);
267 		RPC_STATUS UuidToStringW(UUID*, wchar**);
268 		RPC_STATUS UuidFromStringW(wchar*, UUID*);
269 		RPC_STATUS RpcEpRegisterNoReplaceA(RPC_IF_HANDLE, RPC_BINDING_VECTOR*, UUID_VECTOR*, char*);
270 		RPC_STATUS RpcEpRegisterNoReplaceW(RPC_IF_HANDLE, RPC_BINDING_VECTOR*, UUID_VECTOR*, wchar*);
271 		RPC_STATUS RpcEpRegisterA(RPC_IF_HANDLE, RPC_BINDING_VECTOR*, UUID_VECTOR*, char*);
272 		RPC_STATUS RpcEpRegisterW(RPC_IF_HANDLE, RPC_BINDING_VECTOR*, UUID_VECTOR*, wchar*);
273 		RPC_STATUS DceErrorInqTextA(RPC_STATUS, char*);
274 		RPC_STATUS DceErrorInqTextW(RPC_STATUS, wchar*);
275 		RPC_STATUS RpcMgmtEpEltInqNextA(RPC_EP_INQ_HANDLE, RPC_IF_ID*, RPC_BINDING_HANDLE*, UUID*, char**);
276 		RPC_STATUS RpcMgmtEpEltInqNextW(RPC_EP_INQ_HANDLE, RPC_IF_ID*, RPC_BINDING_HANDLE*, UUID*, wchar**);
277 
278 		// MinGW erroneously had these in rpc.h
279 		RPC_STATUS RpcImpersonateClient(RPC_BINDING_HANDLE);
280 		RPC_STATUS RpcRevertToSelf();
281 	}
282 
283 	version(Unicode) {
284 		alias RPC_PROTSEQ_VECTORW RPC_PROTSEQ_VECTOR;
285 		alias SEC_WINNT_AUTH_IDENTITY_W SEC_WINNT_AUTH_IDENTITY;
286 		alias PSEC_WINNT_AUTH_IDENTITY_W PSEC_WINNT_AUTH_IDENTITY;
287 		alias RpcMgmtEpEltInqNextW RpcMgmtEpEltInqNext;
288 		alias RpcBindingFromStringBindingW RpcBindingFromStringBinding;
289 		alias RpcBindingToStringBindingW RpcBindingToStringBinding;
290 		alias RpcStringBindingComposeW RpcStringBindingCompose;
291 		alias RpcStringBindingParseW RpcStringBindingParse;
292 		alias RpcStringFreeW RpcStringFree;
293 		alias RpcNetworkIsProtseqValidW RpcNetworkIsProtseqValid;
294 		alias RpcNetworkInqProtseqsW RpcNetworkInqProtseqs;
295 		alias RpcProtseqVectorFreeW RpcProtseqVectorFree;
296 		alias RpcServerUseProtseqW RpcServerUseProtseq;
297 		alias RpcServerUseProtseqExW RpcServerUseProtseqEx;
298 		alias RpcServerUseProtseqEpW RpcServerUseProtseqEp;
299 		alias RpcServerUseProtseqEpExW RpcServerUseProtseqEpEx;
300 		alias RpcServerUseProtseqIfW RpcServerUseProtseqIf;
301 		alias RpcServerUseProtseqIfExW RpcServerUseProtseqIfEx;
302 		alias RpcMgmtInqServerPrincNameW RpcMgmtInqServerPrincName;
303 		alias RpcServerInqDefaultPrincNameW RpcServerInqDefaultPrincName;
304 		alias RpcNsBindingInqEntryNameW RpcNsBindingInqEntryName;
305 		alias RpcBindingInqAuthClientW RpcBindingInqAuthClient;
306 		alias RpcBindingInqAuthInfoW RpcBindingInqAuthInfo;
307 		alias RpcBindingSetAuthInfoW RpcBindingSetAuthInfo;
308 		alias RpcServerRegisterAuthInfoW RpcServerRegisterAuthInfo;
309 		alias RpcBindingInqAuthInfoExW RpcBindingInqAuthInfoEx;
310 		alias RpcBindingSetAuthInfoExW RpcBindingSetAuthInfoEx;
311 		alias UuidFromStringW UuidFromString;
312 		alias UuidToStringW UuidToString;
313 		alias RpcEpRegisterNoReplaceW RpcEpRegisterNoReplace;
314 		alias RpcEpRegisterW RpcEpRegister;
315 		alias DceErrorInqTextW DceErrorInqText;
316 	} else { // Ansi
317 		alias RPC_PROTSEQ_VECTORA RPC_PROTSEQ_VECTOR;
318 		alias SEC_WINNT_AUTH_IDENTITY_A SEC_WINNT_AUTH_IDENTITY;
319 		alias PSEC_WINNT_AUTH_IDENTITY_A PSEC_WINNT_AUTH_IDENTITY;
320 		alias RpcMgmtEpEltInqNextA RpcMgmtEpEltInqNext;
321 		alias RpcBindingFromStringBindingA RpcBindingFromStringBinding;
322 		alias RpcBindingToStringBindingA RpcBindingToStringBinding;
323 		alias RpcStringBindingComposeA RpcStringBindingCompose;
324 		alias RpcStringBindingParseA RpcStringBindingParse;
325 		alias RpcStringFreeA RpcStringFree;
326 		alias RpcNetworkIsProtseqValidA RpcNetworkIsProtseqValid;
327 		alias RpcNetworkInqProtseqsA RpcNetworkInqProtseqs;
328 		alias RpcProtseqVectorFreeA RpcProtseqVectorFree;
329 		alias RpcServerUseProtseqA RpcServerUseProtseq;
330 		alias RpcServerUseProtseqExA RpcServerUseProtseqEx;
331 		alias RpcServerUseProtseqEpA RpcServerUseProtseqEp;
332 		alias RpcServerUseProtseqEpExA RpcServerUseProtseqEpEx;
333 		alias RpcServerUseProtseqIfA RpcServerUseProtseqIf;
334 		alias RpcServerUseProtseqIfExA RpcServerUseProtseqIfEx;
335 		alias RpcMgmtInqServerPrincNameA RpcMgmtInqServerPrincName;
336 		alias RpcServerInqDefaultPrincNameA RpcServerInqDefaultPrincName;
337 		alias RpcNsBindingInqEntryNameA RpcNsBindingInqEntryName;
338 		alias RpcBindingInqAuthClientA RpcBindingInqAuthClient;
339 		alias RpcBindingInqAuthInfoA RpcBindingInqAuthInfo;
340 		alias RpcBindingSetAuthInfoA RpcBindingSetAuthInfo;
341 		alias RpcServerRegisterAuthInfoA RpcServerRegisterAuthInfo;
342 		alias RpcBindingInqAuthInfoExA RpcBindingInqAuthInfoEx;
343 		alias RpcBindingSetAuthInfoExA RpcBindingSetAuthInfoEx;
344 		alias UuidFromStringA UuidFromString;
345 		alias UuidToStringA UuidToString;
346 		alias RpcEpRegisterNoReplaceA RpcEpRegisterNoReplace;
347 		alias RpcEpRegisterA RpcEpRegister;
348 		alias DceErrorInqTextA DceErrorInqText;
349 	} //#endif // UNICODE
350 
351 } else { // _WIN32_WINNT_ONLY
352 
353 	struct RPC_PROTSEQ_VECTOR {
354 		uint Count;
355 		ubyte* Protseq[1];
356 	}
357 	// versions without Unicode.
358 	RPC_STATUS RpcBindingFromStringBinding(char*, RPC_BINDING_HANDLE*);
359 	RPC_STATUS RpcBindingToStringBinding(RPC_BINDING_HANDLE, char**);
360 	RPC_STATUS RpcStringBindingCompose(char*, char*, char*, char*, char*, char**);
361 	RPC_STATUS RpcStringBindingParse(char*, char**, char**, char**, char**, char**);
362 	RPC_STATUS RpcStringFree(char**);
363 	RPC_STATUS RpcNetworkIsProtseqValid(char*);
364 	RPC_STATUS RpcNetworkInqProtseqs(RPC_PROTSEQ_VECTOR**);
365 	RPC_STATUS RpcServerInqBindings(RPC_BINDING_VECTOR**);
366 	RPC_STATUS RpcServerUseProtseq(char*, uint, void*);
367 	RPC_STATUS RpcServerUseProtseqEx(char*, uint, void*, PRPC_POLICY);
368 	RPC_STATUS RpcServerUseProtseqEp(char*, uint, char*, void*);
369 	RPC_STATUS RpcServerUseProtseqEpEx(char*, uint, char*, void*, PRPC_POLICY);
370 	RPC_STATUS RpcServerUseProtseqIf(char*, uint, RPC_IF_HANDLE, void*);
371 	RPC_STATUS RpcServerUseProtseqIfEx(char*, uint, RPC_IF_HANDLE, void*, PRPC_POLICY);
372 	RPC_STATUS RpcMgmtInqServerPrincName(RPC_BINDING_HANDLE, uint, char**);
373 	RPC_STATUS RpcServerInqDefaultPrincName(uint, char**);
374 	RPC_STATUS RpcNsBindingInqEntryName(RPC_BINDING_HANDLE, uint, char**);
375 	RPC_STATUS RpcBindingInqAuthClient(RPC_BINDING_HANDLE, RPC_AUTHZ_HANDLE*, char**, uint*, uint*, uint*);
376 	RPC_STATUS RpcBindingInqAuthInfo(RPC_BINDING_HANDLE, char**, uint*, uint*, RPC_AUTH_IDENTITY_HANDLE*, uint*);
377 	RPC_STATUS RpcBindingSetAuthInfo(RPC_BINDING_HANDLE, char*, uint, uint, RPC_AUTH_IDENTITY_HANDLE, uint);
378 	alias void function(void*, char*, uint, void**, RPC_STATUS*) RPC_AUTH_KEY_RETRIEVAL_FN;
379 	RPC_STATUS RpcServerRegisterAuthInfo(char*, uint, RPC_AUTH_KEY_RETRIEVAL_FN, void*);
380 	RPC_STATUS UuidToString(UUID*, char**);
381 	RPC_STATUS UuidFromString(char*, UUID*);
382 	RPC_STATUS RpcEpRegisterNoReplace(RPC_IF_HANDLE, RPC_BINDING_VECTOR*, UUID_VECTOR*, char*);
383 	RPC_STATUS RpcEpRegister(RPC_IF_HANDLE, RPC_BINDING_VECTOR*, UUID_VECTOR*, char*);
384 	RPC_STATUS DceErrorInqText(RPC_STATUS, char*);
385 	RPC_STATUS RpcMgmtEpEltInqNext(RPC_EP_INQ_HANDLE, RPC_IF_ID*, RPC_BINDING_HANDLE*, char**);
386 }// _WIN32_WINNT_ONLY
387 
388 
389 RPC_STATUS RpcBindingCopy(RPC_BINDING_HANDLE, RPC_BINDING_HANDLE*);
390 RPC_STATUS RpcBindingFree(RPC_BINDING_HANDLE*);
391 RPC_STATUS RpcBindingInqObject(RPC_BINDING_HANDLE, UUID*);
392 RPC_STATUS RpcBindingReset(RPC_BINDING_HANDLE);
393 RPC_STATUS RpcBindingSetObject(RPC_BINDING_HANDLE, UUID*);
394 RPC_STATUS RpcMgmtInqDefaultProtectLevel(uint, uint*);
395 RPC_STATUS RpcBindingVectorFree(RPC_BINDING_VECTOR**);
396 RPC_STATUS RpcIfInqId(RPC_IF_HANDLE, RPC_IF_ID*);
397 RPC_STATUS RpcMgmtInqComTimeout(RPC_BINDING_HANDLE, uint*);
398 RPC_STATUS RpcMgmtSetComTimeout(RPC_BINDING_HANDLE, uint);
399 RPC_STATUS RpcMgmtSetCancelTimeout(int Timeout);
400 RPC_STATUS RpcObjectInqType(UUID*, UUID*);
401 RPC_STATUS RpcObjectSetInqFn(RPC_OBJECT_INQ_FN*);
402 RPC_STATUS RpcObjectSetType(UUID*, UUID*);
403 RPC_STATUS RpcProtseqVectorFree(RPC_PROTSEQ_VECTOR**);
404 RPC_STATUS RpcServerInqIf(RPC_IF_HANDLE, UUID*, RPC_MGR_EPV**);
405 RPC_STATUS RpcServerListen(uint, uint, uint);
406 RPC_STATUS RpcServerRegisterIf(RPC_IF_HANDLE, UUID*, RPC_MGR_EPV*);
407 RPC_STATUS RpcServerRegisterIfEx(RPC_IF_HANDLE, UUID*, RPC_MGR_EPV*, uint, uint, RPC_IF_CALLBACK_FN*);
408 RPC_STATUS RpcServerRegisterIf2(RPC_IF_HANDLE, UUID*, RPC_MGR_EPV*, uint, uint, uint, RPC_IF_CALLBACK_FN*);
409 RPC_STATUS RpcServerUnregisterIf(RPC_IF_HANDLE, UUID*, uint);
410 RPC_STATUS RpcServerUseAllProtseqs(uint, void*);
411 RPC_STATUS RpcServerUseAllProtseqsEx(uint, void*, PRPC_POLICY);
412 RPC_STATUS RpcServerUseAllProtseqsIf(uint, RPC_IF_HANDLE, void*);
413 RPC_STATUS RpcServerUseAllProtseqsIfEx(uint, RPC_IF_HANDLE, void*, PRPC_POLICY);
414 RPC_STATUS RpcMgmtStatsVectorFree(RPC_STATS_VECTOR**);
415 RPC_STATUS RpcMgmtInqStats(RPC_BINDING_HANDLE, RPC_STATS_VECTOR**);
416 RPC_STATUS RpcMgmtIsServerListening(RPC_BINDING_HANDLE);
417 RPC_STATUS RpcMgmtStopServerListening(RPC_BINDING_HANDLE);
418 RPC_STATUS RpcMgmtWaitServerListen();
419 RPC_STATUS RpcMgmtSetServerStackSize(uint);
420 void RpcSsDontSerializeContext();
421 RPC_STATUS RpcMgmtEnableIdleCleanup();
422 RPC_STATUS RpcMgmtInqIfIds(RPC_BINDING_HANDLE, RPC_IF_ID_VECTOR**);
423 RPC_STATUS RpcIfIdVectorFree(RPC_IF_ID_VECTOR**);
424 RPC_STATUS RpcEpResolveBinding(RPC_BINDING_HANDLE, RPC_IF_HANDLE);
425 RPC_STATUS RpcBindingServerFromClient(RPC_BINDING_HANDLE, RPC_BINDING_HANDLE*);
426 
427 // never returns
428 void RpcRaiseException(RPC_STATUS);
429 RPC_STATUS RpcTestCancel();
430 RPC_STATUS RpcCancelThread(void*);
431 RPC_STATUS UuidCreate(UUID*);
432 int UuidCompare(UUID*, UUID*, RPC_STATUS*);
433 RPC_STATUS UuidCreateNil(UUID*);
434 int UuidEqual(UUID*, UUID*, RPC_STATUS*);
435 ushort UuidHash(UUID*, RPC_STATUS*);
436 int UuidIsNil(UUID*, RPC_STATUS*);
437 RPC_STATUS RpcEpUnregister(RPC_IF_HANDLE, RPC_BINDING_VECTOR*, UUID_VECTOR*);
438 RPC_STATUS RpcMgmtEpEltInqBegin(RPC_BINDING_HANDLE, uint, RPC_IF_ID*, uint, UUID*, RPC_EP_INQ_HANDLE*);
439 RPC_STATUS RpcMgmtEpEltInqDone(RPC_EP_INQ_HANDLE*);
440 RPC_STATUS RpcMgmtEpUnregister(RPC_BINDING_HANDLE, RPC_IF_ID*, RPC_BINDING_HANDLE, UUID*);
441 RPC_STATUS RpcMgmtSetAuthorizationFn(RPC_MGMT_AUTHORIZATION_FN);
442 RPC_STATUS RpcMgmtInqParameter(uint, uint*);
443 RPC_STATUS RpcMgmtSetParameter(uint, uint);
444 RPC_STATUS RpcMgmtBindingInqParameter(RPC_BINDING_HANDLE, uint, uint*);
445 RPC_STATUS RpcMgmtBindingSetParameter(RPC_BINDING_HANDLE, uint, uint);
446 
447 static if (_WIN32_WINNT >= 0x0500) {
448 	RPC_STATUS UuidCreateSequential(UUID*);
449 }