2 * Copyright (C) 2000 Francois Gouget
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_RPCDCE_H
20 #define __WINE_RPCDCE_H
41 typedef void* RPC_AUTH_IDENTITY_HANDLE;
42 typedef void* RPC_AUTHZ_HANDLE;
43 typedef void* RPC_IF_HANDLE;
44 typedef I_RPC_HANDLE RPC_BINDING_HANDLE;
45 typedef RPC_BINDING_HANDLE handle_t;
46 #define rpc_binding_handle_t RPC_BINDING_HANDLE
47 #define RPC_MGR_EPV void
49 typedef struct _RPC_BINDING_VECTOR
52 RPC_BINDING_HANDLE BindingH[1];
54 #define rpc_binding_vector_t RPC_BINDING_VECTOR
56 typedef struct _UUID_VECTOR
61 #define uuid_vector_t UUID_VECTOR
63 typedef struct _RPC_IF_ID
66 unsigned short VersMajor;
67 unsigned short VersMinor;
70 #define RPC_C_BINDING_INFINITE_TIMEOUT 10
71 #define RPC_C_BINDING_MIN_TIMEOUT 0
72 #define RPC_C_BINDING_DEFAULT_TIMEOUT 5
73 #define RPC_C_BINDING_MAX_TIMEOUT 9
75 #define RPC_C_CANCEL_INFINITE_TIMEOUT -1
77 #define RPC_C_LISTEN_MAX_CALLS_DEFAULT 1234
78 #define RPC_C_PROTSEQ_MAX_REQS_DEFAULT 10
80 /* RPC_POLICY EndpointFlags */
81 #define RPC_C_BIND_TO_ALL_NICS 0x1
82 #define RPC_C_USE_INTERNET_PORT 0x1
83 #define RPC_C_USE_INTRANET_PORT 0x2
84 #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
96 typedef RPC_STATUS RPC_ENTRY RPC_IF_CALLBACK_FN( RPC_IF_HANDLE InterfaceUuid, void *Context );
97 typedef void (__RPC_USER *RPC_AUTH_KEY_RETRIEVAL_FN)();
99 typedef struct _RPC_POLICY
102 unsigned long EndpointFlags;
103 unsigned long NICFlags;
104 } RPC_POLICY, *PRPC_POLICY;
106 /* RpcServerRegisterIfEx Flags */
107 #define RPC_IF_AUTOLISTEN 0x1
108 #define RPC_IF_OLE 0x2
109 #define RPC_IF_ALLOW_UNKNOWN_AUTHORITY 0x4
110 #define RPC_IF_ALLOW_SECURE_ONLY 0x8
112 RPC_STATUS RPC_ENTRY DceErrorInqTextA(RPC_STATUS e, unsigned char *buffer);
113 RPC_STATUS RPC_ENTRY DceErrorInqTextW(RPC_STATUS e, unsigned short *buffer);
114 #define DceErrorInqText WINELIB_NAME_AW(DceErrorInqText)
116 RPCRTAPI void RPC_ENTRY
117 RpcRaiseException( RPC_STATUS exception );
119 RPCRTAPI RPC_STATUS RPC_ENTRY
120 RpcBindingCopy( RPC_BINDING_HANDLE SourceBinding, RPC_BINDING_HANDLE* DestinationBinding );
122 RPCRTAPI RPC_STATUS RPC_ENTRY
123 RpcBindingFree( RPC_BINDING_HANDLE* Binding );
125 RPCRTAPI RPC_STATUS RPC_ENTRY
126 RpcBindingInqObject( RPC_BINDING_HANDLE Binding, UUID* ObjectUuid );
127 RPCRTAPI RPC_STATUS RPC_ENTRY
128 RpcBindingReset( RPC_BINDING_HANDLE Binding );
129 RPCRTAPI RPC_STATUS RPC_ENTRY
130 RpcBindingSetObject( RPC_BINDING_HANDLE Binding, UUID* ObjectUuid );
131 RPCRTAPI RPC_STATUS RPC_ENTRY
132 RpcObjectSetType( UUID* ObjUuid, UUID* TypeUuid );
134 RPCRTAPI RPC_STATUS RPC_ENTRY
135 RpcBindingFromStringBindingA( unsigned char *StringBinding, RPC_BINDING_HANDLE* Binding );
136 RPCRTAPI RPC_STATUS RPC_ENTRY
137 RpcBindingFromStringBindingW( unsigned short *StringBinding, RPC_BINDING_HANDLE* Binding );
138 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
140 RPCRTAPI RPC_STATUS RPC_ENTRY
141 RpcBindingToStringBindingA( RPC_BINDING_HANDLE Binding, unsigned char **StringBinding );
142 RPCRTAPI RPC_STATUS RPC_ENTRY
143 RpcBindingToStringBindingW( RPC_BINDING_HANDLE Binding, unsigned short **StringBinding );
144 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
146 RPCRTAPI RPC_STATUS RPC_ENTRY
147 RpcBindingVectorFree( RPC_BINDING_VECTOR** BindingVector );
149 RPCRTAPI RPC_STATUS RPC_ENTRY
150 RpcStringBindingComposeA( unsigned char *ObjUuid, unsigned char *Protseq, unsigned char *NetworkAddr,
151 unsigned char *Endpoint, unsigned char *Options, unsigned char **StringBinding );
152 RPCRTAPI RPC_STATUS RPC_ENTRY
153 RpcStringBindingComposeW( unsigned short *ObjUuid, unsigned short *Protseq, unsigned short *NetworkAddr,
154 unsigned short *Endpoint, unsigned short *Options, unsigned short **StringBinding );
155 #define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
157 RPCRTAPI RPC_STATUS RPC_ENTRY
158 RpcStringBindingParseA( unsigned char *StringBinding, unsigned char **ObjUuid, unsigned char **Protseq,
159 unsigned char **NetworkAddr, unsigned char **Endpoint, unsigned char **NetworkOptions );
160 RPCRTAPI RPC_STATUS RPC_ENTRY
161 RpcStringBindingParseW( unsigned short *StringBinding, unsigned short **ObjUuid, unsigned short **Protseq,
162 unsigned short **NetworkAddr, unsigned short **Endpoint, unsigned short **NetworkOptions );
163 #define RpcStringBindingParse WINELIB_NAME_AW(RpcStringBindingParse)
165 RPCRTAPI RPC_STATUS RPC_ENTRY
166 RpcEpResolveBinding( RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE IfSpec );
168 RPCRTAPI RPC_STATUS RPC_ENTRY
169 RpcEpRegisterA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
170 UUID_VECTOR* UuidVector, unsigned char *Annotation );
171 RPCRTAPI RPC_STATUS RPC_ENTRY
172 RpcEpRegisterW( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
173 UUID_VECTOR* UuidVector, unsigned short *Annotation );
174 #define RpcEpRegister WINELIB_NAME_AW(RpcEpRegister)
176 RPCRTAPI RPC_STATUS RPC_ENTRY
177 RpcEpRegisterNoReplaceA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
178 UUID_VECTOR* UuidVector, unsigned char *Annotation );
179 RPCRTAPI RPC_STATUS RPC_ENTRY
180 RpcEpRegisterNoReplaceW( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
181 UUID_VECTOR* UuidVector, unsigned short *Annotation );
182 #define RpcEpRegisterNoReplace WINELIB_NAME_AW(RpcEpRegisterNoReplace)
184 RPCRTAPI RPC_STATUS RPC_ENTRY
185 RpcEpUnregister( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
186 UUID_VECTOR* UuidVector );
188 RPCRTAPI RPC_STATUS RPC_ENTRY
189 RpcServerInqBindings( RPC_BINDING_VECTOR** BindingVector );
191 RPCRTAPI RPC_STATUS RPC_ENTRY
192 RpcServerListen( unsigned int MinimumCallThreads, unsigned int MaxCalls, unsigned int DontWait );
194 RPCRTAPI RPC_STATUS RPC_ENTRY
195 RpcMgmtWaitServerListen( void );
197 RPCRTAPI RPC_STATUS RPC_ENTRY
198 RpcMgmtStopServerListening( RPC_BINDING_HANDLE Binding );
200 RPCRTAPI RPC_STATUS RPC_ENTRY
201 RpcServerRegisterIf( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv );
203 RPCRTAPI RPC_STATUS RPC_ENTRY
204 RpcServerRegisterIfEx( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv,
205 unsigned int Flags, unsigned int MaxCalls, RPC_IF_CALLBACK_FN* IfCallbackFn );
207 RPCRTAPI RPC_STATUS RPC_ENTRY
208 RpcServerRegisterIf2( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv,
209 unsigned int Flags, unsigned int MaxCalls, unsigned int MaxRpcSize, RPC_IF_CALLBACK_FN* IfCallbackFn );
211 RPCRTAPI RPC_STATUS RPC_ENTRY
212 RpcServerUnregisterIf( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, unsigned int WaitForCallsToComplete );
214 RPCRTAPI RPC_STATUS RPC_ENTRY
215 RpcServerUnregisterIfEx( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, int RundownContextHandles );
218 RPCRTAPI RPC_STATUS RPC_ENTRY
219 RpcServerUseProtseqA(unsigned char *Protseq, unsigned int MaxCalls, void *SecurityDescriptor);
220 RPCRTAPI RPC_STATUS RPC_ENTRY
221 RpcServerUseProtseqW(unsigned short *Protseq, unsigned int MaxCalls, void *SecurityDescriptor);
222 #define RpcServerUseProtseq WINELIB_NAME_AW(RpcServerUseProtseq)
224 RPCRTAPI RPC_STATUS RPC_ENTRY
225 RpcServerUseProtseqEpA( unsigned char *Protseq, unsigned int MaxCalls, unsigned char *Endpoint, void *SecurityDescriptor );
226 RPCRTAPI RPC_STATUS RPC_ENTRY
227 RpcServerUseProtseqEpW( unsigned short *Protseq, unsigned int MaxCalls, unsigned short *Endpoint, void *SecurityDescriptor );
228 #define RpcServerUseProtseqEp WINELIB_NAME_AW(RpcServerUseProtseqEp)
230 RPCRTAPI RPC_STATUS RPC_ENTRY
231 RpcServerUseProtseqEpExA( unsigned char *Protseq, unsigned int MaxCalls, unsigned char *Endpoint, void *SecurityDescriptor,
232 PRPC_POLICY Policy );
233 RPCRTAPI RPC_STATUS RPC_ENTRY
234 RpcServerUseProtseqEpExW( unsigned short *Protseq, unsigned int MaxCalls, unsigned short *Endpoint, void *SecurityDescriptor,
235 PRPC_POLICY Policy );
236 #define RpcServerUseProtseqEpEx WINELIB_NAME_AW(RpcServerUseProtseqEpEx)
238 RPCRTAPI RPC_STATUS RPC_ENTRY
239 RpcServerRegisterAuthInfoA( unsigned char *ServerPrincName, unsigned long AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,
241 RPCRTAPI RPC_STATUS RPC_ENTRY
242 RpcServerRegisterAuthInfoW( unsigned short *ServerPrincName, unsigned long AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,
244 #define RpcServerRegisterAuthInfo WINELIB_NAME_AW(RpcServerRegisterAuthInfo)
246 RPCRTAPI RPC_STATUS RPC_ENTRY
247 RpcNetworkIsProtseqValidA( unsigned char *protseq );
248 RPCRTAPI RPC_STATUS RPC_ENTRY
249 RpcNetworkIsProtseqValidW( unsigned short *protseq );
250 #define RpcNetworkIsProtseqValid WINELIB_NAME_AW(RpcNetworkIsProtseqValid)
252 RPCRTAPI RPC_STATUS RPC_ENTRY
253 RpcStringFreeA(unsigned char** String);
254 RPCRTAPI RPC_STATUS RPC_ENTRY
255 RpcStringFreeW(unsigned short** String);
256 #define RpcStringFree WINELIB_NAME_AW(RpcStringFree)
258 RPCRTAPI RPC_STATUS RPC_ENTRY
259 UuidToStringA( UUID* Uuid, unsigned char** StringUuid );
260 RPCRTAPI RPC_STATUS RPC_ENTRY
261 UuidToStringW( UUID* Uuid, unsigned short** StringUuid );
262 #define UuidToString WINELIB_NAME_AW(UuidToString)
264 RPCRTAPI RPC_STATUS RPC_ENTRY
265 UuidFromStringA( unsigned char* StringUuid, UUID* Uuid );
266 RPCRTAPI RPC_STATUS RPC_ENTRY
267 UuidFromStringW( unsigned short* StringUuid, UUID* Uuid );
268 #define UuidFromString WINELIB_NAME_AW(UuidFromString)
270 RPCRTAPI RPC_STATUS RPC_ENTRY
271 UuidCreate( UUID* Uuid );
272 RPCRTAPI RPC_STATUS RPC_ENTRY
273 UuidCreateSequential( UUID* Uuid );
274 RPCRTAPI RPC_STATUS RPC_ENTRY
275 UuidCreateNil( UUID* Uuid );
276 RPCRTAPI signed int RPC_ENTRY
277 UuidCompare( UUID* Uuid1, UUID* Uuid2, RPC_STATUS* Status_ );
278 RPCRTAPI int RPC_ENTRY
279 UuidEqual( UUID* Uuid1, UUID* Uuid2, RPC_STATUS* Status_ );
280 RPCRTAPI unsigned short RPC_ENTRY
281 UuidHash(UUID* Uuid, RPC_STATUS* Status_ );
282 RPCRTAPI int RPC_ENTRY
283 UuidIsNil( UUID* Uuid, RPC_STATUS* Status_ );
287 #endif /*__WINE_RPCDCE_H */