1 | /*
|
---|
2 | * Copyright (C) 2000 Francois Gouget
|
---|
3 | *
|
---|
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.
|
---|
8 | *
|
---|
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.
|
---|
13 | *
|
---|
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef __WINE_RPCDCEP_H
|
---|
29 | #define __WINE_RPCDCEP_H
|
---|
30 |
|
---|
31 | #ifdef __cplusplus
|
---|
32 | extern "C" {
|
---|
33 | #endif
|
---|
34 |
|
---|
35 | typedef struct _RPC_VERSION {
|
---|
36 | unsigned short MajorVersion;
|
---|
37 | unsigned short MinorVersion;
|
---|
38 | } RPC_VERSION;
|
---|
39 |
|
---|
40 | typedef struct _RPC_SYNTAX_IDENTIFIER {
|
---|
41 | GUID SyntaxGUID;
|
---|
42 | RPC_VERSION SyntaxVersion;
|
---|
43 | } RPC_SYNTAX_IDENTIFIER, *PRPC_SYNTAX_IDENTIFIER;
|
---|
44 |
|
---|
45 | typedef struct _RPC_MESSAGE
|
---|
46 | {
|
---|
47 | RPC_BINDING_HANDLE Handle;
|
---|
48 | ULONG DataRepresentation;
|
---|
49 | void* Buffer;
|
---|
50 | unsigned int BufferLength;
|
---|
51 | unsigned int ProcNum;
|
---|
52 | PRPC_SYNTAX_IDENTIFIER TransferSyntax;
|
---|
53 | void* RpcInterfaceInformation;
|
---|
54 | void* ReservedForRuntime;
|
---|
55 | RPC_MGR_EPV* ManagerEpv;
|
---|
56 | void* ImportContext;
|
---|
57 | ULONG RpcFlags;
|
---|
58 | } RPC_MESSAGE, *PRPC_MESSAGE;
|
---|
59 |
|
---|
60 | /* or'ed with ProcNum */
|
---|
61 | #define RPC_FLAGS_VALID_BIT 0x00008000
|
---|
62 |
|
---|
63 | #define RPC_CONTEXT_HANDLE_DEFAULT_GUARD ((void *)0xfffff00d)
|
---|
64 |
|
---|
65 | #define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS 0x00000000
|
---|
66 | #define RPC_CONTEXT_HANDLE_FLAGS 0x30000000
|
---|
67 | #define RPC_CONTEXT_HANDLE_SERIALIZE 0x10000000
|
---|
68 | #define RPC_CONTEXT_HANDLE_DONT_SERIALIZE 0x20000000
|
---|
69 | #define RPC_TYPE_STRICT_CONTEXT_HANDLE 0x40000000
|
---|
70 |
|
---|
71 | #define RPC_NCA_FLAGS_DEFAULT 0x00000000
|
---|
72 | #define RPC_NCA_FLAGS_IDEMPOTENT 0x00000001
|
---|
73 | #define RPC_NCA_FLAGS_BROADCAST 0x00000002
|
---|
74 | #define RPC_NCA_FLAGS_MAYBE 0x00000004
|
---|
75 |
|
---|
76 | #define RPC_BUFFER_COMPLETE 0x00001000
|
---|
77 | #define RPC_BUFFER_PARTIAL 0x00002000
|
---|
78 | #define RPC_BUFFER_EXTRA 0x00004000
|
---|
79 | #define RPC_BUFFER_ASYNC 0x00008000
|
---|
80 | #define RPC_BUFFER_NONOTIFY 0x00010000
|
---|
81 |
|
---|
82 | #define RPCFLG_MESSAGE 0x01000000
|
---|
83 | #define RPCFLG_HAS_MULTI_SYNTAXES 0x02000000
|
---|
84 | #define RPCFLG_HAS_CALLBACK 0x04000000
|
---|
85 | #define RPCFLG_AUTO_COMPLETE 0x08000000
|
---|
86 | #define RPCFLG_LOCAL_CALL 0x10000000
|
---|
87 | #define RPCFLG_INPUT_SYNCHRONOUS 0x20000000
|
---|
88 | #define RPCFLG_ASYNCHRONOUS 0x40000000
|
---|
89 | #define RPCFLG_NON_NDR 0x80000000
|
---|
90 |
|
---|
91 | typedef void (__RPC_STUB *RPC_DISPATCH_FUNCTION)(PRPC_MESSAGE Message);
|
---|
92 | typedef RPC_STATUS (RPC_ENTRY *RPC_FORWARD_FUNCTION)(UUID *InterfaceId, RPC_VERSION *InterfaceVersion, UUID *ObjectId, unsigned char *Rpcpro, void **ppDestEndpoint);
|
---|
93 |
|
---|
94 | typedef struct
|
---|
95 | {
|
---|
96 | unsigned int DispatchTableCount;
|
---|
97 | RPC_DISPATCH_FUNCTION* DispatchTable;
|
---|
98 | LONG_PTR Reserved;
|
---|
99 | } RPC_DISPATCH_TABLE, *PRPC_DISPATCH_TABLE;
|
---|
100 |
|
---|
101 | typedef struct _RPC_PROTSEQ_ENDPOINT
|
---|
102 | {
|
---|
103 | unsigned char* RpcProtocolSequence;
|
---|
104 | unsigned char* Endpoint;
|
---|
105 | } RPC_PROTSEQ_ENDPOINT, *PRPC_PROTSEQ_ENDPOINT;
|
---|
106 |
|
---|
107 | #define NT351_INTERFACE_SIZE 0x40
|
---|
108 | #define RPC_INTERFACE_HAS_PIPES 0x0001
|
---|
109 |
|
---|
110 | typedef struct _RPC_SERVER_INTERFACE
|
---|
111 | {
|
---|
112 | unsigned int Length;
|
---|
113 | RPC_SYNTAX_IDENTIFIER InterfaceId;
|
---|
114 | RPC_SYNTAX_IDENTIFIER TransferSyntax;
|
---|
115 | PRPC_DISPATCH_TABLE DispatchTable;
|
---|
116 | unsigned int RpcProtseqEndpointCount;
|
---|
117 | PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
|
---|
118 | RPC_MGR_EPV* DefaultManagerEpv;
|
---|
119 | void const* InterpreterInfo;
|
---|
120 | unsigned int Flags;
|
---|
121 | } RPC_SERVER_INTERFACE, *PRPC_SERVER_INTERFACE;
|
---|
122 |
|
---|
123 | typedef struct _RPC_CLIENT_INTERFACE
|
---|
124 | {
|
---|
125 | unsigned int Length;
|
---|
126 | RPC_SYNTAX_IDENTIFIER InterfaceId;
|
---|
127 | RPC_SYNTAX_IDENTIFIER TransferSyntax;
|
---|
128 | PRPC_DISPATCH_TABLE DispatchTable;
|
---|
129 | unsigned int RpcProtseqEndpointCount;
|
---|
130 | PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
|
---|
131 | ULONG_PTR Reserved;
|
---|
132 | void const* InterpreterInfo;
|
---|
133 | unsigned int Flags;
|
---|
134 | } RPC_CLIENT_INTERFACE, *PRPC_CLIENT_INTERFACE;
|
---|
135 |
|
---|
136 | #define TRANSPORT_TYPE_CN 0x01
|
---|
137 | #define TRANSPORT_TYPE_DG 0x02
|
---|
138 | #define TRANSPORT_TYPE_LPC 0x04
|
---|
139 | #define TRANSPORT_TYPE_WMSG 0x08
|
---|
140 |
|
---|
141 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
142 | I_RpcNegotiateTransferSyntax( RPC_MESSAGE* Message );
|
---|
143 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
144 | I_RpcGetBuffer( RPC_MESSAGE* Message );
|
---|
145 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
146 | I_RpcGetBufferWithObject( RPC_MESSAGE* Message, UUID* ObjectUuid );
|
---|
147 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
148 | I_RpcSendReceive( RPC_MESSAGE* Message );
|
---|
149 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
150 | I_RpcFreeBuffer( RPC_MESSAGE* Message );
|
---|
151 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
152 | I_RpcSend( RPC_MESSAGE* Message );
|
---|
153 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
154 | I_RpcReceive( RPC_MESSAGE* Message );
|
---|
155 |
|
---|
156 | RPCRTAPI void* RPC_ENTRY
|
---|
157 | I_RpcAllocate( unsigned int Size );
|
---|
158 | RPCRTAPI void RPC_ENTRY
|
---|
159 | I_RpcFree( void* Object );
|
---|
160 |
|
---|
161 | RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
|
---|
162 | I_RpcGetCurrentCallHandle( void );
|
---|
163 |
|
---|
164 | /*
|
---|
165 | * The platform SDK headers don't define these functions at all if WINNT is defined
|
---|
166 | * The MSVC6 headers define two different sets of functions :
|
---|
167 | * If WINNT and MSWMSG are defined, the NT versions are defined
|
---|
168 | * If WINNT is not defined, the windows 9x versions are defined.
|
---|
169 | * Note that the prototypes for I_RpcBindingSetAsync are different for each case.
|
---|
170 | *
|
---|
171 | * Wine defaults to the WinNT case and only defines these function is MSWMSG is
|
---|
172 | * defined. Defining the NT functions by default causes MIDL generated proxies
|
---|
173 | * to not compile.
|
---|
174 | */
|
---|
175 |
|
---|
176 | #if 1 /* WINNT */
|
---|
177 | #ifdef MSWMSG
|
---|
178 |
|
---|
179 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
180 | I_RpcServerStartListening( HWND hWnd );
|
---|
181 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
182 | I_RpcServerStopListening( void );
|
---|
183 | /* WINNT */
|
---|
184 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
185 | I_GetThreadWindowHandle( HWND* hWnd );
|
---|
186 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
187 | I_RpcAsyncSendReceive( RPC_MESSAGE* Message, void* Context, HWND hWnd );
|
---|
188 |
|
---|
189 | typedef RPC_STATUS (*RPC_BLOCKING_FN)(void* hWnd, void* Context, HANDLE hSyncEvent);
|
---|
190 |
|
---|
191 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
192 | I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn );
|
---|
193 |
|
---|
194 | RPCRTAPI UINT RPC_ENTRY
|
---|
195 | I_RpcWindowProc( void* hWnd, UINT Message, UINT wParam, ULONG lParam );
|
---|
196 |
|
---|
197 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
198 | I_RpcSetWMsgEndpoint( WCHAR* Endpoint );
|
---|
199 |
|
---|
200 | #endif
|
---|
201 |
|
---|
202 | #else
|
---|
203 |
|
---|
204 | /* WIN9x */
|
---|
205 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
206 | I_RpcServerStartListening( void* hWnd );
|
---|
207 |
|
---|
208 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
209 | I_RpcServerStopListening( void );
|
---|
210 |
|
---|
211 | typedef RPC_STATUS (*RPC_BLOCKING_FN)(void* hWnd, void* Context, void* hSyncEvent);
|
---|
212 |
|
---|
213 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
214 | I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn, ULONG ServerTid );
|
---|
215 |
|
---|
216 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
217 | I_RpcSetThreadParams( int fClientFree, void* Context, void* hWndClient );
|
---|
218 |
|
---|
219 | RPCRTAPI UINT RPC_ENTRY
|
---|
220 | I_RpcWindowProc( void* hWnd, unsigned int Message, unsigned int wParam, ULONG lParam );
|
---|
221 |
|
---|
222 | #endif
|
---|
223 |
|
---|
224 | RPCRTAPI RPC_STATUS RPC_ENTRY
|
---|
225 | I_RpcBindingInqTransportType( RPC_BINDING_HANDLE Binding, unsigned int* Type );
|
---|
226 |
|
---|
227 | RPCRTAPI LONG RPC_ENTRY I_RpcMapWin32Status(RPC_STATUS);
|
---|
228 |
|
---|
229 | #ifdef __cplusplus
|
---|
230 | }
|
---|
231 | #endif
|
---|
232 |
|
---|
233 | #endif /*__WINE_RPCDCEP_H */
|
---|