/src/FreeRDP/winpr/libwinpr/rpc/rpc.c
Line | Count | Source (jump to first uncovered line) |
1 | | /** |
2 | | * WinPR: Windows Portable Runtime |
3 | | * Microsoft Remote Procedure Call (MSRPC) |
4 | | * |
5 | | * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com> |
6 | | * |
7 | | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | | * you may not use this file except in compliance with the License. |
9 | | * You may obtain a copy of the License at |
10 | | * |
11 | | * http://www.apache.org/licenses/LICENSE-2.0 |
12 | | * |
13 | | * Unless required by applicable law or agreed to in writing, software |
14 | | * distributed under the License is distributed on an "AS IS" BASIS, |
15 | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | | * See the License for the specific language governing permissions and |
17 | | * limitations under the License. |
18 | | */ |
19 | | |
20 | | #include <winpr/config.h> |
21 | | |
22 | | #include <winpr/crt.h> |
23 | | #include <winpr/rpc.h> |
24 | | #include <winpr/crypto.h> |
25 | | |
26 | | #if !defined(_WIN32) || defined(_UWP) |
27 | | |
28 | | #include "../log.h" |
29 | | #define TAG WINPR_TAG("rpc") |
30 | | |
31 | | RPC_STATUS RpcBindingCopy(RPC_BINDING_HANDLE SourceBinding, RPC_BINDING_HANDLE* DestinationBinding) |
32 | 0 | { |
33 | 0 | WLog_ERR(TAG, "Not implemented"); |
34 | 0 | return 0; |
35 | 0 | } |
36 | | |
37 | | RPC_STATUS RpcBindingFree(RPC_BINDING_HANDLE* Binding) |
38 | 0 | { |
39 | 0 | WLog_ERR(TAG, "Not implemented"); |
40 | 0 | return 0; |
41 | 0 | } |
42 | | |
43 | | RPC_STATUS RpcBindingSetOption(RPC_BINDING_HANDLE hBinding, unsigned long option, |
44 | | ULONG_PTR optionValue) |
45 | 0 | { |
46 | 0 | WLog_ERR(TAG, "Not implemented"); |
47 | 0 | return 0; |
48 | 0 | } |
49 | | |
50 | | RPC_STATUS RpcBindingInqOption(RPC_BINDING_HANDLE hBinding, unsigned long option, |
51 | | ULONG_PTR* pOptionValue) |
52 | 0 | { |
53 | 0 | WLog_ERR(TAG, "Not implemented"); |
54 | 0 | return 0; |
55 | 0 | } |
56 | | |
57 | | RPC_STATUS RpcBindingFromStringBindingA(RPC_CSTR StringBinding, RPC_BINDING_HANDLE* Binding) |
58 | 0 | { |
59 | 0 | WLog_ERR(TAG, "Not implemented"); |
60 | 0 | return 0; |
61 | 0 | } |
62 | | |
63 | | RPC_STATUS RpcBindingFromStringBindingW(RPC_WSTR StringBinding, RPC_BINDING_HANDLE* Binding) |
64 | 0 | { |
65 | 0 | WLog_ERR(TAG, "Not implemented"); |
66 | 0 | return 0; |
67 | 0 | } |
68 | | |
69 | | RPC_STATUS RpcSsGetContextBinding(void* ContextHandle, RPC_BINDING_HANDLE* Binding) |
70 | 0 | { |
71 | 0 | WLog_ERR(TAG, "Not implemented"); |
72 | 0 | return 0; |
73 | 0 | } |
74 | | |
75 | | RPC_STATUS RpcBindingInqObject(RPC_BINDING_HANDLE Binding, UUID* ObjectUuid) |
76 | 0 | { |
77 | 0 | WLog_ERR(TAG, "Not implemented"); |
78 | 0 | return 0; |
79 | 0 | } |
80 | | |
81 | | RPC_STATUS RpcBindingReset(RPC_BINDING_HANDLE Binding) |
82 | 0 | { |
83 | 0 | WLog_ERR(TAG, "Not implemented"); |
84 | 0 | return 0; |
85 | 0 | } |
86 | | |
87 | | RPC_STATUS RpcBindingSetObject(RPC_BINDING_HANDLE Binding, UUID* ObjectUuid) |
88 | 0 | { |
89 | 0 | WLog_ERR(TAG, "Not implemented"); |
90 | 0 | return 0; |
91 | 0 | } |
92 | | |
93 | | RPC_STATUS RpcMgmtInqDefaultProtectLevel(unsigned long AuthnSvc, unsigned long* AuthnLevel) |
94 | 0 | { |
95 | 0 | WLog_ERR(TAG, "Not implemented"); |
96 | 0 | return 0; |
97 | 0 | } |
98 | | |
99 | | RPC_STATUS RpcBindingToStringBindingA(RPC_BINDING_HANDLE Binding, RPC_CSTR* StringBinding) |
100 | 0 | { |
101 | 0 | WLog_ERR(TAG, "Not implemented"); |
102 | 0 | return 0; |
103 | 0 | } |
104 | | |
105 | | RPC_STATUS RpcBindingToStringBindingW(RPC_BINDING_HANDLE Binding, RPC_WSTR* StringBinding) |
106 | 0 | { |
107 | 0 | WLog_ERR(TAG, "Not implemented"); |
108 | 0 | return 0; |
109 | 0 | } |
110 | | |
111 | | RPC_STATUS RpcBindingVectorFree(RPC_BINDING_VECTOR** BindingVector) |
112 | 0 | { |
113 | 0 | WLog_ERR(TAG, "Not implemented"); |
114 | 0 | return 0; |
115 | 0 | } |
116 | | |
117 | | RPC_STATUS RpcStringBindingComposeA(RPC_CSTR ObjUuid, RPC_CSTR Protseq, RPC_CSTR NetworkAddr, |
118 | | RPC_CSTR Endpoint, RPC_CSTR Options, RPC_CSTR* StringBinding) |
119 | 0 | { |
120 | 0 | WLog_ERR(TAG, "Not implemented"); |
121 | 0 | return 0; |
122 | 0 | } |
123 | | |
124 | | RPC_STATUS RpcStringBindingComposeW(RPC_WSTR ObjUuid, RPC_WSTR Protseq, RPC_WSTR NetworkAddr, |
125 | | RPC_WSTR Endpoint, RPC_WSTR Options, RPC_WSTR* StringBinding) |
126 | 0 | { |
127 | 0 | WLog_ERR(TAG, "Not implemented"); |
128 | 0 | return 0; |
129 | 0 | } |
130 | | |
131 | | RPC_STATUS RpcStringBindingParseA(RPC_CSTR StringBinding, RPC_CSTR* ObjUuid, RPC_CSTR* Protseq, |
132 | | RPC_CSTR* NetworkAddr, RPC_CSTR* Endpoint, |
133 | | RPC_CSTR* NetworkOptions) |
134 | 0 | { |
135 | 0 | WLog_ERR(TAG, "Not implemented"); |
136 | 0 | return 0; |
137 | 0 | } |
138 | | |
139 | | RPC_STATUS RpcStringBindingParseW(RPC_WSTR StringBinding, RPC_WSTR* ObjUuid, RPC_WSTR* Protseq, |
140 | | RPC_WSTR* NetworkAddr, RPC_WSTR* Endpoint, |
141 | | RPC_WSTR* NetworkOptions) |
142 | 0 | { |
143 | 0 | WLog_ERR(TAG, "Not implemented"); |
144 | 0 | return 0; |
145 | 0 | } |
146 | | |
147 | | RPC_STATUS RpcStringFreeA(RPC_CSTR* String) |
148 | 0 | { |
149 | 0 | if (String) |
150 | 0 | free(*String); |
151 | |
|
152 | 0 | return RPC_S_OK; |
153 | 0 | } |
154 | | |
155 | | RPC_STATUS RpcStringFreeW(RPC_WSTR* String) |
156 | 0 | { |
157 | 0 | if (String) |
158 | 0 | free(*String); |
159 | |
|
160 | 0 | return RPC_S_OK; |
161 | 0 | } |
162 | | |
163 | | RPC_STATUS RpcIfInqId(RPC_IF_HANDLE RpcIfHandle, RPC_IF_ID* RpcIfId) |
164 | 0 | { |
165 | 0 | WLog_ERR(TAG, "Not implemented"); |
166 | 0 | return 0; |
167 | 0 | } |
168 | | |
169 | | RPC_STATUS RpcNetworkIsProtseqValidA(RPC_CSTR Protseq) |
170 | 0 | { |
171 | 0 | WLog_ERR(TAG, "Not implemented"); |
172 | 0 | return 0; |
173 | 0 | } |
174 | | |
175 | | RPC_STATUS RpcNetworkIsProtseqValidW(RPC_WSTR Protseq) |
176 | 0 | { |
177 | 0 | WLog_ERR(TAG, "Not implemented"); |
178 | 0 | return 0; |
179 | 0 | } |
180 | | |
181 | | RPC_STATUS RpcMgmtInqComTimeout(RPC_BINDING_HANDLE Binding, unsigned int* Timeout) |
182 | 0 | { |
183 | 0 | WLog_ERR(TAG, "Not implemented"); |
184 | 0 | return 0; |
185 | 0 | } |
186 | | |
187 | | RPC_STATUS RpcMgmtSetComTimeout(RPC_BINDING_HANDLE Binding, unsigned int Timeout) |
188 | 0 | { |
189 | 0 | WLog_ERR(TAG, "Not implemented"); |
190 | 0 | return 0; |
191 | 0 | } |
192 | | |
193 | | RPC_STATUS RpcMgmtSetCancelTimeout(long Timeout) |
194 | 0 | { |
195 | 0 | WLog_ERR(TAG, "Not implemented"); |
196 | 0 | return 0; |
197 | 0 | } |
198 | | |
199 | | RPC_STATUS RpcNetworkInqProtseqsA(RPC_PROTSEQ_VECTORA** ProtseqVector) |
200 | 0 | { |
201 | 0 | WLog_ERR(TAG, "Not implemented"); |
202 | 0 | return 0; |
203 | 0 | } |
204 | | |
205 | | RPC_STATUS RpcNetworkInqProtseqsW(RPC_PROTSEQ_VECTORW** ProtseqVector) |
206 | 0 | { |
207 | 0 | WLog_ERR(TAG, "Not implemented"); |
208 | 0 | return 0; |
209 | 0 | } |
210 | | |
211 | | RPC_STATUS RpcObjectInqType(UUID* ObjUuid, UUID* TypeUuid) |
212 | 0 | { |
213 | 0 | WLog_ERR(TAG, "Not implemented"); |
214 | 0 | return 0; |
215 | 0 | } |
216 | | |
217 | | RPC_STATUS RpcObjectSetInqFn(RPC_OBJECT_INQ_FN* InquiryFn) |
218 | 0 | { |
219 | 0 | WLog_ERR(TAG, "Not implemented"); |
220 | 0 | return 0; |
221 | 0 | } |
222 | | |
223 | | RPC_STATUS RpcObjectSetType(UUID* ObjUuid, UUID* TypeUuid) |
224 | 0 | { |
225 | 0 | WLog_ERR(TAG, "Not implemented"); |
226 | 0 | return 0; |
227 | 0 | } |
228 | | |
229 | | RPC_STATUS RpcProtseqVectorFreeA(RPC_PROTSEQ_VECTORA** ProtseqVector) |
230 | 0 | { |
231 | 0 | WLog_ERR(TAG, "Not implemented"); |
232 | 0 | return 0; |
233 | 0 | } |
234 | | |
235 | | RPC_STATUS RpcProtseqVectorFreeW(RPC_PROTSEQ_VECTORW** ProtseqVector) |
236 | 0 | { |
237 | 0 | WLog_ERR(TAG, "Not implemented"); |
238 | 0 | return 0; |
239 | 0 | } |
240 | | |
241 | | RPC_STATUS RpcServerInqBindings(RPC_BINDING_VECTOR** BindingVector) |
242 | 0 | { |
243 | 0 | WLog_ERR(TAG, "Not implemented"); |
244 | 0 | return 0; |
245 | 0 | } |
246 | | |
247 | | RPC_STATUS RpcServerInqIf(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV** MgrEpv) |
248 | 0 | { |
249 | 0 | WLog_ERR(TAG, "Not implemented"); |
250 | 0 | return 0; |
251 | 0 | } |
252 | | |
253 | | RPC_STATUS RpcServerListen(unsigned int MinimumCallThreads, unsigned int MaxCalls, |
254 | | unsigned int DontWait) |
255 | 0 | { |
256 | 0 | WLog_ERR(TAG, "Not implemented"); |
257 | 0 | return 0; |
258 | 0 | } |
259 | | |
260 | | RPC_STATUS RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv) |
261 | 0 | { |
262 | 0 | WLog_ERR(TAG, "Not implemented"); |
263 | 0 | return 0; |
264 | 0 | } |
265 | | |
266 | | RPC_STATUS RpcServerRegisterIfEx(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv, |
267 | | unsigned int Flags, unsigned int MaxCalls, |
268 | | RPC_IF_CALLBACK_FN* IfCallback) |
269 | 0 | { |
270 | 0 | WLog_ERR(TAG, "Not implemented"); |
271 | 0 | return 0; |
272 | 0 | } |
273 | | |
274 | | RPC_STATUS RpcServerRegisterIf2(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv, |
275 | | unsigned int Flags, unsigned int MaxCalls, unsigned int MaxRpcSize, |
276 | | RPC_IF_CALLBACK_FN* IfCallbackFn) |
277 | 0 | { |
278 | 0 | WLog_ERR(TAG, "Not implemented"); |
279 | 0 | return 0; |
280 | 0 | } |
281 | | |
282 | | RPC_STATUS RpcServerUnregisterIf(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, |
283 | | unsigned int WaitForCallsToComplete) |
284 | 0 | { |
285 | 0 | WLog_ERR(TAG, "Not implemented"); |
286 | 0 | return 0; |
287 | 0 | } |
288 | | |
289 | | RPC_STATUS RpcServerUnregisterIfEx(RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, |
290 | | int RundownContextHandles) |
291 | 0 | { |
292 | 0 | WLog_ERR(TAG, "Not implemented"); |
293 | 0 | return 0; |
294 | 0 | } |
295 | | |
296 | | RPC_STATUS RpcServerUseAllProtseqs(unsigned int MaxCalls, void* SecurityDescriptor) |
297 | 0 | { |
298 | 0 | WLog_ERR(TAG, "Not implemented"); |
299 | 0 | return 0; |
300 | 0 | } |
301 | | |
302 | | RPC_STATUS RpcServerUseAllProtseqsEx(unsigned int MaxCalls, void* SecurityDescriptor, |
303 | | PRPC_POLICY Policy) |
304 | 0 | { |
305 | 0 | WLog_ERR(TAG, "Not implemented"); |
306 | 0 | return 0; |
307 | 0 | } |
308 | | |
309 | | RPC_STATUS RpcServerUseAllProtseqsIf(unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, |
310 | | void* SecurityDescriptor) |
311 | 0 | { |
312 | 0 | WLog_ERR(TAG, "Not implemented"); |
313 | 0 | return 0; |
314 | 0 | } |
315 | | |
316 | | RPC_STATUS RpcServerUseAllProtseqsIfEx(unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, |
317 | | void* SecurityDescriptor, PRPC_POLICY Policy) |
318 | 0 | { |
319 | 0 | WLog_ERR(TAG, "Not implemented"); |
320 | 0 | return 0; |
321 | 0 | } |
322 | | |
323 | | RPC_STATUS RpcServerUseProtseqA(RPC_CSTR Protseq, unsigned int MaxCalls, void* SecurityDescriptor) |
324 | 0 | { |
325 | 0 | WLog_ERR(TAG, "Not implemented"); |
326 | 0 | return 0; |
327 | 0 | } |
328 | | |
329 | | RPC_STATUS RpcServerUseProtseqExA(RPC_CSTR Protseq, unsigned int MaxCalls, void* SecurityDescriptor, |
330 | | PRPC_POLICY Policy) |
331 | 0 | { |
332 | 0 | WLog_ERR(TAG, "Not implemented"); |
333 | 0 | return 0; |
334 | 0 | } |
335 | | |
336 | | RPC_STATUS RpcServerUseProtseqW(RPC_WSTR Protseq, unsigned int MaxCalls, void* SecurityDescriptor) |
337 | 0 | { |
338 | 0 | WLog_ERR(TAG, "Not implemented"); |
339 | 0 | return 0; |
340 | 0 | } |
341 | | |
342 | | RPC_STATUS RpcServerUseProtseqExW(RPC_WSTR Protseq, unsigned int MaxCalls, void* SecurityDescriptor, |
343 | | PRPC_POLICY Policy) |
344 | 0 | { |
345 | 0 | WLog_ERR(TAG, "Not implemented"); |
346 | 0 | return 0; |
347 | 0 | } |
348 | | |
349 | | RPC_STATUS RpcServerUseProtseqEpA(RPC_CSTR Protseq, unsigned int MaxCalls, RPC_CSTR Endpoint, |
350 | | void* SecurityDescriptor) |
351 | 0 | { |
352 | 0 | WLog_ERR(TAG, "Not implemented"); |
353 | 0 | return 0; |
354 | 0 | } |
355 | | |
356 | | RPC_STATUS RpcServerUseProtseqEpExA(RPC_CSTR Protseq, unsigned int MaxCalls, RPC_CSTR Endpoint, |
357 | | void* SecurityDescriptor, PRPC_POLICY Policy) |
358 | 0 | { |
359 | 0 | WLog_ERR(TAG, "Not implemented"); |
360 | 0 | return 0; |
361 | 0 | } |
362 | | |
363 | | RPC_STATUS RpcServerUseProtseqEpW(RPC_WSTR Protseq, unsigned int MaxCalls, RPC_WSTR Endpoint, |
364 | | void* SecurityDescriptor) |
365 | 0 | { |
366 | 0 | WLog_ERR(TAG, "Not implemented"); |
367 | 0 | return 0; |
368 | 0 | } |
369 | | |
370 | | RPC_STATUS RpcServerUseProtseqEpExW(RPC_WSTR Protseq, unsigned int MaxCalls, RPC_WSTR Endpoint, |
371 | | void* SecurityDescriptor, PRPC_POLICY Policy) |
372 | 0 | { |
373 | 0 | WLog_ERR(TAG, "Not implemented"); |
374 | 0 | return 0; |
375 | 0 | } |
376 | | |
377 | | RPC_STATUS RpcServerUseProtseqIfA(RPC_CSTR Protseq, unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, |
378 | | void* SecurityDescriptor) |
379 | 0 | { |
380 | 0 | WLog_ERR(TAG, "Not implemented"); |
381 | 0 | return 0; |
382 | 0 | } |
383 | | |
384 | | RPC_STATUS RpcServerUseProtseqIfExA(RPC_CSTR Protseq, unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, |
385 | | void* SecurityDescriptor, PRPC_POLICY Policy) |
386 | 0 | { |
387 | 0 | WLog_ERR(TAG, "Not implemented"); |
388 | 0 | return 0; |
389 | 0 | } |
390 | | |
391 | | RPC_STATUS RpcServerUseProtseqIfW(RPC_WSTR Protseq, unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, |
392 | | void* SecurityDescriptor) |
393 | 0 | { |
394 | 0 | WLog_ERR(TAG, "Not implemented"); |
395 | 0 | return 0; |
396 | 0 | } |
397 | | |
398 | | RPC_STATUS RpcServerUseProtseqIfExW(RPC_WSTR Protseq, unsigned int MaxCalls, RPC_IF_HANDLE IfSpec, |
399 | | void* SecurityDescriptor, PRPC_POLICY Policy) |
400 | 0 | { |
401 | 0 | WLog_ERR(TAG, "Not implemented"); |
402 | 0 | return 0; |
403 | 0 | } |
404 | | |
405 | | void RpcServerYield(void) |
406 | 0 | { |
407 | 0 | WLog_ERR(TAG, "Not implemented"); |
408 | 0 | } |
409 | | |
410 | | RPC_STATUS RpcMgmtStatsVectorFree(RPC_STATS_VECTOR** StatsVector) |
411 | 0 | { |
412 | 0 | WLog_ERR(TAG, "Not implemented"); |
413 | 0 | return 0; |
414 | 0 | } |
415 | | |
416 | | RPC_STATUS RpcMgmtInqStats(RPC_BINDING_HANDLE Binding, RPC_STATS_VECTOR** Statistics) |
417 | 0 | { |
418 | 0 | WLog_ERR(TAG, "Not implemented"); |
419 | 0 | return 0; |
420 | 0 | } |
421 | | |
422 | | RPC_STATUS RpcMgmtIsServerListening(RPC_BINDING_HANDLE Binding) |
423 | 0 | { |
424 | 0 | WLog_ERR(TAG, "Not implemented"); |
425 | 0 | return 0; |
426 | 0 | } |
427 | | |
428 | | RPC_STATUS RpcMgmtStopServerListening(RPC_BINDING_HANDLE Binding) |
429 | 0 | { |
430 | 0 | WLog_ERR(TAG, "Not implemented"); |
431 | 0 | return 0; |
432 | 0 | } |
433 | | |
434 | | RPC_STATUS RpcMgmtWaitServerListen(void) |
435 | 0 | { |
436 | 0 | WLog_ERR(TAG, "Not implemented"); |
437 | 0 | return 0; |
438 | 0 | } |
439 | | |
440 | | RPC_STATUS RpcMgmtSetServerStackSize(unsigned long ThreadStackSize) |
441 | 0 | { |
442 | 0 | WLog_ERR(TAG, "Not implemented"); |
443 | 0 | return 0; |
444 | 0 | } |
445 | | |
446 | | void RpcSsDontSerializeContext(void) |
447 | 0 | { |
448 | 0 | WLog_ERR(TAG, "Not implemented"); |
449 | 0 | } |
450 | | |
451 | | RPC_STATUS RpcMgmtEnableIdleCleanup(void) |
452 | 0 | { |
453 | 0 | WLog_ERR(TAG, "Not implemented"); |
454 | 0 | return 0; |
455 | 0 | } |
456 | | |
457 | | RPC_STATUS RpcMgmtInqIfIds(RPC_BINDING_HANDLE Binding, RPC_IF_ID_VECTOR** IfIdVector) |
458 | 0 | { |
459 | 0 | WLog_ERR(TAG, "Not implemented"); |
460 | 0 | return 0; |
461 | 0 | } |
462 | | |
463 | | RPC_STATUS RpcIfIdVectorFree(RPC_IF_ID_VECTOR** IfIdVector) |
464 | 0 | { |
465 | 0 | WLog_ERR(TAG, "Not implemented"); |
466 | 0 | return 0; |
467 | 0 | } |
468 | | |
469 | | RPC_STATUS RpcMgmtInqServerPrincNameA(RPC_BINDING_HANDLE Binding, unsigned long AuthnSvc, |
470 | | RPC_CSTR* ServerPrincName) |
471 | 0 | { |
472 | 0 | WLog_ERR(TAG, "Not implemented"); |
473 | 0 | return 0; |
474 | 0 | } |
475 | | |
476 | | RPC_STATUS RpcMgmtInqServerPrincNameW(RPC_BINDING_HANDLE Binding, unsigned long AuthnSvc, |
477 | | RPC_WSTR* ServerPrincName) |
478 | 0 | { |
479 | 0 | WLog_ERR(TAG, "Not implemented"); |
480 | 0 | return 0; |
481 | 0 | } |
482 | | |
483 | | RPC_STATUS RpcServerInqDefaultPrincNameA(unsigned long AuthnSvc, RPC_CSTR* PrincName) |
484 | 0 | { |
485 | 0 | WLog_ERR(TAG, "Not implemented"); |
486 | 0 | return 0; |
487 | 0 | } |
488 | | |
489 | | RPC_STATUS RpcServerInqDefaultPrincNameW(unsigned long AuthnSvc, RPC_WSTR* PrincName) |
490 | 0 | { |
491 | 0 | WLog_ERR(TAG, "Not implemented"); |
492 | 0 | return 0; |
493 | 0 | } |
494 | | |
495 | | RPC_STATUS RpcEpResolveBinding(RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE IfSpec) |
496 | 0 | { |
497 | 0 | WLog_ERR(TAG, "Not implemented"); |
498 | 0 | return 0; |
499 | 0 | } |
500 | | |
501 | | RPC_STATUS RpcNsBindingInqEntryNameA(RPC_BINDING_HANDLE Binding, unsigned long EntryNameSyntax, |
502 | | RPC_CSTR* EntryName) |
503 | 0 | { |
504 | 0 | WLog_ERR(TAG, "Not implemented"); |
505 | 0 | return 0; |
506 | 0 | } |
507 | | |
508 | | RPC_STATUS RpcNsBindingInqEntryNameW(RPC_BINDING_HANDLE Binding, unsigned long EntryNameSyntax, |
509 | | RPC_WSTR* EntryName) |
510 | 0 | { |
511 | 0 | WLog_ERR(TAG, "Not implemented"); |
512 | 0 | return 0; |
513 | 0 | } |
514 | | |
515 | | RPC_STATUS RpcImpersonateClient(RPC_BINDING_HANDLE BindingHandle) |
516 | 0 | { |
517 | 0 | WLog_ERR(TAG, "Not implemented"); |
518 | 0 | return 0; |
519 | 0 | } |
520 | | |
521 | | RPC_STATUS RpcRevertToSelfEx(RPC_BINDING_HANDLE BindingHandle) |
522 | 0 | { |
523 | 0 | WLog_ERR(TAG, "Not implemented"); |
524 | 0 | return 0; |
525 | 0 | } |
526 | | |
527 | | RPC_STATUS RpcRevertToSelf(void) |
528 | 0 | { |
529 | 0 | WLog_ERR(TAG, "Not implemented"); |
530 | 0 | return 0; |
531 | 0 | } |
532 | | |
533 | | RPC_STATUS RpcBindingInqAuthClientA(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE* Privs, |
534 | | RPC_CSTR* ServerPrincName, unsigned long* AuthnLevel, |
535 | | unsigned long* AuthnSvc, unsigned long* AuthzSvc) |
536 | 0 | { |
537 | 0 | WLog_ERR(TAG, "Not implemented"); |
538 | 0 | return 0; |
539 | 0 | } |
540 | | |
541 | | RPC_STATUS RpcBindingInqAuthClientW(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE* Privs, |
542 | | RPC_WSTR* ServerPrincName, unsigned long* AuthnLevel, |
543 | | unsigned long* AuthnSvc, unsigned long* AuthzSvc) |
544 | 0 | { |
545 | 0 | WLog_ERR(TAG, "Not implemented"); |
546 | 0 | return 0; |
547 | 0 | } |
548 | | |
549 | | RPC_STATUS RpcBindingInqAuthClientExA(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE* Privs, |
550 | | RPC_CSTR* ServerPrincName, unsigned long* AuthnLevel, |
551 | | unsigned long* AuthnSvc, unsigned long* AuthzSvc, |
552 | | unsigned long Flags) |
553 | 0 | { |
554 | 0 | WLog_ERR(TAG, "Not implemented"); |
555 | 0 | return 0; |
556 | 0 | } |
557 | | |
558 | | RPC_STATUS RpcBindingInqAuthClientExW(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE* Privs, |
559 | | RPC_WSTR* ServerPrincName, unsigned long* AuthnLevel, |
560 | | unsigned long* AuthnSvc, unsigned long* AuthzSvc, |
561 | | unsigned long Flags) |
562 | 0 | { |
563 | 0 | WLog_ERR(TAG, "Not implemented"); |
564 | 0 | return 0; |
565 | 0 | } |
566 | | |
567 | | RPC_STATUS RpcBindingInqAuthInfoA(RPC_BINDING_HANDLE Binding, RPC_CSTR* ServerPrincName, |
568 | | unsigned long* AuthnLevel, unsigned long* AuthnSvc, |
569 | | RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, unsigned long* AuthzSvc) |
570 | 0 | { |
571 | 0 | WLog_ERR(TAG, "Not implemented"); |
572 | 0 | return 0; |
573 | 0 | } |
574 | | |
575 | | RPC_STATUS RpcBindingInqAuthInfoW(RPC_BINDING_HANDLE Binding, RPC_WSTR* ServerPrincName, |
576 | | unsigned long* AuthnLevel, unsigned long* AuthnSvc, |
577 | | RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, unsigned long* AuthzSvc) |
578 | 0 | { |
579 | 0 | WLog_ERR(TAG, "Not implemented"); |
580 | 0 | return 0; |
581 | 0 | } |
582 | | |
583 | | RPC_STATUS RpcBindingSetAuthInfoA(RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName, |
584 | | unsigned long AuthnLevel, unsigned long AuthnSvc, |
585 | | RPC_AUTH_IDENTITY_HANDLE AuthIdentity, unsigned long AuthzSvc) |
586 | 0 | { |
587 | 0 | WLog_ERR(TAG, "Not implemented"); |
588 | 0 | return 0; |
589 | 0 | } |
590 | | |
591 | | RPC_STATUS RpcBindingSetAuthInfoExA(RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName, |
592 | | unsigned long AuthnLevel, unsigned long AuthnSvc, |
593 | | RPC_AUTH_IDENTITY_HANDLE AuthIdentity, unsigned long AuthzSvc, |
594 | | RPC_SECURITY_QOS* SecurityQos) |
595 | 0 | { |
596 | 0 | WLog_ERR(TAG, "Not implemented"); |
597 | 0 | return 0; |
598 | 0 | } |
599 | | |
600 | | RPC_STATUS RpcBindingSetAuthInfoW(RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, |
601 | | unsigned long AuthnLevel, unsigned long AuthnSvc, |
602 | | RPC_AUTH_IDENTITY_HANDLE AuthIdentity, unsigned long AuthzSvc) |
603 | 0 | { |
604 | 0 | WLog_ERR(TAG, "Not implemented"); |
605 | 0 | return 0; |
606 | 0 | } |
607 | | |
608 | | RPC_STATUS RpcBindingSetAuthInfoExW(RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName, |
609 | | unsigned long AuthnLevel, unsigned long AuthnSvc, |
610 | | RPC_AUTH_IDENTITY_HANDLE AuthIdentity, unsigned long AuthzSvc, |
611 | | RPC_SECURITY_QOS* SecurityQOS) |
612 | 0 | { |
613 | 0 | WLog_ERR(TAG, "Not implemented"); |
614 | 0 | return 0; |
615 | 0 | } |
616 | | |
617 | | RPC_STATUS RpcBindingInqAuthInfoExA(RPC_BINDING_HANDLE Binding, RPC_CSTR* ServerPrincName, |
618 | | unsigned long* AuthnLevel, unsigned long* AuthnSvc, |
619 | | RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, unsigned long* AuthzSvc, |
620 | | unsigned long RpcQosVersion, RPC_SECURITY_QOS* SecurityQOS) |
621 | 0 | { |
622 | 0 | WLog_ERR(TAG, "Not implemented"); |
623 | 0 | return 0; |
624 | 0 | } |
625 | | |
626 | | RPC_STATUS RpcBindingInqAuthInfoExW(RPC_BINDING_HANDLE Binding, RPC_WSTR* ServerPrincName, |
627 | | unsigned long* AuthnLevel, unsigned long* AuthnSvc, |
628 | | RPC_AUTH_IDENTITY_HANDLE* AuthIdentity, unsigned long* AuthzSvc, |
629 | | unsigned long RpcQosVersion, RPC_SECURITY_QOS* SecurityQOS) |
630 | 0 | { |
631 | 0 | WLog_ERR(TAG, "Not implemented"); |
632 | 0 | return 0; |
633 | 0 | } |
634 | | |
635 | | RPC_STATUS RpcServerRegisterAuthInfoA(RPC_CSTR ServerPrincName, unsigned long AuthnSvc, |
636 | | RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn, void* Arg) |
637 | 0 | { |
638 | 0 | WLog_ERR(TAG, "Not implemented"); |
639 | 0 | return 0; |
640 | 0 | } |
641 | | |
642 | | RPC_STATUS RpcServerRegisterAuthInfoW(RPC_WSTR ServerPrincName, unsigned long AuthnSvc, |
643 | | RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn, void* Arg) |
644 | 0 | { |
645 | 0 | WLog_ERR(TAG, "Not implemented"); |
646 | 0 | return 0; |
647 | 0 | } |
648 | | |
649 | | RPC_STATUS RpcBindingServerFromClient(RPC_BINDING_HANDLE ClientBinding, |
650 | | RPC_BINDING_HANDLE* ServerBinding) |
651 | 0 | { |
652 | 0 | WLog_ERR(TAG, "Not implemented"); |
653 | 0 | return 0; |
654 | 0 | } |
655 | | |
656 | | void RpcRaiseException(RPC_STATUS exception) |
657 | 0 | { |
658 | 0 | WLog_ERR(TAG, "RpcRaiseException: 0x%08luX", exception); |
659 | 0 | exit((int)exception); |
660 | 0 | } |
661 | | |
662 | | RPC_STATUS RpcTestCancel(void) |
663 | 0 | { |
664 | 0 | WLog_ERR(TAG, "Not implemented"); |
665 | 0 | return 0; |
666 | 0 | } |
667 | | |
668 | | RPC_STATUS RpcServerTestCancel(RPC_BINDING_HANDLE BindingHandle) |
669 | 0 | { |
670 | 0 | WLog_ERR(TAG, "Not implemented"); |
671 | 0 | return 0; |
672 | 0 | } |
673 | | |
674 | | RPC_STATUS RpcCancelThread(void* Thread) |
675 | 0 | { |
676 | 0 | WLog_ERR(TAG, "Not implemented"); |
677 | 0 | return 0; |
678 | 0 | } |
679 | | |
680 | | RPC_STATUS RpcCancelThreadEx(void* Thread, long Timeout) |
681 | 0 | { |
682 | 0 | WLog_ERR(TAG, "Not implemented"); |
683 | 0 | return 0; |
684 | 0 | } |
685 | | |
686 | | /** |
687 | | * UUID Functions |
688 | | */ |
689 | | |
690 | | static UUID UUID_NIL = { |
691 | | 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } |
692 | | }; |
693 | | |
694 | | RPC_STATUS UuidCreate(UUID* Uuid) |
695 | 0 | { |
696 | 0 | winpr_RAND_pseudo(Uuid, 16); |
697 | 0 | return RPC_S_OK; |
698 | 0 | } |
699 | | |
700 | | RPC_STATUS UuidCreateSequential(UUID* Uuid) |
701 | 0 | { |
702 | 0 | winpr_RAND_pseudo(Uuid, 16); |
703 | 0 | return RPC_S_OK; |
704 | 0 | } |
705 | | |
706 | | RPC_STATUS UuidToStringA(const UUID* Uuid, RPC_CSTR* StringUuid) |
707 | 0 | { |
708 | 0 | *StringUuid = (RPC_CSTR)malloc(36 + 1); |
709 | |
|
710 | 0 | if (!(*StringUuid)) |
711 | 0 | return RPC_S_OUT_OF_MEMORY; |
712 | | |
713 | 0 | if (!Uuid) |
714 | 0 | Uuid = &UUID_NIL; |
715 | | |
716 | | /** |
717 | | * Format is 32 hex digits partitioned in 5 groups: |
718 | | * xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
719 | | */ |
720 | 0 | sprintf_s((char*)*StringUuid, 36 + 1, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", |
721 | 0 | Uuid->Data1, Uuid->Data2, Uuid->Data3, Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2], |
722 | 0 | Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5], Uuid->Data4[6], Uuid->Data4[7]); |
723 | 0 | return RPC_S_OK; |
724 | 0 | } |
725 | | |
726 | | RPC_STATUS UuidToStringW(const UUID* Uuid, RPC_WSTR* StringUuid) |
727 | 0 | { |
728 | 0 | WLog_ERR(TAG, "Not implemented"); |
729 | 0 | return 0; |
730 | 0 | } |
731 | | |
732 | | RPC_STATUS UuidFromStringA(RPC_CSTR StringUuid, UUID* Uuid) |
733 | 0 | { |
734 | 0 | int index; |
735 | 0 | BYTE bin[36]; |
736 | |
|
737 | 0 | if (!StringUuid) |
738 | 0 | return UuidCreateNil(Uuid); |
739 | | |
740 | 0 | if (strlen((char*)StringUuid) != 36) |
741 | 0 | return RPC_S_INVALID_STRING_UUID; |
742 | | |
743 | 0 | if ((StringUuid[8] != '-') || (StringUuid[13] != '-') || (StringUuid[18] != '-') || |
744 | 0 | (StringUuid[23] != '-')) |
745 | 0 | { |
746 | 0 | return RPC_S_INVALID_STRING_UUID; |
747 | 0 | } |
748 | | |
749 | 0 | for (index = 0; index < 36; index++) |
750 | 0 | { |
751 | 0 | if ((index == 8) || (index == 13) || (index == 18) || (index == 23)) |
752 | 0 | continue; |
753 | | |
754 | 0 | if ((StringUuid[index] >= '0') && (StringUuid[index] <= '9')) |
755 | 0 | bin[index] = StringUuid[index] - '0'; |
756 | 0 | else if ((StringUuid[index] >= 'a') && (StringUuid[index] <= 'f')) |
757 | 0 | bin[index] = StringUuid[index] - 'a' + 10; |
758 | 0 | else if ((StringUuid[index] >= 'A') && (StringUuid[index] <= 'F')) |
759 | 0 | bin[index] = StringUuid[index] - 'A' + 10; |
760 | 0 | else |
761 | 0 | return RPC_S_INVALID_STRING_UUID; |
762 | 0 | } |
763 | | |
764 | 0 | Uuid->Data1 = ((bin[0] << 28) | (bin[1] << 24) | (bin[2] << 20) | (bin[3] << 16) | |
765 | 0 | (bin[4] << 12) | (bin[5] << 8) | (bin[6] << 4) | bin[7]); |
766 | 0 | Uuid->Data2 = ((bin[9] << 12) | (bin[10] << 8) | (bin[11] << 4) | bin[12]); |
767 | 0 | Uuid->Data3 = ((bin[14] << 12) | (bin[15] << 8) | (bin[16] << 4) | bin[17]); |
768 | 0 | Uuid->Data4[0] = ((bin[19] << 4) | bin[20]); |
769 | 0 | Uuid->Data4[1] = ((bin[21] << 4) | bin[22]); |
770 | 0 | Uuid->Data4[2] = ((bin[24] << 4) | bin[25]); |
771 | 0 | Uuid->Data4[3] = ((bin[26] << 4) | bin[27]); |
772 | 0 | Uuid->Data4[4] = ((bin[28] << 4) | bin[29]); |
773 | 0 | Uuid->Data4[5] = ((bin[30] << 4) | bin[31]); |
774 | 0 | Uuid->Data4[6] = ((bin[32] << 4) | bin[33]); |
775 | 0 | Uuid->Data4[7] = ((bin[34] << 4) | bin[35]); |
776 | 0 | return RPC_S_OK; |
777 | 0 | } |
778 | | |
779 | | RPC_STATUS UuidFromStringW(RPC_WSTR StringUuid, UUID* Uuid) |
780 | 0 | { |
781 | 0 | WLog_ERR(TAG, "Not implemented"); |
782 | 0 | return 0; |
783 | 0 | } |
784 | | |
785 | | signed int UuidCompare(const UUID* Uuid1, const UUID* Uuid2, RPC_STATUS* Status) |
786 | 0 | { |
787 | 0 | int index; |
788 | 0 | *Status = RPC_S_OK; |
789 | |
|
790 | 0 | if (!Uuid1) |
791 | 0 | Uuid1 = &UUID_NIL; |
792 | |
|
793 | 0 | if (!Uuid2) |
794 | 0 | Uuid2 = &UUID_NIL; |
795 | |
|
796 | 0 | if (Uuid1->Data1 != Uuid2->Data1) |
797 | 0 | return (Uuid1->Data1 < Uuid2->Data1) ? -1 : 1; |
798 | | |
799 | 0 | if (Uuid1->Data2 != Uuid2->Data2) |
800 | 0 | return (Uuid1->Data2 < Uuid2->Data2) ? -1 : 1; |
801 | | |
802 | 0 | if (Uuid1->Data3 != Uuid2->Data3) |
803 | 0 | return (Uuid1->Data3 < Uuid2->Data3) ? -1 : 1; |
804 | | |
805 | 0 | for (index = 0; index < 8; index++) |
806 | 0 | { |
807 | 0 | if (Uuid1->Data4[index] != Uuid2->Data4[index]) |
808 | 0 | return (Uuid1->Data4[index] < Uuid2->Data4[index]) ? -1 : 1; |
809 | 0 | } |
810 | | |
811 | 0 | return 0; |
812 | 0 | } |
813 | | |
814 | | RPC_STATUS UuidCreateNil(UUID* NilUuid) |
815 | 0 | { |
816 | 0 | CopyMemory((void*)NilUuid, (void*)&UUID_NIL, 16); |
817 | 0 | return RPC_S_OK; |
818 | 0 | } |
819 | | |
820 | | int UuidEqual(const UUID* Uuid1, const UUID* Uuid2, RPC_STATUS* Status) |
821 | 0 | { |
822 | 0 | return ((UuidCompare(Uuid1, Uuid2, Status) == 0) ? TRUE : FALSE); |
823 | 0 | } |
824 | | |
825 | | unsigned short UuidHash(const UUID* Uuid, RPC_STATUS* Status) |
826 | 0 | { |
827 | 0 | WLog_ERR(TAG, "Not implemented"); |
828 | 0 | return 0; |
829 | 0 | } |
830 | | |
831 | | int UuidIsNil(const UUID* Uuid, RPC_STATUS* Status) |
832 | 0 | { |
833 | 0 | return UuidEqual(Uuid, &UUID_NIL, Status); |
834 | 0 | } |
835 | | |
836 | | RPC_STATUS RpcEpRegisterNoReplaceA(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector, |
837 | | UUID_VECTOR* UuidVector, RPC_CSTR Annotation) |
838 | 0 | { |
839 | 0 | WLog_ERR(TAG, "Not implemented"); |
840 | 0 | return 0; |
841 | 0 | } |
842 | | |
843 | | RPC_STATUS RpcEpRegisterNoReplaceW(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector, |
844 | | UUID_VECTOR* UuidVector, RPC_WSTR Annotation) |
845 | 0 | { |
846 | 0 | WLog_ERR(TAG, "Not implemented"); |
847 | 0 | return 0; |
848 | 0 | } |
849 | | |
850 | | RPC_STATUS RpcEpRegisterA(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector, |
851 | | UUID_VECTOR* UuidVector, RPC_CSTR Annotation) |
852 | 0 | { |
853 | 0 | WLog_ERR(TAG, "Not implemented"); |
854 | 0 | return 0; |
855 | 0 | } |
856 | | |
857 | | RPC_STATUS RpcEpRegisterW(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector, |
858 | | UUID_VECTOR* UuidVector, RPC_WSTR Annotation) |
859 | 0 | { |
860 | 0 | WLog_ERR(TAG, "Not implemented"); |
861 | 0 | return 0; |
862 | 0 | } |
863 | | |
864 | | RPC_STATUS RpcEpUnregister(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector, |
865 | | UUID_VECTOR* UuidVector) |
866 | 0 | { |
867 | 0 | WLog_ERR(TAG, "Not implemented"); |
868 | 0 | return 0; |
869 | 0 | } |
870 | | |
871 | | RPC_STATUS DceErrorInqTextA(RPC_STATUS RpcStatus, RPC_CSTR ErrorText) |
872 | 0 | { |
873 | 0 | WLog_ERR(TAG, "Not implemented"); |
874 | 0 | return 0; |
875 | 0 | } |
876 | | |
877 | | RPC_STATUS DceErrorInqTextW(RPC_STATUS RpcStatus, RPC_WSTR ErrorText) |
878 | 0 | { |
879 | 0 | WLog_ERR(TAG, "Not implemented"); |
880 | 0 | return 0; |
881 | 0 | } |
882 | | |
883 | | RPC_STATUS RpcMgmtEpEltInqBegin(RPC_BINDING_HANDLE EpBinding, unsigned long InquiryType, |
884 | | RPC_IF_ID* IfId, unsigned long VersOption, UUID* ObjectUuid, |
885 | | RPC_EP_INQ_HANDLE* InquiryContext) |
886 | 0 | { |
887 | 0 | WLog_ERR(TAG, "Not implemented"); |
888 | 0 | return 0; |
889 | 0 | } |
890 | | |
891 | | RPC_STATUS RpcMgmtEpEltInqDone(RPC_EP_INQ_HANDLE* InquiryContext) |
892 | 0 | { |
893 | 0 | WLog_ERR(TAG, "Not implemented"); |
894 | 0 | return 0; |
895 | 0 | } |
896 | | |
897 | | RPC_STATUS RpcMgmtEpEltInqNextA(RPC_EP_INQ_HANDLE InquiryContext, RPC_IF_ID* IfId, |
898 | | RPC_BINDING_HANDLE* Binding, UUID* ObjectUuid, RPC_CSTR* Annotation) |
899 | 0 | { |
900 | 0 | WLog_ERR(TAG, "Not implemented"); |
901 | 0 | return 0; |
902 | 0 | } |
903 | | |
904 | | RPC_STATUS RpcMgmtEpEltInqNextW(RPC_EP_INQ_HANDLE InquiryContext, RPC_IF_ID* IfId, |
905 | | RPC_BINDING_HANDLE* Binding, UUID* ObjectUuid, RPC_WSTR* Annotation) |
906 | 0 | { |
907 | 0 | WLog_ERR(TAG, "Not implemented"); |
908 | 0 | return 0; |
909 | 0 | } |
910 | | |
911 | | RPC_STATUS RpcMgmtEpUnregister(RPC_BINDING_HANDLE EpBinding, RPC_IF_ID* IfId, |
912 | | RPC_BINDING_HANDLE Binding, UUID* ObjectUuid) |
913 | 0 | { |
914 | 0 | WLog_ERR(TAG, "Not implemented"); |
915 | 0 | return 0; |
916 | 0 | } |
917 | | |
918 | | RPC_STATUS RpcMgmtSetAuthorizationFn(RPC_MGMT_AUTHORIZATION_FN AuthorizationFn) |
919 | 0 | { |
920 | 0 | WLog_ERR(TAG, "Not implemented"); |
921 | 0 | return 0; |
922 | 0 | } |
923 | | |
924 | | RPC_STATUS RpcServerInqBindingHandle(RPC_BINDING_HANDLE* Binding) |
925 | 0 | { |
926 | 0 | WLog_ERR(TAG, "Not implemented"); |
927 | 0 | return 0; |
928 | 0 | } |
929 | | |
930 | | #endif |