Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2206 lines
52 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. rpcdce.h
  5. Abstract:
  6. This module contains the DCE RPC runtime APIs.
  7. --*/
  8. #ifndef __RPCDCE_H__
  9. #define __RPCDCE_H__
  10. #if _MSC_VER > 1000
  11. #pragma once
  12. #endif
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #ifndef IN
  17. #define IN
  18. #endif
  19. #ifndef OUT
  20. #define OUT
  21. #endif
  22. #ifndef OPTIONAL
  23. #define OPTIONAL
  24. #endif
  25. #ifndef DECLSPEC_NORETURN
  26. #if (_MSC_VER >= 1200) && !defined(MIDL_PASS)
  27. #define DECLSPEC_NORETURN __declspec(noreturn)
  28. #else
  29. #define DECLSPEC_NORETURN
  30. #endif
  31. #endif
  32. /*typedef char small;*/
  33. /*typedef unsigned char byte;*/
  34. /*typedef unsigned char boolean;*/
  35. typedef I_RPC_HANDLE RPC_BINDING_HANDLE;
  36. typedef RPC_BINDING_HANDLE handle_t;
  37. #define rpc_binding_handle_t RPC_BINDING_HANDLE
  38. #ifndef GUID_DEFINED
  39. #include <guiddef.h>
  40. #endif /* GUID_DEFINED */
  41. #ifndef UUID_DEFINED
  42. #define UUID_DEFINED
  43. typedef GUID UUID;
  44. #ifndef uuid_t
  45. #define uuid_t UUID
  46. #endif
  47. #endif
  48. typedef struct _RPC_BINDING_VECTOR
  49. {
  50. unsigned long Count;
  51. RPC_BINDING_HANDLE BindingH[1];
  52. } RPC_BINDING_VECTOR;
  53. #ifndef rpc_binding_vector_t
  54. #define rpc_binding_vector_t RPC_BINDING_VECTOR
  55. #endif
  56. typedef struct _UUID_VECTOR
  57. {
  58. unsigned long Count;
  59. UUID *Uuid[1];
  60. } UUID_VECTOR;
  61. #ifndef uuid_vector_t
  62. #define uuid_vector_t UUID_VECTOR
  63. #endif
  64. typedef void __RPC_FAR * RPC_IF_HANDLE;
  65. #ifndef IFID_DEFINED
  66. #define IFID_DEFINED
  67. typedef struct _RPC_IF_ID
  68. {
  69. UUID Uuid;
  70. unsigned short VersMajor;
  71. unsigned short VersMinor;
  72. } RPC_IF_ID;
  73. #endif
  74. #define RPC_C_BINDING_INFINITE_TIMEOUT 10
  75. #define RPC_C_BINDING_MIN_TIMEOUT 0
  76. #define RPC_C_BINDING_DEFAULT_TIMEOUT 5
  77. #define RPC_C_BINDING_MAX_TIMEOUT 9
  78. #define RPC_C_CANCEL_INFINITE_TIMEOUT -1
  79. #define RPC_C_LISTEN_MAX_CALLS_DEFAULT 1234
  80. #define RPC_C_PROTSEQ_MAX_REQS_DEFAULT 10
  81. // RPC_POLICY EndpointFlags.
  82. #define RPC_C_BIND_TO_ALL_NICS 1
  83. #define RPC_C_USE_INTERNET_PORT 0x1
  84. #define RPC_C_USE_INTRANET_PORT 0x2
  85. #define RPC_C_DONT_FAIL 0x4
  86. // RPC_POLICY EndpointFlags specific to the Falcon/RPC transport:
  87. #define RPC_C_MQ_TEMPORARY 0x0000
  88. #define RPC_C_MQ_PERMANENT 0x0001
  89. #define RPC_C_MQ_CLEAR_ON_OPEN 0x0002
  90. #define RPC_C_MQ_USE_EXISTING_SECURITY 0x0004
  91. #define RPC_C_MQ_AUTHN_LEVEL_NONE 0x0000
  92. #define RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY 0x0008
  93. #define RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY 0x0010
  94. // Client: RpcBindingSetOption() values for the Falcon/RPC transport:
  95. #define RPC_C_OPT_MQ_DELIVERY 1
  96. #define RPC_C_OPT_MQ_PRIORITY 2
  97. #define RPC_C_OPT_MQ_JOURNAL 3
  98. #define RPC_C_OPT_MQ_ACKNOWLEDGE 4
  99. #define RPC_C_OPT_MQ_AUTHN_SERVICE 5
  100. #define RPC_C_OPT_MQ_AUTHN_LEVEL 6
  101. #define RPC_C_OPT_MQ_TIME_TO_REACH_QUEUE 7
  102. #define RPC_C_OPT_MQ_TIME_TO_BE_RECEIVED 8
  103. #define RPC_C_OPT_BINDING_NONCAUSAL 9
  104. #define RPC_C_OPT_SECURITY_CALLBACK 10
  105. #define RPC_C_OPT_UNIQUE_BINDING 11
  106. #define RPC_C_OPT_CALL_TIMEOUT 12
  107. #define RPC_C_OPT_DONT_LINGER 13
  108. #define RPC_C_OPT_MAX_OPTIONS 14
  109. #define RPC_C_MQ_EXPRESS 0 // Client: RPC_C_MQ_DELIVERY.
  110. #define RPC_C_MQ_RECOVERABLE 1
  111. #define RPC_C_MQ_JOURNAL_NONE 0 // Client: RPC_C_MQ_JOURNAL.
  112. #define RPC_C_MQ_JOURNAL_DEADLETTER 1
  113. #define RPC_C_MQ_JOURNAL_ALWAYS 2
  114. // flags for RpcServerInqAuthClientEx
  115. //
  116. #define RPC_C_FULL_CERT_CHAIN 0x0001
  117. #ifdef RPC_UNICODE_SUPPORTED
  118. typedef struct _RPC_PROTSEQ_VECTORA
  119. {
  120. unsigned int Count;
  121. unsigned char __RPC_FAR * Protseq[1];
  122. } RPC_PROTSEQ_VECTORA;
  123. typedef struct _RPC_PROTSEQ_VECTORW
  124. {
  125. unsigned int Count;
  126. unsigned short __RPC_FAR * Protseq[1];
  127. } RPC_PROTSEQ_VECTORW;
  128. #ifdef UNICODE
  129. #define RPC_PROTSEQ_VECTOR RPC_PROTSEQ_VECTORW
  130. #else /* UNICODE */
  131. #define RPC_PROTSEQ_VECTOR RPC_PROTSEQ_VECTORA
  132. #endif /* UNICODE */
  133. #else /* RPC_UNICODE_SUPPORTED */
  134. typedef struct _RPC_PROTSEQ_VECTOR
  135. {
  136. unsigned int Count;
  137. unsigned char __RPC_FAR * Protseq[1];
  138. } RPC_PROTSEQ_VECTOR;
  139. #endif /* RPC_UNICODE_SUPPORTED */
  140. typedef struct _RPC_POLICY {
  141. unsigned int Length ;
  142. unsigned long EndpointFlags ;
  143. unsigned long NICFlags ;
  144. } RPC_POLICY, __RPC_FAR *PRPC_POLICY ;
  145. typedef void __RPC_USER
  146. RPC_OBJECT_INQ_FN (
  147. IN UUID __RPC_FAR * ObjectUuid,
  148. OUT UUID __RPC_FAR * TypeUuid,
  149. OUT RPC_STATUS __RPC_FAR * Status
  150. );
  151. typedef RPC_STATUS RPC_ENTRY
  152. RPC_IF_CALLBACK_FN (
  153. IN RPC_IF_HANDLE InterfaceUuid,
  154. IN void *Context
  155. ) ;
  156. typedef void RPC_ENTRY
  157. RPC_SECURITY_CALLBACK_FN (
  158. IN void *Context
  159. ) ;
  160. #define RPC_MGR_EPV void
  161. typedef struct
  162. {
  163. unsigned int Count;
  164. unsigned long Stats[1];
  165. } RPC_STATS_VECTOR;
  166. #define RPC_C_STATS_CALLS_IN 0
  167. #define RPC_C_STATS_CALLS_OUT 1
  168. #define RPC_C_STATS_PKTS_IN 2
  169. #define RPC_C_STATS_PKTS_OUT 3
  170. typedef struct
  171. {
  172. unsigned long Count;
  173. RPC_IF_ID __RPC_FAR * IfId[1];
  174. } RPC_IF_ID_VECTOR;
  175. /* client */
  176. RPCRTAPI
  177. RPC_STATUS
  178. RPC_ENTRY
  179. RpcBindingCopy (
  180. IN RPC_BINDING_HANDLE SourceBinding,
  181. OUT RPC_BINDING_HANDLE __RPC_FAR * DestinationBinding
  182. );
  183. /* client */
  184. RPCRTAPI
  185. RPC_STATUS
  186. RPC_ENTRY
  187. RpcBindingFree (
  188. IN OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
  189. );
  190. /* client */
  191. RPCRTAPI
  192. RPC_STATUS
  193. RPC_ENTRY
  194. RpcBindingSetOption( IN RPC_BINDING_HANDLE hBinding,
  195. IN unsigned long option,
  196. IN ULONG_PTR optionValue );
  197. /* client */
  198. RPCRTAPI
  199. RPC_STATUS
  200. RPC_ENTRY
  201. RpcBindingInqOption( IN RPC_BINDING_HANDLE hBinding,
  202. IN unsigned long option,
  203. OUT ULONG_PTR *pOptionValue );
  204. /* client */
  205. #ifdef RPC_UNICODE_SUPPORTED
  206. RPCRTAPI
  207. RPC_STATUS
  208. RPC_ENTRY
  209. RpcBindingFromStringBindingA (
  210. IN unsigned char __RPC_FAR * StringBinding,
  211. OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
  212. );
  213. RPCRTAPI
  214. RPC_STATUS
  215. RPC_ENTRY
  216. RpcBindingFromStringBindingW (
  217. IN unsigned short __RPC_FAR * StringBinding,
  218. OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
  219. );
  220. #ifdef UNICODE
  221. #define RpcBindingFromStringBinding RpcBindingFromStringBindingW
  222. #else /* UNICODE */
  223. #define RpcBindingFromStringBinding RpcBindingFromStringBindingA
  224. #endif /* UNICODE */
  225. #else /* RPC_UNICODE_SUPPORTED */
  226. RPCRTAPI
  227. RPC_STATUS
  228. RPC_ENTRY
  229. RpcBindingFromStringBinding (
  230. IN unsigned char __RPC_FAR * StringBinding,
  231. OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
  232. );
  233. #endif /* RPC_UNICODE_SUPPORTED */
  234. /* client */
  235. RPCRTAPI
  236. RPC_STATUS
  237. RPC_ENTRY
  238. RpcSsGetContextBinding (
  239. IN void *ContextHandle,
  240. OUT RPC_BINDING_HANDLE __RPC_FAR * Binding
  241. );
  242. /* client/server */
  243. RPCRTAPI
  244. RPC_STATUS
  245. RPC_ENTRY
  246. RpcBindingInqObject (
  247. IN RPC_BINDING_HANDLE Binding,
  248. OUT UUID __RPC_FAR * ObjectUuid
  249. );
  250. /* client */
  251. RPCRTAPI
  252. RPC_STATUS
  253. RPC_ENTRY
  254. RpcBindingReset (
  255. IN RPC_BINDING_HANDLE Binding
  256. );
  257. /* RpcBindingServerFromClient : UNSUPPORTED */
  258. /* RpcBindingSetAuthInfo */
  259. /* client */
  260. RPCRTAPI
  261. RPC_STATUS
  262. RPC_ENTRY
  263. RpcBindingSetObject (
  264. IN RPC_BINDING_HANDLE Binding,
  265. IN UUID __RPC_FAR * ObjectUuid
  266. );
  267. /* client/server */
  268. RPCRTAPI
  269. RPC_STATUS
  270. RPC_ENTRY
  271. RpcMgmtInqDefaultProtectLevel(
  272. IN unsigned long AuthnSvc,
  273. OUT unsigned long __RPC_FAR *AuthnLevel
  274. );
  275. /* client/server */
  276. #ifdef RPC_UNICODE_SUPPORTED
  277. RPCRTAPI
  278. RPC_STATUS
  279. RPC_ENTRY
  280. RpcBindingToStringBindingA (
  281. IN RPC_BINDING_HANDLE Binding,
  282. OUT unsigned char __RPC_FAR * __RPC_FAR * StringBinding
  283. );
  284. RPCRTAPI
  285. RPC_STATUS
  286. RPC_ENTRY
  287. RpcBindingToStringBindingW (
  288. IN RPC_BINDING_HANDLE Binding,
  289. OUT unsigned short __RPC_FAR * __RPC_FAR * StringBinding
  290. );
  291. #ifdef UNICODE
  292. #define RpcBindingToStringBinding RpcBindingToStringBindingW
  293. #else /* UNICODE */
  294. #define RpcBindingToStringBinding RpcBindingToStringBindingA
  295. #endif /* UNICODE */
  296. #else /* RPC_UNICODE_SUPPORTED */
  297. RPCRTAPI
  298. RPC_STATUS
  299. RPC_ENTRY
  300. RpcBindingToStringBinding (
  301. IN RPC_BINDING_HANDLE Binding,
  302. OUT unsigned char __RPC_FAR * __RPC_FAR * StringBinding
  303. );
  304. #endif /* RPC_UNICODE_SUPPORTED */
  305. /* client/server */
  306. RPCRTAPI
  307. RPC_STATUS
  308. RPC_ENTRY
  309. RpcBindingVectorFree (
  310. IN OUT RPC_BINDING_VECTOR __RPC_FAR * __RPC_FAR * BindingVector
  311. );
  312. /* client/server */
  313. #ifdef RPC_UNICODE_SUPPORTED
  314. RPCRTAPI
  315. RPC_STATUS
  316. RPC_ENTRY
  317. RpcStringBindingComposeA (
  318. IN unsigned char __RPC_FAR * ObjUuid OPTIONAL,
  319. IN unsigned char __RPC_FAR * Protseq OPTIONAL,
  320. IN unsigned char __RPC_FAR * NetworkAddr OPTIONAL,
  321. IN unsigned char __RPC_FAR * Endpoint OPTIONAL,
  322. IN unsigned char __RPC_FAR * Options OPTIONAL,
  323. OUT unsigned char __RPC_FAR * __RPC_FAR * StringBinding OPTIONAL
  324. );
  325. RPCRTAPI
  326. RPC_STATUS
  327. RPC_ENTRY
  328. RpcStringBindingComposeW (
  329. IN unsigned short __RPC_FAR * ObjUuid OPTIONAL,
  330. IN unsigned short __RPC_FAR * Protseq OPTIONAL,
  331. IN unsigned short __RPC_FAR * NetworkAddr OPTIONAL,
  332. IN unsigned short __RPC_FAR * Endpoint OPTIONAL,
  333. IN unsigned short __RPC_FAR * Options OPTIONAL,
  334. OUT unsigned short __RPC_FAR * __RPC_FAR * StringBinding OPTIONAL
  335. );
  336. #ifdef UNICODE
  337. #define RpcStringBindingCompose RpcStringBindingComposeW
  338. #else /* UNICODE */
  339. #define RpcStringBindingCompose RpcStringBindingComposeA
  340. #endif /* UNICODE */
  341. #else /* RPC_UNICODE_SUPPORTED */
  342. RPCRTAPI
  343. RPC_STATUS
  344. RPC_ENTRY
  345. RpcStringBindingCompose (
  346. IN unsigned char __RPC_FAR * ObjUuid OPTIONAL,
  347. IN unsigned char __RPC_FAR * Protseq OPTIONAL,
  348. IN unsigned char __RPC_FAR * NetworkAddr OPTIONAL,
  349. IN unsigned char __RPC_FAR * Endpoint OPTIONAL,
  350. IN unsigned char __RPC_FAR * Options OPTIONAL,
  351. OUT unsigned char __RPC_FAR * __RPC_FAR * StringBinding OPTIONAL
  352. );
  353. #endif /* RPC_UNICODE_SUPPORTED */
  354. /* client/server */
  355. #ifdef RPC_UNICODE_SUPPORTED
  356. RPCRTAPI
  357. RPC_STATUS
  358. RPC_ENTRY
  359. RpcStringBindingParseA (
  360. IN unsigned char __RPC_FAR * StringBinding,
  361. OUT unsigned char __RPC_FAR * __RPC_FAR * ObjUuid OPTIONAL,
  362. OUT unsigned char __RPC_FAR * __RPC_FAR * Protseq OPTIONAL,
  363. OUT unsigned char __RPC_FAR * __RPC_FAR * NetworkAddr OPTIONAL,
  364. OUT unsigned char __RPC_FAR * __RPC_FAR * Endpoint OPTIONAL,
  365. OUT unsigned char __RPC_FAR * __RPC_FAR * NetworkOptions OPTIONAL
  366. );
  367. RPCRTAPI
  368. RPC_STATUS
  369. RPC_ENTRY
  370. RpcStringBindingParseW (
  371. IN unsigned short __RPC_FAR * StringBinding,
  372. OUT unsigned short __RPC_FAR * __RPC_FAR * ObjUuid OPTIONAL,
  373. OUT unsigned short __RPC_FAR * __RPC_FAR * Protseq OPTIONAL,
  374. OUT unsigned short __RPC_FAR * __RPC_FAR * NetworkAddr OPTIONAL,
  375. OUT unsigned short __RPC_FAR * __RPC_FAR * Endpoint OPTIONAL,
  376. OUT unsigned short __RPC_FAR * __RPC_FAR * NetworkOptions OPTIONAL
  377. );
  378. #ifdef UNICODE
  379. #define RpcStringBindingParse RpcStringBindingParseW
  380. #else /* UNICODE */
  381. #define RpcStringBindingParse RpcStringBindingParseA
  382. #endif /* UNICODE */
  383. #else /* RPC_UNICODE_SUPPORTED */
  384. RPCRTAPI
  385. RPC_STATUS
  386. RPC_ENTRY
  387. RpcStringBindingParse (
  388. IN unsigned char __RPC_FAR * StringBinding,
  389. OUT unsigned char __RPC_FAR * __RPC_FAR * ObjUuid OPTIONAL,
  390. OUT unsigned char __RPC_FAR * __RPC_FAR * Protseq OPTIONAL,
  391. OUT unsigned char __RPC_FAR * __RPC_FAR * NetworkAddr OPTIONAL,
  392. OUT unsigned char __RPC_FAR * __RPC_FAR * Endpoint OPTIONAL,
  393. OUT unsigned char __RPC_FAR * __RPC_FAR * NetworkOptions OPTIONAL
  394. );
  395. #endif /* RPC_UNICODE_SUPPORTED */
  396. /* client/server */
  397. #ifdef RPC_UNICODE_SUPPORTED
  398. RPCRTAPI
  399. RPC_STATUS
  400. RPC_ENTRY
  401. RpcStringFreeA (
  402. IN OUT unsigned char __RPC_FAR * __RPC_FAR * String
  403. );
  404. RPCRTAPI
  405. RPC_STATUS
  406. RPC_ENTRY
  407. RpcStringFreeW (
  408. IN OUT unsigned short __RPC_FAR * __RPC_FAR * String
  409. );
  410. #ifdef UNICODE
  411. #define RpcStringFree RpcStringFreeW
  412. #else /* UNICODE */
  413. #define RpcStringFree RpcStringFreeA
  414. #endif /* UNICODE */
  415. #else /* RPC_UNICODE_SUPPORTED */
  416. RPCRTAPI
  417. RPC_STATUS
  418. RPC_ENTRY
  419. RpcStringFree (
  420. IN OUT unsigned char __RPC_FAR * __RPC_FAR * String
  421. );
  422. #endif /* RPC_UNICODE_SUPPORTED */
  423. /* client/server */
  424. RPCRTAPI
  425. RPC_STATUS
  426. RPC_ENTRY
  427. RpcIfInqId (
  428. IN RPC_IF_HANDLE RpcIfHandle,
  429. OUT RPC_IF_ID __RPC_FAR * RpcIfId
  430. );
  431. /* client/server */
  432. #ifdef RPC_UNICODE_SUPPORTED
  433. RPCRTAPI
  434. RPC_STATUS
  435. RPC_ENTRY
  436. RpcNetworkIsProtseqValidA (
  437. IN unsigned char __RPC_FAR * Protseq
  438. );
  439. RPCRTAPI
  440. RPC_STATUS
  441. RPC_ENTRY
  442. RpcNetworkIsProtseqValidW (
  443. IN unsigned short __RPC_FAR * Protseq
  444. );
  445. #ifdef UNICODE
  446. #define RpcNetworkIsProtseqValid RpcNetworkIsProtseqValidW
  447. #else /* UNICODE */
  448. #define RpcNetworkIsProtseqValid RpcNetworkIsProtseqValidA
  449. #endif /* UNICODE */
  450. #else /* RPC_UNICODE_SUPPORTED */
  451. RPCRTAPI
  452. RPC_STATUS
  453. RPC_ENTRY
  454. RpcNetworkIsProtseqValid (
  455. IN unsigned char __RPC_FAR * Protseq
  456. );
  457. #endif /* RPC_UNICODE_SUPPORTED */
  458. /* client */
  459. RPCRTAPI
  460. RPC_STATUS
  461. RPC_ENTRY
  462. RpcMgmtInqComTimeout (
  463. IN RPC_BINDING_HANDLE Binding,
  464. OUT unsigned int __RPC_FAR * Timeout
  465. );
  466. /* client */
  467. RPCRTAPI
  468. RPC_STATUS
  469. RPC_ENTRY
  470. RpcMgmtSetComTimeout (
  471. IN RPC_BINDING_HANDLE Binding,
  472. IN unsigned int Timeout
  473. );
  474. /* client */
  475. RPCRTAPI
  476. RPC_STATUS
  477. RPC_ENTRY
  478. RpcMgmtSetCancelTimeout(
  479. long Timeout
  480. );
  481. /* server */
  482. #ifdef RPC_UNICODE_SUPPORTED
  483. RPCRTAPI
  484. RPC_STATUS
  485. RPC_ENTRY
  486. RpcNetworkInqProtseqsA (
  487. OUT RPC_PROTSEQ_VECTORA __RPC_FAR * __RPC_FAR * ProtseqVector
  488. );
  489. RPCRTAPI
  490. RPC_STATUS
  491. RPC_ENTRY
  492. RpcNetworkInqProtseqsW (
  493. OUT RPC_PROTSEQ_VECTORW __RPC_FAR * __RPC_FAR * ProtseqVector
  494. );
  495. #ifdef UNICODE
  496. #define RpcNetworkInqProtseqs RpcNetworkInqProtseqsW
  497. #else /* UNICODE */
  498. #define RpcNetworkInqProtseqs RpcNetworkInqProtseqsA
  499. #endif /* UNICODE */
  500. #else /* RPC_UNICODE_SUPPORTED */
  501. RPCRTAPI
  502. RPC_STATUS
  503. RPC_ENTRY
  504. RpcNetworkInqProtseqs (
  505. OUT RPC_PROTSEQ_VECTOR __RPC_FAR * __RPC_FAR * ProtseqVector
  506. );
  507. #endif /* RPC_UNICODE_SUPPORTED */
  508. /* server */
  509. RPCRTAPI
  510. RPC_STATUS
  511. RPC_ENTRY
  512. RpcObjectInqType (
  513. IN UUID __RPC_FAR * ObjUuid,
  514. OUT UUID __RPC_FAR * TypeUuid OPTIONAL
  515. );
  516. /* server */
  517. RPCRTAPI
  518. RPC_STATUS
  519. RPC_ENTRY
  520. RpcObjectSetInqFn (
  521. IN RPC_OBJECT_INQ_FN __RPC_FAR * InquiryFn
  522. );
  523. /* server */
  524. RPCRTAPI
  525. RPC_STATUS
  526. RPC_ENTRY
  527. RpcObjectSetType (
  528. IN UUID __RPC_FAR * ObjUuid,
  529. IN UUID __RPC_FAR * TypeUuid OPTIONAL
  530. );
  531. /* server */
  532. #ifdef RPC_UNICODE_SUPPORTED
  533. RPCRTAPI
  534. RPC_STATUS
  535. RPC_ENTRY
  536. RpcProtseqVectorFreeA (
  537. IN OUT RPC_PROTSEQ_VECTORA __RPC_FAR * __RPC_FAR * ProtseqVector
  538. );
  539. RPCRTAPI
  540. RPC_STATUS
  541. RPC_ENTRY
  542. RpcProtseqVectorFreeW (
  543. IN OUT RPC_PROTSEQ_VECTORW __RPC_FAR * __RPC_FAR * ProtseqVector
  544. );
  545. #ifdef UNICODE
  546. #define RpcProtseqVectorFree RpcProtseqVectorFreeW
  547. #else /* UNICODE */
  548. #define RpcProtseqVectorFree RpcProtseqVectorFreeA
  549. #endif /* UNICODE */
  550. #else /* RPC_UNICODE_SUPPORTED */
  551. RPCRTAPI
  552. RPC_STATUS
  553. RPC_ENTRY
  554. RpcProtseqVectorFree (
  555. IN OUT RPC_PROTSEQ_VECTOR __RPC_FAR * __RPC_FAR * ProtseqVector
  556. );
  557. #endif /* RPC_UNICODE_SUPPORTED */
  558. /* server */
  559. RPCRTAPI
  560. RPC_STATUS
  561. RPC_ENTRY
  562. RpcServerInqBindings (
  563. OUT RPC_BINDING_VECTOR __RPC_FAR * __RPC_FAR * BindingVector
  564. );
  565. /* server */
  566. RPCRTAPI
  567. RPC_STATUS
  568. RPC_ENTRY
  569. RpcServerInqIf (
  570. IN RPC_IF_HANDLE IfSpec,
  571. IN UUID __RPC_FAR * MgrTypeUuid, OPTIONAL
  572. OUT RPC_MGR_EPV __RPC_FAR * __RPC_FAR * MgrEpv
  573. );
  574. /* server */
  575. RPCRTAPI
  576. RPC_STATUS
  577. RPC_ENTRY
  578. RpcServerListen (
  579. IN unsigned int MinimumCallThreads,
  580. IN unsigned int MaxCalls,
  581. IN unsigned int DontWait
  582. );
  583. /* server */
  584. RPCRTAPI
  585. RPC_STATUS
  586. RPC_ENTRY
  587. RpcServerRegisterIf (
  588. IN RPC_IF_HANDLE IfSpec,
  589. IN UUID __RPC_FAR * MgrTypeUuid OPTIONAL,
  590. IN RPC_MGR_EPV __RPC_FAR * MgrEpv OPTIONAL
  591. );
  592. /* server */
  593. RPCRTAPI
  594. RPC_STATUS
  595. RPC_ENTRY
  596. RpcServerRegisterIfEx (
  597. IN RPC_IF_HANDLE IfSpec,
  598. IN UUID __RPC_FAR * MgrTypeUuid,
  599. IN RPC_MGR_EPV __RPC_FAR * MgrEpv,
  600. IN unsigned int Flags,
  601. IN unsigned int MaxCalls,
  602. IN RPC_IF_CALLBACK_FN __RPC_FAR *IfCallback
  603. );
  604. /* server */
  605. RPCRTAPI
  606. RPC_STATUS
  607. RPC_ENTRY
  608. RpcServerRegisterIf2 (
  609. IN RPC_IF_HANDLE IfSpec,
  610. IN UUID * MgrTypeUuid,
  611. IN RPC_MGR_EPV * MgrEpv,
  612. IN unsigned int Flags,
  613. IN unsigned int MaxCalls,
  614. IN unsigned int MaxRpcSize,
  615. IN RPC_IF_CALLBACK_FN *IfCallbackFn
  616. );
  617. /* server */
  618. RPCRTAPI
  619. RPC_STATUS
  620. RPC_ENTRY
  621. RpcServerUnregisterIf (
  622. IN RPC_IF_HANDLE IfSpec,
  623. IN UUID __RPC_FAR * MgrTypeUuid, OPTIONAL
  624. IN unsigned int WaitForCallsToComplete
  625. );
  626. /* server */
  627. RPCRTAPI
  628. RPC_STATUS
  629. RPC_ENTRY
  630. RpcServerUnregisterIfEx (
  631. IN RPC_IF_HANDLE IfSpec,
  632. IN UUID __RPC_FAR * MgrTypeUuid, OPTIONAL
  633. IN int RundownContextHandles
  634. );
  635. /* server */
  636. RPCRTAPI
  637. RPC_STATUS
  638. RPC_ENTRY
  639. RpcServerUseAllProtseqs (
  640. IN unsigned int MaxCalls,
  641. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  642. );
  643. /* server */
  644. RPCRTAPI
  645. RPC_STATUS
  646. RPC_ENTRY
  647. RpcServerUseAllProtseqsEx (
  648. IN unsigned int MaxCalls,
  649. IN void __RPC_FAR * SecurityDescriptor,
  650. IN PRPC_POLICY Policy
  651. );
  652. /* server */
  653. RPCRTAPI
  654. RPC_STATUS
  655. RPC_ENTRY
  656. RpcServerUseAllProtseqsIf (
  657. IN unsigned int MaxCalls,
  658. IN RPC_IF_HANDLE IfSpec,
  659. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  660. );
  661. /* server */
  662. RPCRTAPI
  663. RPC_STATUS
  664. RPC_ENTRY
  665. RpcServerUseAllProtseqsIfEx (
  666. IN unsigned int MaxCalls,
  667. IN RPC_IF_HANDLE IfSpec,
  668. IN void __RPC_FAR * SecurityDescriptor,
  669. IN PRPC_POLICY Policy
  670. );
  671. /* server */
  672. #ifdef RPC_UNICODE_SUPPORTED
  673. RPCRTAPI
  674. RPC_STATUS
  675. RPC_ENTRY
  676. RpcServerUseProtseqA (
  677. IN unsigned char __RPC_FAR * Protseq,
  678. IN unsigned int MaxCalls,
  679. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  680. );
  681. RPCRTAPI
  682. RPC_STATUS
  683. RPC_ENTRY
  684. RpcServerUseProtseqExA (
  685. IN unsigned char __RPC_FAR * Protseq,
  686. IN unsigned int MaxCalls,
  687. IN void __RPC_FAR * SecurityDescriptor,
  688. IN PRPC_POLICY Policy
  689. );
  690. RPCRTAPI
  691. RPC_STATUS
  692. RPC_ENTRY
  693. RpcServerUseProtseqW (
  694. IN unsigned short __RPC_FAR * Protseq,
  695. IN unsigned int MaxCalls,
  696. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  697. );
  698. RPCRTAPI
  699. RPC_STATUS
  700. RPC_ENTRY
  701. RpcServerUseProtseqExW (
  702. IN unsigned short __RPC_FAR * Protseq,
  703. IN unsigned int MaxCalls,
  704. IN void __RPC_FAR * SecurityDescriptor,
  705. IN PRPC_POLICY Policy
  706. );
  707. #ifdef UNICODE
  708. #define RpcServerUseProtseq RpcServerUseProtseqW
  709. #define RpcServerUseProtseqEx RpcServerUseProtseqExW
  710. #else /* UNICODE */
  711. #define RpcServerUseProtseq RpcServerUseProtseqA
  712. #define RpcServerUseProtseqEx RpcServerUseProtseqExA
  713. #endif /* UNICODE */
  714. #else /* RPC_UNICODE_SUPPORTED */
  715. RPCRTAPI
  716. RPC_STATUS
  717. RPC_ENTRY
  718. RpcServerUseProtseq (
  719. IN unsigned char __RPC_FAR * Protseq,
  720. IN unsigned int MaxCalls,
  721. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  722. );
  723. RPCRTAPI
  724. RPC_STATUS
  725. RPC_ENTRY
  726. RpcServerUseProtseqEx (
  727. IN unsigned char __RPC_FAR * Protseq,
  728. IN unsigned int MaxCalls,
  729. IN void __RPC_FAR * SecurityDescriptor,
  730. IN PRPC_POLICY Policy
  731. );
  732. #endif /* RPC_UNICODE_SUPPORTED */
  733. /* server */
  734. #ifdef RPC_UNICODE_SUPPORTED
  735. RPCRTAPI
  736. RPC_STATUS
  737. RPC_ENTRY
  738. RpcServerUseProtseqEpA (
  739. IN unsigned char __RPC_FAR * Protseq,
  740. IN unsigned int MaxCalls,
  741. IN unsigned char __RPC_FAR * Endpoint,
  742. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  743. );
  744. RPCRTAPI
  745. RPC_STATUS
  746. RPC_ENTRY
  747. RpcServerUseProtseqEpExA (
  748. IN unsigned char __RPC_FAR * Protseq,
  749. IN unsigned int MaxCalls,
  750. IN unsigned char __RPC_FAR * Endpoint,
  751. IN void __RPC_FAR * SecurityDescriptor,
  752. IN PRPC_POLICY Policy
  753. );
  754. RPCRTAPI
  755. RPC_STATUS
  756. RPC_ENTRY
  757. RpcServerUseProtseqEpW (
  758. IN unsigned short __RPC_FAR * Protseq,
  759. IN unsigned int MaxCalls,
  760. IN unsigned short __RPC_FAR * Endpoint,
  761. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  762. );
  763. RPCRTAPI
  764. RPC_STATUS
  765. RPC_ENTRY
  766. RpcServerUseProtseqEpExW (
  767. IN unsigned short __RPC_FAR * Protseq,
  768. IN unsigned int MaxCalls,
  769. IN unsigned short __RPC_FAR * Endpoint,
  770. IN void __RPC_FAR * SecurityDescriptor,
  771. IN PRPC_POLICY Policy
  772. );
  773. #ifdef UNICODE
  774. #define RpcServerUseProtseqEp RpcServerUseProtseqEpW
  775. #define RpcServerUseProtseqEpEx RpcServerUseProtseqEpExW
  776. #else /* UNICODE */
  777. #define RpcServerUseProtseqEp RpcServerUseProtseqEpA
  778. #define RpcServerUseProtseqEpEx RpcServerUseProtseqEpExA
  779. #endif /* UNICODE */
  780. #else /* RPC_UNICODE_SUPPORTED */
  781. RPCRTAPI
  782. RPC_STATUS
  783. RPC_ENTRY
  784. RpcServerUseProtseqEp (
  785. IN unsigned char __RPC_FAR * Protseq,
  786. IN unsigned int MaxCalls,
  787. IN unsigned char __RPC_FAR * Endpoint,
  788. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  789. );
  790. RPCRTAPI
  791. RPC_STATUS
  792. RPC_ENTRY
  793. RpcServerUseProtseqEpEx (
  794. IN unsigned char __RPC_FAR * Protseq,
  795. IN unsigned int MaxCalls,
  796. IN unsigned char __RPC_FAR * Endpoint,
  797. IN void __RPC_FAR * SecurityDescriptor,
  798. IN PRPC_POLICY Policy
  799. );
  800. #endif /* RPC_UNICODE_SUPPORTED */
  801. /* server */
  802. #ifdef RPC_UNICODE_SUPPORTED
  803. RPCRTAPI
  804. RPC_STATUS
  805. RPC_ENTRY
  806. RpcServerUseProtseqIfA (
  807. IN unsigned char __RPC_FAR * Protseq,
  808. IN unsigned int MaxCalls,
  809. IN RPC_IF_HANDLE IfSpec,
  810. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  811. );
  812. RPCRTAPI
  813. RPC_STATUS
  814. RPC_ENTRY
  815. RpcServerUseProtseqIfExA (
  816. IN unsigned char __RPC_FAR * Protseq,
  817. IN unsigned int MaxCalls,
  818. IN RPC_IF_HANDLE IfSpec,
  819. IN void __RPC_FAR * SecurityDescriptor,
  820. IN PRPC_POLICY Policy
  821. );
  822. RPCRTAPI
  823. RPC_STATUS
  824. RPC_ENTRY
  825. RpcServerUseProtseqIfW (
  826. IN unsigned short __RPC_FAR * Protseq,
  827. IN unsigned int MaxCalls,
  828. IN RPC_IF_HANDLE IfSpec,
  829. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  830. );
  831. RPCRTAPI
  832. RPC_STATUS
  833. RPC_ENTRY
  834. RpcServerUseProtseqIfExW (
  835. IN unsigned short __RPC_FAR * Protseq,
  836. IN unsigned int MaxCalls,
  837. IN RPC_IF_HANDLE IfSpec,
  838. IN void __RPC_FAR * SecurityDescriptor,
  839. IN PRPC_POLICY Policy
  840. );
  841. #ifdef UNICODE
  842. #define RpcServerUseProtseqIf RpcServerUseProtseqIfW
  843. #define RpcServerUseProtseqIfEx RpcServerUseProtseqIfExW
  844. #else /* UNICODE */
  845. #define RpcServerUseProtseqIf RpcServerUseProtseqIfA
  846. #define RpcServerUseProtseqIfEx RpcServerUseProtseqIfExA
  847. #endif /* UNICODE */
  848. #else /* RPC_UNICODE_SUPPORTED */
  849. RPCRTAPI
  850. RPC_STATUS
  851. RPC_ENTRY
  852. RpcServerUseProtseqIf (
  853. IN unsigned char __RPC_FAR * Protseq,
  854. IN unsigned int MaxCalls,
  855. IN RPC_IF_HANDLE IfSpec,
  856. IN void __RPC_FAR * SecurityDescriptor OPTIONAL
  857. );
  858. RPCRTAPI
  859. RPC_STATUS
  860. RPC_ENTRY
  861. RpcServerUseProtseqIfEx (
  862. IN unsigned char __RPC_FAR * Protseq,
  863. IN unsigned int MaxCalls,
  864. IN RPC_IF_HANDLE IfSpec,
  865. IN void __RPC_FAR * SecurityDescriptor,
  866. IN PRPC_POLICY Policy
  867. );
  868. #endif /* RPC_UNICODE_SUPPORTED */
  869. RPCRTAPI
  870. void
  871. RPC_ENTRY
  872. RpcServerYield (
  873. );
  874. /* server */
  875. RPCRTAPI
  876. RPC_STATUS
  877. RPC_ENTRY
  878. RpcMgmtStatsVectorFree (
  879. IN RPC_STATS_VECTOR ** StatsVector
  880. );
  881. /* server */
  882. RPCRTAPI
  883. RPC_STATUS
  884. RPC_ENTRY
  885. RpcMgmtInqStats (
  886. IN RPC_BINDING_HANDLE Binding,
  887. OUT RPC_STATS_VECTOR ** Statistics
  888. );
  889. /* server */
  890. RPCRTAPI
  891. RPC_STATUS
  892. RPC_ENTRY
  893. RpcMgmtIsServerListening (
  894. IN RPC_BINDING_HANDLE Binding
  895. );
  896. /* server */
  897. RPCRTAPI
  898. RPC_STATUS
  899. RPC_ENTRY
  900. RpcMgmtStopServerListening (
  901. IN RPC_BINDING_HANDLE Binding
  902. );
  903. /* server */
  904. RPCRTAPI
  905. RPC_STATUS
  906. RPC_ENTRY
  907. RpcMgmtWaitServerListen (
  908. void
  909. );
  910. /* server */
  911. RPCRTAPI
  912. RPC_STATUS
  913. RPC_ENTRY
  914. RpcMgmtSetServerStackSize (
  915. IN unsigned long ThreadStackSize
  916. );
  917. /* server */
  918. RPCRTAPI
  919. void
  920. RPC_ENTRY
  921. RpcSsDontSerializeContext (
  922. void
  923. );
  924. /* client */
  925. RPCRTAPI
  926. RPC_STATUS
  927. RPC_ENTRY
  928. RpcMgmtEnableIdleCleanup (
  929. void
  930. );
  931. RPCRTAPI
  932. RPC_STATUS
  933. RPC_ENTRY
  934. RpcMgmtInqIfIds (
  935. IN RPC_BINDING_HANDLE Binding,
  936. OUT RPC_IF_ID_VECTOR __RPC_FAR * __RPC_FAR * IfIdVector
  937. );
  938. RPCRTAPI
  939. RPC_STATUS
  940. RPC_ENTRY
  941. RpcIfIdVectorFree (
  942. IN OUT RPC_IF_ID_VECTOR __RPC_FAR * __RPC_FAR * IfIdVector
  943. );
  944. #ifdef RPC_UNICODE_SUPPORTED
  945. RPCRTAPI
  946. RPC_STATUS
  947. RPC_ENTRY
  948. RpcMgmtInqServerPrincNameA (
  949. IN RPC_BINDING_HANDLE Binding,
  950. IN unsigned long AuthnSvc,
  951. OUT unsigned char __RPC_FAR * __RPC_FAR * ServerPrincName
  952. );
  953. RPCRTAPI
  954. RPC_STATUS
  955. RPC_ENTRY
  956. RpcMgmtInqServerPrincNameW (
  957. IN RPC_BINDING_HANDLE Binding,
  958. IN unsigned long AuthnSvc,
  959. OUT unsigned short __RPC_FAR * __RPC_FAR * ServerPrincName
  960. );
  961. #ifdef UNICODE
  962. #define RpcMgmtInqServerPrincName RpcMgmtInqServerPrincNameW
  963. #else /* UNICODE */
  964. #define RpcMgmtInqServerPrincName RpcMgmtInqServerPrincNameA
  965. #endif /* UNICODE */
  966. #else /* RPC_UNICODE_SUPPORTED */
  967. RPCRTAPI
  968. RPC_STATUS
  969. RPC_ENTRY
  970. RpcMgmtInqServerPrincName (
  971. IN RPC_BINDING_HANDLE Binding,
  972. IN unsigned long AuthnSvc,
  973. OUT unsigned char __RPC_FAR * __RPC_FAR * ServerPrincName
  974. );
  975. #endif /* RPC_UNICODE_SUPPORTED */
  976. #ifdef RPC_UNICODE_SUPPORTED
  977. RPCRTAPI
  978. RPC_STATUS
  979. RPC_ENTRY
  980. RpcServerInqDefaultPrincNameA (
  981. IN unsigned long AuthnSvc,
  982. OUT unsigned char __RPC_FAR * __RPC_FAR * PrincName
  983. );
  984. RPCRTAPI
  985. RPC_STATUS
  986. RPC_ENTRY
  987. RpcServerInqDefaultPrincNameW (
  988. IN unsigned long AuthnSvc,
  989. OUT unsigned short __RPC_FAR * __RPC_FAR * PrincName
  990. );
  991. #ifdef UNICODE
  992. #define RpcServerInqDefaultPrincName RpcServerInqDefaultPrincNameW
  993. #else /* UNICODE */
  994. #define RpcServerInqDefaultPrincName RpcServerInqDefaultPrincNameA
  995. #endif /* UNICODE */
  996. #else /* RPC_UNICODE_SUPPORTED */
  997. RPCRTAPI
  998. RPC_STATUS
  999. RPC_ENTRY
  1000. RpcServerInqDefaultPrincName (
  1001. IN unsigned long AuthnSvc,
  1002. OUT unsigned char __RPC_FAR * __RPC_FAR * PrincName
  1003. );
  1004. #endif /* RPC_UNICODE_SUPPORTED */
  1005. /* client */
  1006. RPCRTAPI
  1007. RPC_STATUS
  1008. RPC_ENTRY
  1009. RpcEpResolveBinding (
  1010. IN RPC_BINDING_HANDLE Binding,
  1011. IN RPC_IF_HANDLE IfSpec
  1012. );
  1013. /* client */
  1014. #ifdef RPC_UNICODE_SUPPORTED
  1015. RPCRTAPI
  1016. RPC_STATUS
  1017. RPC_ENTRY
  1018. RpcNsBindingInqEntryNameA (
  1019. IN RPC_BINDING_HANDLE Binding,
  1020. IN unsigned long EntryNameSyntax,
  1021. OUT unsigned char __RPC_FAR * __RPC_FAR * EntryName
  1022. );
  1023. RPCRTAPI
  1024. RPC_STATUS
  1025. RPC_ENTRY
  1026. RpcNsBindingInqEntryNameW (
  1027. IN RPC_BINDING_HANDLE Binding,
  1028. IN unsigned long EntryNameSyntax,
  1029. OUT unsigned short __RPC_FAR * __RPC_FAR * EntryName
  1030. );
  1031. #ifdef UNICODE
  1032. #define RpcNsBindingInqEntryName RpcNsBindingInqEntryNameW
  1033. #else /* UNICODE */
  1034. #define RpcNsBindingInqEntryName RpcNsBindingInqEntryNameA
  1035. #endif /* UNICODE */
  1036. #else /* RPC_UNICODE_SUPPORTED */
  1037. RPCRTAPI
  1038. RPC_STATUS
  1039. RPC_ENTRY
  1040. RpcNsBindingInqEntryName (
  1041. IN RPC_BINDING_HANDLE Binding,
  1042. IN unsigned long EntryNameSyntax,
  1043. OUT unsigned char __RPC_FAR * __RPC_FAR * EntryName
  1044. );
  1045. #endif /* RPC_UNICODE_SUPPORTED */
  1046. typedef void __RPC_FAR * RPC_AUTH_IDENTITY_HANDLE;
  1047. typedef void __RPC_FAR * RPC_AUTHZ_HANDLE;
  1048. #define RPC_C_AUTHN_LEVEL_DEFAULT 0
  1049. #define RPC_C_AUTHN_LEVEL_NONE 1
  1050. #define RPC_C_AUTHN_LEVEL_CONNECT 2
  1051. #define RPC_C_AUTHN_LEVEL_CALL 3
  1052. #define RPC_C_AUTHN_LEVEL_PKT 4
  1053. #define RPC_C_AUTHN_LEVEL_PKT_INTEGRITY 5
  1054. #define RPC_C_AUTHN_LEVEL_PKT_PRIVACY 6
  1055. #define RPC_C_IMP_LEVEL_DEFAULT 0
  1056. #define RPC_C_IMP_LEVEL_ANONYMOUS 1
  1057. #define RPC_C_IMP_LEVEL_IDENTIFY 2
  1058. #define RPC_C_IMP_LEVEL_IMPERSONATE 3
  1059. #define RPC_C_IMP_LEVEL_DELEGATE 4
  1060. #define RPC_C_QOS_IDENTITY_STATIC 0
  1061. #define RPC_C_QOS_IDENTITY_DYNAMIC 1
  1062. #define RPC_C_QOS_CAPABILITIES_DEFAULT 0x0
  1063. #define RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH 0x1
  1064. #define RPC_C_QOS_CAPABILITIES_MAKE_FULLSIC 0x2
  1065. #define RPC_C_QOS_CAPABILITIES_ANY_AUTHORITY 0x4
  1066. #define RPC_C_QOS_CAPABILITIES_IGNORE_DELEGATE_FAILURE 0x8
  1067. #define RPC_C_QOS_CAPABILITIES_LOCAL_MA_HINT 0x10
  1068. #define RPC_C_PROTECT_LEVEL_DEFAULT (RPC_C_AUTHN_LEVEL_DEFAULT)
  1069. #define RPC_C_PROTECT_LEVEL_NONE (RPC_C_AUTHN_LEVEL_NONE)
  1070. #define RPC_C_PROTECT_LEVEL_CONNECT (RPC_C_AUTHN_LEVEL_CONNECT)
  1071. #define RPC_C_PROTECT_LEVEL_CALL (RPC_C_AUTHN_LEVEL_CALL)
  1072. #define RPC_C_PROTECT_LEVEL_PKT (RPC_C_AUTHN_LEVEL_PKT)
  1073. #define RPC_C_PROTECT_LEVEL_PKT_INTEGRITY (RPC_C_AUTHN_LEVEL_PKT_INTEGRITY)
  1074. #define RPC_C_PROTECT_LEVEL_PKT_PRIVACY (RPC_C_AUTHN_LEVEL_PKT_PRIVACY)
  1075. #define RPC_C_AUTHN_NONE 0
  1076. #define RPC_C_AUTHN_DCE_PRIVATE 1
  1077. #define RPC_C_AUTHN_DCE_PUBLIC 2
  1078. #define RPC_C_AUTHN_DEC_PUBLIC 4
  1079. #define RPC_C_AUTHN_GSS_NEGOTIATE 9
  1080. #define RPC_C_AUTHN_WINNT 10
  1081. #define RPC_C_AUTHN_GSS_SCHANNEL 14
  1082. #define RPC_C_AUTHN_GSS_KERBEROS 16
  1083. #define RPC_C_AUTHN_DPA 17
  1084. #define RPC_C_AUTHN_MSN 18
  1085. #define RPC_C_AUTHN_DIGEST 21
  1086. #define RPC_C_AUTHN_MQ 100
  1087. #define RPC_C_AUTHN_DEFAULT 0xFFFFFFFFL
  1088. #define RPC_C_NO_CREDENTIALS ((RPC_AUTH_IDENTITY_HANDLE) MAXUINT_PTR)
  1089. #define RPC_C_SECURITY_QOS_VERSION 1L
  1090. #define RPC_C_SECURITY_QOS_VERSION_1 1L
  1091. typedef struct _RPC_SECURITY_QOS {
  1092. unsigned long Version;
  1093. unsigned long Capabilities;
  1094. unsigned long IdentityTracking;
  1095. unsigned long ImpersonationType;
  1096. } RPC_SECURITY_QOS, *PRPC_SECURITY_QOS;
  1097. #ifndef _AUTH_IDENTITY_DEFINED
  1098. #define _AUTH_IDENTITY_DEFINED
  1099. #define SEC_WINNT_AUTH_IDENTITY_ANSI 0x1
  1100. #define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2
  1101. typedef struct _SEC_WINNT_AUTH_IDENTITY_W {
  1102. unsigned short __RPC_FAR *User;
  1103. unsigned long UserLength;
  1104. unsigned short __RPC_FAR *Domain;
  1105. unsigned long DomainLength;
  1106. unsigned short __RPC_FAR *Password;
  1107. unsigned long PasswordLength;
  1108. unsigned long Flags;
  1109. } SEC_WINNT_AUTH_IDENTITY_W, *PSEC_WINNT_AUTH_IDENTITY_W;
  1110. typedef struct _SEC_WINNT_AUTH_IDENTITY_A {
  1111. unsigned char __RPC_FAR *User;
  1112. unsigned long UserLength;
  1113. unsigned char __RPC_FAR *Domain;
  1114. unsigned long DomainLength;
  1115. unsigned char __RPC_FAR *Password;
  1116. unsigned long PasswordLength;
  1117. unsigned long Flags;
  1118. } SEC_WINNT_AUTH_IDENTITY_A, *PSEC_WINNT_AUTH_IDENTITY_A;
  1119. #ifdef UNICODE
  1120. #define SEC_WINNT_AUTH_IDENTITY SEC_WINNT_AUTH_IDENTITY_W
  1121. #define PSEC_WINNT_AUTH_IDENTITY PSEC_WINNT_AUTH_IDENTITY_W
  1122. #define _SEC_WINNT_AUTH_IDENTITY _SEC_WINNT_AUTH_IDENTITY_W
  1123. #else // UNICODE
  1124. #define SEC_WINNT_AUTH_IDENTITY SEC_WINNT_AUTH_IDENTITY_A
  1125. #define PSEC_WINNT_AUTH_IDENTITY PSEC_WINNT_AUTH_IDENTITY_A
  1126. #define _SEC_WINNT_AUTH_IDENTITY _SEC_WINNT_AUTH_IDENTITY_A
  1127. #endif // UNICODE
  1128. #define RPC_C_SECURITY_QOS_VERSION_2 2L
  1129. #define RPC_C_AUTHN_INFO_TYPE_HTTP 1
  1130. #define RPC_C_HTTP_AUTHN_TARGET_SERVER 1
  1131. #define RPC_C_HTTP_AUTHN_TARGET_PROXY 2
  1132. #define RPC_C_HTTP_AUTHN_SCHEME_BASIC 0x00000001
  1133. #define RPC_C_HTTP_AUTHN_SCHEME_NTLM 0x00000002
  1134. #define RPC_C_HTTP_AUTHN_SCHEME_PASSPORT 0x00000004
  1135. #define RPC_C_HTTP_AUTHN_SCHEME_DIGEST 0x00000008
  1136. #define RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE 0x00000010
  1137. #define RPC_C_HTTP_FLAG_USE_SSL 1
  1138. #define RPC_C_HTTP_FLAG_USE_FIRST_AUTH_SCHEME 2
  1139. typedef struct _RPC_HTTP_TRANSPORT_CREDENTIALS_W
  1140. {
  1141. SEC_WINNT_AUTH_IDENTITY_W *TransportCredentials;
  1142. unsigned long Flags;
  1143. unsigned long AuthenticationTarget;
  1144. unsigned long NumberOfAuthnSchemes;
  1145. unsigned long *AuthnSchemes;
  1146. unsigned short __RPC_FAR *ServerCertificateSubject;
  1147. } RPC_HTTP_TRANSPORT_CREDENTIALS_W, *PRPC_HTTP_TRANSPORT_CREDENTIALS_W;
  1148. typedef struct _RPC_HTTP_TRANSPORT_CREDENTIALS_A
  1149. {
  1150. SEC_WINNT_AUTH_IDENTITY_A *TransportCredentials;
  1151. unsigned long Flags;
  1152. unsigned long AuthenticationTarget;
  1153. unsigned long NumberOfAuthnSchemes;
  1154. unsigned long *AuthnSchemes;
  1155. unsigned char __RPC_FAR *ServerCertificateSubject;
  1156. } RPC_HTTP_TRANSPORT_CREDENTIALS_A, *PRPC_HTTP_TRANSPORT_CREDENTIALS_A;
  1157. typedef struct _RPC_SECURITY_QOS_V2_W {
  1158. unsigned long Version;
  1159. unsigned long Capabilities;
  1160. unsigned long IdentityTracking;
  1161. unsigned long ImpersonationType;
  1162. unsigned long AdditionalSecurityInfoType;
  1163. union
  1164. {
  1165. RPC_HTTP_TRANSPORT_CREDENTIALS_W *HttpCredentials;
  1166. } u;
  1167. } RPC_SECURITY_QOS_V2_W, *PRPC_SECURITY_QOS_V2_W;
  1168. typedef struct _RPC_SECURITY_QOS_V2_A {
  1169. unsigned long Version;
  1170. unsigned long Capabilities;
  1171. unsigned long IdentityTracking;
  1172. unsigned long ImpersonationType;
  1173. unsigned long AdditionalSecurityInfoType;
  1174. union
  1175. {
  1176. RPC_HTTP_TRANSPORT_CREDENTIALS_A *HttpCredentials;
  1177. } u;
  1178. } RPC_SECURITY_QOS_V2_A, *PRPC_SECURITY_QOS_V2_A;
  1179. #define RPC_C_SECURITY_QOS_VERSION_3 3L
  1180. typedef struct _RPC_SECURITY_QOS_V3_W {
  1181. unsigned long Version;
  1182. unsigned long Capabilities;
  1183. unsigned long IdentityTracking;
  1184. unsigned long ImpersonationType;
  1185. unsigned long AdditionalSecurityInfoType;
  1186. union
  1187. {
  1188. RPC_HTTP_TRANSPORT_CREDENTIALS_W *HttpCredentials;
  1189. } u;
  1190. void *Sid;
  1191. } RPC_SECURITY_QOS_V3_W, *PRPC_SECURITY_QOS_V3_W;
  1192. typedef struct _RPC_SECURITY_QOS_V3_A {
  1193. unsigned long Version;
  1194. unsigned long Capabilities;
  1195. unsigned long IdentityTracking;
  1196. unsigned long ImpersonationType;
  1197. unsigned long AdditionalSecurityInfoType;
  1198. union
  1199. {
  1200. RPC_HTTP_TRANSPORT_CREDENTIALS_A *HttpCredentials;
  1201. } u;
  1202. void *Sid;
  1203. } RPC_SECURITY_QOS_V3_A, *PRPC_SECURITY_QOS_V3_A;
  1204. #endif //_AUTH_IDENTITY_DEFINED
  1205. #ifdef UNICODE
  1206. #define RPC_SECURITY_QOS_V2 RPC_SECURITY_QOS_V2_W
  1207. #define PRPC_SECURITY_QOS_V2 PRPC_SECURITY_QOS_V2_W
  1208. #define _RPC_SECURITY_QOS_V2 _RPC_SECURITY_QOS_V2_W
  1209. #define RPC_HTTP_TRANSPORT_CREDENTIALS RPC_HTTP_TRANSPORT_CREDENTIALS_W
  1210. #define PRPC_HTTP_TRANSPORT_CREDENTIALS PRPC_HTTP_TRANSPORT_CREDENTIALS_W
  1211. #define _RPC_HTTP_TRANSPORT_CREDENTIALS _RPC_HTTP_TRANSPORT_CREDENTIALS_W
  1212. #define RPC_SECURITY_QOS_V3 RPC_SECURITY_QOS_V3_W
  1213. #define PRPC_SECURITY_QOS_V3 PRPC_SECURITY_QOS_V3_W
  1214. #define _RPC_SECURITY_QOS_V3 _RPC_SECURITY_QOS_V3_W
  1215. #else // UNICODE
  1216. #define RPC_SECURITY_QOS_V2 RPC_SECURITY_QOS_V2_A
  1217. #define PRPC_SECURITY_QOS_V2 PRPC_SECURITY_QOS_V2_A
  1218. #define _RPC_SECURITY_QOS_V2 _RPC_SECURITY_QOS_V2_A
  1219. #define RPC_HTTP_TRANSPORT_CREDENTIALS RPC_HTTP_TRANSPORT_CREDENTIALS_A
  1220. #define PRPC_HTTP_TRANSPORT_CREDENTIALS PRPC_HTTP_TRANSPORT_CREDENTIALS_A
  1221. #define _RPC_HTTP_TRANSPORT_CREDENTIALS _RPC_HTTP_TRANSPORT_CREDENTIALS_A
  1222. #define RPC_SECURITY_QOS_V3 RPC_SECURITY_QOS_V3_A
  1223. #define PRPC_SECURITY_QOS_V3 PRPC_SECURITY_QOS_V3_A
  1224. #define _RPC_SECURITY_QOS_V3 _RPC_SECURITY_QOS_V3_A
  1225. #endif // UNICODE
  1226. typedef RPC_STATUS
  1227. (__RPC_USER * RPC_NEW_HTTP_PROXY_CHANNEL) (
  1228. IN unsigned short __RPC_FAR *ServerName,
  1229. IN unsigned short __RPC_FAR *ServerPort,
  1230. IN unsigned char __RPC_FAR *RemoteUser,
  1231. OUT unsigned short __RPC_FAR **NewServerName
  1232. );
  1233. typedef void
  1234. (__RPC_USER * RPC_HTTP_PROXY_FREE_STRING) (
  1235. IN unsigned short __RPC_FAR *ServerName
  1236. );
  1237. #define RPC_C_AUTHZ_NONE 0
  1238. #define RPC_C_AUTHZ_NAME 1
  1239. #define RPC_C_AUTHZ_DCE 2
  1240. #define RPC_C_AUTHZ_DEFAULT 0xffffffff
  1241. RPCRTAPI
  1242. RPC_STATUS
  1243. RPC_ENTRY
  1244. RpcImpersonateClient (
  1245. IN RPC_BINDING_HANDLE BindingHandle OPTIONAL
  1246. );
  1247. RPCRTAPI
  1248. RPC_STATUS
  1249. RPC_ENTRY
  1250. RpcRevertToSelfEx (
  1251. IN RPC_BINDING_HANDLE BindingHandle OPTIONAL
  1252. );
  1253. RPCRTAPI
  1254. RPC_STATUS
  1255. RPC_ENTRY
  1256. RpcRevertToSelf (
  1257. );
  1258. #ifdef RPC_UNICODE_SUPPORTED
  1259. RPCRTAPI
  1260. RPC_STATUS
  1261. RPC_ENTRY
  1262. RpcBindingInqAuthClientA (
  1263. IN RPC_BINDING_HANDLE ClientBinding, OPTIONAL
  1264. OUT RPC_AUTHZ_HANDLE __RPC_FAR * Privs,
  1265. OUT unsigned char __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  1266. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  1267. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  1268. OUT unsigned long __RPC_FAR * AuthzSvc OPTIONAL
  1269. );
  1270. RPCRTAPI
  1271. RPC_STATUS
  1272. RPC_ENTRY
  1273. RpcBindingInqAuthClientW (
  1274. IN RPC_BINDING_HANDLE ClientBinding, OPTIONAL
  1275. OUT RPC_AUTHZ_HANDLE __RPC_FAR * Privs,
  1276. OUT unsigned short __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  1277. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  1278. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  1279. OUT unsigned long __RPC_FAR * AuthzSvc OPTIONAL
  1280. );
  1281. RPCRTAPI
  1282. RPC_STATUS
  1283. RPC_ENTRY
  1284. RpcBindingInqAuthClientExA (
  1285. IN RPC_BINDING_HANDLE ClientBinding, OPTIONAL
  1286. OUT RPC_AUTHZ_HANDLE __RPC_FAR * Privs,
  1287. OUT unsigned char __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  1288. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  1289. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  1290. OUT unsigned long __RPC_FAR * AuthzSvc, OPTIONAL
  1291. IN unsigned long Flags
  1292. );
  1293. RPCRTAPI
  1294. RPC_STATUS
  1295. RPC_ENTRY
  1296. RpcBindingInqAuthClientExW (
  1297. IN RPC_BINDING_HANDLE ClientBinding, OPTIONAL
  1298. OUT RPC_AUTHZ_HANDLE __RPC_FAR * Privs,
  1299. OUT unsigned short __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  1300. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  1301. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  1302. OUT unsigned long __RPC_FAR * AuthzSvc, OPTIONAL
  1303. IN unsigned long Flags
  1304. );
  1305. RPCRTAPI
  1306. RPC_STATUS
  1307. RPC_ENTRY
  1308. RpcBindingInqAuthInfoA (
  1309. IN RPC_BINDING_HANDLE Binding,
  1310. OUT unsigned char __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  1311. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  1312. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  1313. OUT RPC_AUTH_IDENTITY_HANDLE __RPC_FAR * AuthIdentity, OPTIONAL
  1314. OUT unsigned long __RPC_FAR * AuthzSvc OPTIONAL
  1315. );
  1316. RPCRTAPI
  1317. RPC_STATUS
  1318. RPC_ENTRY
  1319. RpcBindingInqAuthInfoW (
  1320. IN RPC_BINDING_HANDLE Binding,
  1321. OUT unsigned short __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  1322. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  1323. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  1324. OUT RPC_AUTH_IDENTITY_HANDLE __RPC_FAR * AuthIdentity, OPTIONAL
  1325. OUT unsigned long __RPC_FAR * AuthzSvc OPTIONAL
  1326. );
  1327. RPCRTAPI
  1328. RPC_STATUS
  1329. RPC_ENTRY
  1330. RpcBindingSetAuthInfoA (
  1331. IN RPC_BINDING_HANDLE Binding,
  1332. IN unsigned char __RPC_FAR * ServerPrincName,
  1333. IN unsigned long AuthnLevel,
  1334. IN unsigned long AuthnSvc,
  1335. IN RPC_AUTH_IDENTITY_HANDLE AuthIdentity, OPTIONAL
  1336. IN unsigned long AuthzSvc
  1337. );
  1338. RPCRTAPI
  1339. RPC_STATUS
  1340. RPC_ENTRY
  1341. RpcBindingSetAuthInfoExA (
  1342. IN RPC_BINDING_HANDLE Binding,
  1343. IN unsigned char __RPC_FAR * ServerPrincName,
  1344. IN unsigned long AuthnLevel,
  1345. IN unsigned long AuthnSvc,
  1346. IN RPC_AUTH_IDENTITY_HANDLE AuthIdentity, OPTIONAL
  1347. IN unsigned long AuthzSvc,
  1348. IN RPC_SECURITY_QOS *SecurityQos OPTIONAL
  1349. );
  1350. RPCRTAPI
  1351. RPC_STATUS
  1352. RPC_ENTRY
  1353. RpcBindingSetAuthInfoW (
  1354. IN RPC_BINDING_HANDLE Binding,
  1355. IN unsigned short __RPC_FAR * ServerPrincName,
  1356. IN unsigned long AuthnLevel,
  1357. IN unsigned long AuthnSvc,
  1358. IN RPC_AUTH_IDENTITY_HANDLE AuthIdentity, OPTIONAL
  1359. IN unsigned long AuthzSvc
  1360. );
  1361. RPCRTAPI
  1362. RPC_STATUS
  1363. RPC_ENTRY
  1364. RpcBindingSetAuthInfoExW (
  1365. IN RPC_BINDING_HANDLE Binding,
  1366. IN unsigned short __RPC_FAR * ServerPrincName,
  1367. IN unsigned long AuthnLevel,
  1368. IN unsigned long AuthnSvc,
  1369. IN RPC_AUTH_IDENTITY_HANDLE AuthIdentity, OPTIONAL
  1370. IN unsigned long AuthzSvc, OPTIONAL
  1371. IN RPC_SECURITY_QOS *SecurityQOS
  1372. );
  1373. RPCRTAPI
  1374. RPC_STATUS
  1375. RPC_ENTRY
  1376. RpcBindingInqAuthInfoExA (
  1377. IN RPC_BINDING_HANDLE Binding,
  1378. OUT unsigned char __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  1379. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  1380. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  1381. OUT RPC_AUTH_IDENTITY_HANDLE __RPC_FAR * AuthIdentity, OPTIONAL
  1382. OUT unsigned long __RPC_FAR * AuthzSvc, OPTIONAL
  1383. IN unsigned long RpcQosVersion,
  1384. OUT RPC_SECURITY_QOS *SecurityQOS
  1385. );
  1386. RPCRTAPI
  1387. RPC_STATUS
  1388. RPC_ENTRY
  1389. RpcBindingInqAuthInfoExW (
  1390. IN RPC_BINDING_HANDLE Binding,
  1391. OUT unsigned short __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  1392. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  1393. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  1394. OUT RPC_AUTH_IDENTITY_HANDLE __RPC_FAR * AuthIdentity, OPTIONAL
  1395. OUT unsigned long __RPC_FAR * AuthzSvc OPTIONAL,
  1396. IN unsigned long RpcQosVersion,
  1397. OUT RPC_SECURITY_QOS *SecurityQOS
  1398. );
  1399. typedef void
  1400. (__RPC_USER * RPC_AUTH_KEY_RETRIEVAL_FN) (
  1401. IN void __RPC_FAR * Arg,
  1402. IN unsigned short __RPC_FAR * ServerPrincName,
  1403. IN unsigned long KeyVer,
  1404. OUT void __RPC_FAR * __RPC_FAR * Key,
  1405. OUT RPC_STATUS __RPC_FAR * Status
  1406. );
  1407. RPCRTAPI
  1408. RPC_STATUS
  1409. RPC_ENTRY
  1410. RpcServerRegisterAuthInfoA (
  1411. IN unsigned char __RPC_FAR * ServerPrincName,
  1412. IN unsigned long AuthnSvc,
  1413. IN RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn OPTIONAL,
  1414. IN void __RPC_FAR * Arg OPTIONAL
  1415. );
  1416. RPCRTAPI
  1417. RPC_STATUS
  1418. RPC_ENTRY
  1419. RpcServerRegisterAuthInfoW (
  1420. IN unsigned short __RPC_FAR * ServerPrincName,
  1421. IN unsigned long AuthnSvc,
  1422. IN RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn OPTIONAL,
  1423. IN void __RPC_FAR * Arg OPTIONAL
  1424. );
  1425. #ifdef UNICODE
  1426. #define RpcBindingInqAuthClient RpcBindingInqAuthClientW
  1427. #define RpcBindingInqAuthClientEx RpcBindingInqAuthClientExW
  1428. #define RpcBindingInqAuthInfo RpcBindingInqAuthInfoW
  1429. #define RpcBindingSetAuthInfo RpcBindingSetAuthInfoW
  1430. #define RpcServerRegisterAuthInfo RpcServerRegisterAuthInfoW
  1431. #define RpcBindingInqAuthInfoEx RpcBindingInqAuthInfoExW
  1432. #define RpcBindingSetAuthInfoEx RpcBindingSetAuthInfoExW
  1433. #else /* UNICODE */
  1434. #define RpcBindingInqAuthClient RpcBindingInqAuthClientA
  1435. #define RpcBindingInqAuthClientEx RpcBindingInqAuthClientExA
  1436. #define RpcBindingInqAuthInfo RpcBindingInqAuthInfoA
  1437. #define RpcBindingSetAuthInfo RpcBindingSetAuthInfoA
  1438. #define RpcServerRegisterAuthInfo RpcServerRegisterAuthInfoA
  1439. #define RpcBindingInqAuthInfoEx RpcBindingInqAuthInfoExA
  1440. #define RpcBindingSetAuthInfoEx RpcBindingSetAuthInfoExA
  1441. #endif /* UNICODE */
  1442. #else /* RPC_UNICODE_SUPPORTED */
  1443. RPCRTAPI
  1444. RPC_STATUS
  1445. RPC_ENTRY
  1446. RpcBindingInqAuthClient (
  1447. IN RPC_BINDING_HANDLE ClientBinding, OPTIONAL
  1448. OUT RPC_AUTHZ_HANDLE __RPC_FAR * Privs,
  1449. OUT unsigned char __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  1450. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  1451. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  1452. OUT unsigned long __RPC_FAR * AuthzSvc OPTIONAL
  1453. );
  1454. RPCRTAPI
  1455. RPC_STATUS
  1456. RPC_ENTRY
  1457. RpcBindingInqAuthClientEx (
  1458. IN RPC_BINDING_HANDLE ClientBinding, OPTIONAL
  1459. OUT RPC_AUTHZ_HANDLE __RPC_FAR * Privs,
  1460. OUT unsigned char __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  1461. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  1462. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  1463. OUT unsigned long __RPC_FAR * AuthzSvc, OPTIONAL
  1464. IN unsigned long Flags
  1465. );
  1466. RPCRTAPI
  1467. RPC_STATUS
  1468. RPC_ENTRY
  1469. RpcBindingInqAuthInfo (
  1470. IN RPC_BINDING_HANDLE Binding,
  1471. OUT unsigned char __RPC_FAR * __RPC_FAR * ServerPrincName, OPTIONAL
  1472. OUT unsigned long __RPC_FAR * AuthnLevel, OPTIONAL
  1473. OUT unsigned long __RPC_FAR * AuthnSvc, OPTIONAL
  1474. OUT RPC_AUTH_IDENTITY_HANDLE __RPC_FAR * AuthIdentity, OPTIONAL
  1475. OUT unsigned long __RPC_FAR * AuthzSvc OPTIONAL
  1476. );
  1477. RPCRTAPI
  1478. RPC_STATUS
  1479. RPC_ENTRY
  1480. RpcBindingSetAuthInfo (
  1481. IN RPC_BINDING_HANDLE Binding,
  1482. IN unsigned char __RPC_FAR * ServerPrincName,
  1483. IN unsigned long AuthnLevel,
  1484. IN unsigned long AuthnSvc,
  1485. IN RPC_AUTH_IDENTITY_HANDLE AuthIdentity, OPTIONAL
  1486. IN unsigned long AuthzSvc
  1487. );
  1488. typedef void
  1489. (__RPC_USER * RPC_AUTH_KEY_RETRIEVAL_FN) (
  1490. IN void __RPC_FAR * Arg,
  1491. IN unsigned char __RPC_FAR * ServerPrincName,
  1492. IN unsigned long KeyVer,
  1493. OUT void __RPC_FAR * __RPC_FAR * Key,
  1494. OUT RPC_STATUS __RPC_FAR * Status
  1495. );
  1496. RPCRTAPI
  1497. RPC_STATUS
  1498. RPC_ENTRY
  1499. RpcServerRegisterAuthInfo (
  1500. IN unsigned char __RPC_FAR * ServerPrincName,
  1501. IN unsigned long AuthnSvc,
  1502. IN RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn OPTIONAL,
  1503. IN void __RPC_FAR * Arg OPTIONAL
  1504. );
  1505. #endif /* RPC_UNICODE_SUPPORTED */
  1506. #if !defined(_M_IA64)
  1507. typedef struct {
  1508. unsigned char __RPC_FAR * UserName;
  1509. unsigned char __RPC_FAR * ComputerName;
  1510. unsigned short Privilege;
  1511. unsigned long AuthFlags;
  1512. } RPC_CLIENT_INFORMATION1, __RPC_FAR * PRPC_CLIENT_INFORMATION1;
  1513. #endif
  1514. RPCRTAPI
  1515. RPC_STATUS
  1516. RPC_ENTRY
  1517. RpcBindingServerFromClient (
  1518. IN RPC_BINDING_HANDLE ClientBinding,
  1519. OUT RPC_BINDING_HANDLE __RPC_FAR * ServerBinding
  1520. );
  1521. RPCRTAPI
  1522. DECLSPEC_NORETURN
  1523. void
  1524. RPC_ENTRY
  1525. RpcRaiseException (
  1526. IN RPC_STATUS exception
  1527. );
  1528. RPCRTAPI
  1529. RPC_STATUS
  1530. RPC_ENTRY
  1531. RpcTestCancel(
  1532. );
  1533. RPCRTAPI
  1534. RPC_STATUS
  1535. RPC_ENTRY
  1536. RpcServerTestCancel (
  1537. IN RPC_BINDING_HANDLE BindingHandle OPTIONAL
  1538. );
  1539. RPCRTAPI
  1540. RPC_STATUS
  1541. RPC_ENTRY
  1542. RpcCancelThread(
  1543. IN void * Thread
  1544. );
  1545. RPCRTAPI
  1546. RPC_STATUS
  1547. RPC_ENTRY
  1548. RpcCancelThreadEx(
  1549. IN void * Thread,
  1550. IN long Timeout
  1551. );
  1552. /* client/server */
  1553. RPCRTAPI
  1554. RPC_STATUS
  1555. RPC_ENTRY
  1556. UuidCreate (
  1557. OUT UUID __RPC_FAR * Uuid
  1558. );
  1559. /* client/server */
  1560. RPCRTAPI
  1561. RPC_STATUS
  1562. RPC_ENTRY
  1563. UuidCreateSequential (
  1564. OUT UUID __RPC_FAR * Uuid
  1565. );
  1566. #ifdef RPC_UNICODE_SUPPORTED
  1567. /* client/server */
  1568. RPCRTAPI
  1569. RPC_STATUS
  1570. RPC_ENTRY
  1571. UuidToStringA (
  1572. IN UUID __RPC_FAR * Uuid,
  1573. OUT unsigned char __RPC_FAR * __RPC_FAR * StringUuid
  1574. );
  1575. /* client/server */
  1576. RPCRTAPI
  1577. RPC_STATUS
  1578. RPC_ENTRY
  1579. UuidFromStringA (
  1580. IN unsigned char __RPC_FAR * StringUuid,
  1581. OUT UUID __RPC_FAR * Uuid
  1582. );
  1583. /* client/server */
  1584. RPCRTAPI
  1585. RPC_STATUS
  1586. RPC_ENTRY
  1587. UuidToStringW (
  1588. IN UUID __RPC_FAR * Uuid,
  1589. OUT unsigned short __RPC_FAR * __RPC_FAR * StringUuid
  1590. );
  1591. /* client/server */
  1592. RPCRTAPI
  1593. RPC_STATUS
  1594. RPC_ENTRY
  1595. UuidFromStringW (
  1596. IN unsigned short __RPC_FAR * StringUuid,
  1597. OUT UUID __RPC_FAR * Uuid
  1598. );
  1599. #ifdef UNICODE
  1600. #define UuidFromString UuidFromStringW
  1601. #define UuidToString UuidToStringW
  1602. #else /* UNICODE */
  1603. #define UuidFromString UuidFromStringA
  1604. #define UuidToString UuidToStringA
  1605. #endif /* UNICODE */
  1606. #else /* RPC_UNICODE_SUPPORTED */
  1607. /* client/server */
  1608. RPCRTAPI
  1609. RPC_STATUS
  1610. RPC_ENTRY
  1611. UuidToString (
  1612. IN UUID __RPC_FAR * Uuid,
  1613. OUT unsigned char __RPC_FAR * __RPC_FAR * StringUuid
  1614. );
  1615. /* client/server */
  1616. RPCRTAPI
  1617. RPC_STATUS
  1618. RPC_ENTRY
  1619. UuidFromString (
  1620. IN unsigned char __RPC_FAR * StringUuid,
  1621. OUT UUID __RPC_FAR * Uuid
  1622. );
  1623. #endif /* RPC_UNICODE_SUPPORTED */
  1624. RPCRTAPI
  1625. signed int
  1626. RPC_ENTRY
  1627. UuidCompare (
  1628. IN UUID __RPC_FAR * Uuid1,
  1629. IN UUID __RPC_FAR * Uuid2,
  1630. OUT RPC_STATUS __RPC_FAR * Status
  1631. );
  1632. RPCRTAPI
  1633. RPC_STATUS
  1634. RPC_ENTRY
  1635. UuidCreateNil (
  1636. OUT UUID __RPC_FAR * NilUuid
  1637. );
  1638. RPCRTAPI
  1639. int
  1640. RPC_ENTRY
  1641. UuidEqual (
  1642. IN UUID __RPC_FAR * Uuid1,
  1643. IN UUID __RPC_FAR * Uuid2,
  1644. OUT RPC_STATUS __RPC_FAR * Status
  1645. );
  1646. RPCRTAPI
  1647. unsigned short
  1648. RPC_ENTRY
  1649. UuidHash (
  1650. IN UUID __RPC_FAR * Uuid,
  1651. OUT RPC_STATUS __RPC_FAR * Status
  1652. );
  1653. RPCRTAPI
  1654. int
  1655. RPC_ENTRY
  1656. UuidIsNil (
  1657. IN UUID __RPC_FAR * Uuid,
  1658. OUT RPC_STATUS __RPC_FAR * Status
  1659. );
  1660. #ifdef RPC_UNICODE_SUPPORTED
  1661. RPCRTAPI
  1662. RPC_STATUS
  1663. RPC_ENTRY
  1664. RpcEpRegisterNoReplaceA (
  1665. IN RPC_IF_HANDLE IfSpec,
  1666. IN RPC_BINDING_VECTOR * BindingVector,
  1667. IN UUID_VECTOR * UuidVector OPTIONAL,
  1668. IN unsigned char * Annotation
  1669. );
  1670. RPCRTAPI
  1671. RPC_STATUS
  1672. RPC_ENTRY
  1673. RpcEpRegisterNoReplaceW (
  1674. IN RPC_IF_HANDLE IfSpec,
  1675. IN RPC_BINDING_VECTOR * BindingVector,
  1676. IN UUID_VECTOR * UuidVector OPTIONAL,
  1677. IN unsigned short * Annotation
  1678. );
  1679. RPCRTAPI
  1680. RPC_STATUS
  1681. RPC_ENTRY
  1682. RpcEpRegisterA (
  1683. IN RPC_IF_HANDLE IfSpec,
  1684. IN RPC_BINDING_VECTOR * BindingVector,
  1685. IN UUID_VECTOR * UuidVector OPTIONAL,
  1686. IN unsigned char * Annotation
  1687. );
  1688. RPCRTAPI
  1689. RPC_STATUS
  1690. RPC_ENTRY
  1691. RpcEpRegisterW (
  1692. IN RPC_IF_HANDLE IfSpec,
  1693. IN RPC_BINDING_VECTOR * BindingVector,
  1694. IN UUID_VECTOR * UuidVector OPTIONAL,
  1695. IN unsigned short * Annotation
  1696. );
  1697. #ifdef UNICODE
  1698. #define RpcEpRegisterNoReplace RpcEpRegisterNoReplaceW
  1699. #define RpcEpRegister RpcEpRegisterW
  1700. #else /* UNICODE */
  1701. #define RpcEpRegisterNoReplace RpcEpRegisterNoReplaceA
  1702. #define RpcEpRegister RpcEpRegisterA
  1703. #endif /* UNICODE */
  1704. #else /* RPC_UNICODE_SUPPORTED */
  1705. RPCRTAPI
  1706. RPC_STATUS
  1707. RPC_ENTRY
  1708. RpcEpRegisterNoReplace (
  1709. IN RPC_IF_HANDLE IfSpec,
  1710. IN RPC_BINDING_VECTOR * BindingVector,
  1711. IN UUID_VECTOR * UuidVector OPTIONAL,
  1712. IN unsigned char * Annotation
  1713. );
  1714. RPCRTAPI
  1715. RPC_STATUS
  1716. RPC_ENTRY
  1717. RpcEpRegister (
  1718. IN RPC_IF_HANDLE IfSpec,
  1719. IN RPC_BINDING_VECTOR * BindingVector,
  1720. IN UUID_VECTOR * UuidVector OPTIONAL,
  1721. IN unsigned char * Annotation
  1722. );
  1723. #endif /* RPC_UNICODE_SUPPORTED */
  1724. RPCRTAPI
  1725. RPC_STATUS
  1726. RPC_ENTRY
  1727. RpcEpUnregister(
  1728. IN RPC_IF_HANDLE IfSpec,
  1729. IN RPC_BINDING_VECTOR * BindingVector,
  1730. IN UUID_VECTOR * UuidVector
  1731. );
  1732. #ifdef RPC_UNICODE_SUPPORTED
  1733. RPCRTAPI
  1734. RPC_STATUS
  1735. RPC_ENTRY
  1736. DceErrorInqTextA (
  1737. IN RPC_STATUS RpcStatus,
  1738. OUT unsigned char __RPC_FAR * ErrorText
  1739. );
  1740. RPCRTAPI
  1741. RPC_STATUS
  1742. RPC_ENTRY
  1743. DceErrorInqTextW (
  1744. IN RPC_STATUS RpcStatus,
  1745. OUT unsigned short __RPC_FAR * ErrorText
  1746. );
  1747. #ifdef UNICODE
  1748. #define DceErrorInqText DceErrorInqTextW
  1749. #else /* UNICODE */
  1750. #define DceErrorInqText DceErrorInqTextA
  1751. #endif /* UNICODE */
  1752. #else /* RPC_UNICODE_SUPPORTED */
  1753. RPCRTAPI
  1754. RPC_STATUS
  1755. RPC_ENTRY
  1756. DceErrorInqText (
  1757. IN RPC_STATUS RpcStatus,
  1758. OUT unsigned char __RPC_FAR * ErrorText
  1759. );
  1760. #endif /* RPC_UNICODE_SUPPORTED */
  1761. #define DCE_C_ERROR_STRING_LEN 256
  1762. typedef I_RPC_HANDLE * RPC_EP_INQ_HANDLE;
  1763. #define RPC_C_EP_ALL_ELTS 0
  1764. #define RPC_C_EP_MATCH_BY_IF 1
  1765. #define RPC_C_EP_MATCH_BY_OBJ 2
  1766. #define RPC_C_EP_MATCH_BY_BOTH 3
  1767. #define RPC_C_VERS_ALL 1
  1768. #define RPC_C_VERS_COMPATIBLE 2
  1769. #define RPC_C_VERS_EXACT 3
  1770. #define RPC_C_VERS_MAJOR_ONLY 4
  1771. #define RPC_C_VERS_UPTO 5
  1772. RPCRTAPI
  1773. RPC_STATUS
  1774. RPC_ENTRY
  1775. RpcMgmtEpEltInqBegin (
  1776. IN RPC_BINDING_HANDLE EpBinding OPTIONAL,
  1777. IN unsigned long InquiryType,
  1778. IN RPC_IF_ID __RPC_FAR * IfId OPTIONAL,
  1779. IN unsigned long VersOption OPTIONAL,
  1780. IN UUID __RPC_FAR * ObjectUuid OPTIONAL,
  1781. OUT RPC_EP_INQ_HANDLE __RPC_FAR * InquiryContext
  1782. );
  1783. RPCRTAPI
  1784. RPC_STATUS
  1785. RPC_ENTRY
  1786. RpcMgmtEpEltInqDone (
  1787. IN OUT RPC_EP_INQ_HANDLE __RPC_FAR * InquiryContext
  1788. );
  1789. #ifdef RPC_UNICODE_SUPPORTED
  1790. RPCRTAPI
  1791. RPC_STATUS
  1792. RPC_ENTRY
  1793. RpcMgmtEpEltInqNextA (
  1794. IN RPC_EP_INQ_HANDLE InquiryContext,
  1795. OUT RPC_IF_ID __RPC_FAR * IfId,
  1796. OUT RPC_BINDING_HANDLE __RPC_FAR * Binding OPTIONAL,
  1797. OUT UUID __RPC_FAR * ObjectUuid OPTIONAL,
  1798. OUT unsigned char __RPC_FAR * __RPC_FAR * Annotation OPTIONAL
  1799. );
  1800. RPCRTAPI
  1801. RPC_STATUS
  1802. RPC_ENTRY
  1803. RpcMgmtEpEltInqNextW (
  1804. IN RPC_EP_INQ_HANDLE InquiryContext,
  1805. OUT RPC_IF_ID __RPC_FAR * IfId,
  1806. OUT RPC_BINDING_HANDLE __RPC_FAR * Binding OPTIONAL,
  1807. OUT UUID __RPC_FAR * ObjectUuid OPTIONAL,
  1808. OUT unsigned short __RPC_FAR * __RPC_FAR * Annotation OPTIONAL
  1809. );
  1810. #ifdef UNICODE
  1811. #define RpcMgmtEpEltInqNext RpcMgmtEpEltInqNextW
  1812. #else /* UNICODE */
  1813. #define RpcMgmtEpEltInqNext RpcMgmtEpEltInqNextA
  1814. #endif /* UNICODE */
  1815. #else /* RPC_UNICODE_SUPPORTED */
  1816. RPCRTAPI
  1817. RPC_STATUS
  1818. RPC_ENTRY
  1819. RpcMgmtEpEltInqNext (
  1820. IN RPC_EP_INQ_HANDLE InquiryContext,
  1821. OUT RPC_IF_ID __RPC_FAR * IfId,
  1822. OUT RPC_BINDING_HANDLE __RPC_FAR * Binding OPTIONAL,
  1823. OUT unsigned char __RPC_FAR * __RPC_FAR * Annotation OPTIONAL
  1824. );
  1825. #endif /* RPC_UNICODE_SUPPORTED */
  1826. RPCRTAPI
  1827. RPC_STATUS
  1828. RPC_ENTRY
  1829. RpcMgmtEpUnregister (
  1830. IN RPC_BINDING_HANDLE EpBinding OPTIONAL,
  1831. IN RPC_IF_ID __RPC_FAR * IfId,
  1832. IN RPC_BINDING_HANDLE Binding,
  1833. IN UUID __RPC_FAR * ObjectUuid OPTIONAL
  1834. );
  1835. typedef int
  1836. (__RPC_API * RPC_MGMT_AUTHORIZATION_FN) (
  1837. IN RPC_BINDING_HANDLE ClientBinding,
  1838. IN unsigned long RequestedMgmtOperation,
  1839. OUT RPC_STATUS __RPC_FAR * Status
  1840. );
  1841. #define RPC_C_MGMT_INQ_IF_IDS 0
  1842. #define RPC_C_MGMT_INQ_PRINC_NAME 1
  1843. #define RPC_C_MGMT_INQ_STATS 2
  1844. #define RPC_C_MGMT_IS_SERVER_LISTEN 3
  1845. #define RPC_C_MGMT_STOP_SERVER_LISTEN 4
  1846. RPCRTAPI
  1847. RPC_STATUS
  1848. RPC_ENTRY
  1849. RpcMgmtSetAuthorizationFn (
  1850. IN RPC_MGMT_AUTHORIZATION_FN AuthorizationFn
  1851. );
  1852. #define RPC_C_PARM_MAX_PACKET_LENGTH 1
  1853. #define RPC_C_PARM_BUFFER_LENGTH 2
  1854. #define RPC_IF_AUTOLISTEN 0x0001
  1855. #define RPC_IF_OLE 0x0002
  1856. #define RPC_IF_ALLOW_UNKNOWN_AUTHORITY 0x0004
  1857. #define RPC_IF_ALLOW_SECURE_ONLY 0x0008
  1858. #define RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH 0x0010
  1859. #include <rpcdcep.h>
  1860. #ifdef __cplusplus
  1861. }
  1862. #endif
  1863. #endif /* __RPCDCE_H__ */