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