dxgi: Fix a typo in a comment.
[wine.git] / include / rpcdcep.h
blob2eeef973ff0226beaf09ffa7a17984d4c0e71425
1 /*
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_RPCDCEP_H
20 #define __WINE_RPCDCEP_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 typedef struct _RPC_VERSION {
27 unsigned short MajorVersion;
28 unsigned short MinorVersion;
29 } RPC_VERSION;
31 typedef struct _RPC_SYNTAX_IDENTIFIER {
32 GUID SyntaxGUID;
33 RPC_VERSION SyntaxVersion;
34 } RPC_SYNTAX_IDENTIFIER, *PRPC_SYNTAX_IDENTIFIER;
36 typedef struct _RPC_MESSAGE
38 RPC_BINDING_HANDLE Handle;
39 ULONG DataRepresentation;
40 void* Buffer;
41 unsigned int BufferLength;
42 unsigned int ProcNum;
43 PRPC_SYNTAX_IDENTIFIER TransferSyntax;
44 void* RpcInterfaceInformation;
45 void* ReservedForRuntime;
46 RPC_MGR_EPV* ManagerEpv;
47 void* ImportContext;
48 ULONG RpcFlags;
49 } RPC_MESSAGE, *PRPC_MESSAGE;
51 /* or'ed with ProcNum */
52 #define RPC_FLAGS_VALID_BIT 0x00008000
54 #define RPC_CONTEXT_HANDLE_DEFAULT_GUARD ((void *)0xfffff00d)
56 #define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS 0x00000000
57 #define RPC_CONTEXT_HANDLE_FLAGS 0x30000000
58 #define RPC_CONTEXT_HANDLE_SERIALIZE 0x10000000
59 #define RPC_CONTEXT_HANDLE_DONT_SERIALIZE 0x20000000
60 #define RPC_TYPE_STRICT_CONTEXT_HANDLE 0x40000000
62 #define RPC_NCA_FLAGS_DEFAULT 0x00000000
63 #define RPC_NCA_FLAGS_IDEMPOTENT 0x00000001
64 #define RPC_NCA_FLAGS_BROADCAST 0x00000002
65 #define RPC_NCA_FLAGS_MAYBE 0x00000004
67 #define RPC_BUFFER_COMPLETE 0x00001000
68 #define RPC_BUFFER_PARTIAL 0x00002000
69 #define RPC_BUFFER_EXTRA 0x00004000
70 #define RPC_BUFFER_ASYNC 0x00008000
71 #define RPC_BUFFER_NONOTIFY 0x00010000
73 #define RPCFLG_MESSAGE 0x01000000
74 #define RPCFLG_HAS_MULTI_SYNTAXES 0x02000000
75 #define RPCFLG_HAS_CALLBACK 0x04000000
76 #define RPCFLG_AUTO_COMPLETE 0x08000000
77 #define RPCFLG_LOCAL_CALL 0x10000000
78 #define RPCFLG_INPUT_SYNCHRONOUS 0x20000000
79 #define RPCFLG_ASYNCHRONOUS 0x40000000
80 #define RPCFLG_NON_NDR 0x80000000
82 typedef void (__RPC_STUB *RPC_DISPATCH_FUNCTION)(PRPC_MESSAGE Message);
83 typedef RPC_STATUS (RPC_ENTRY *RPC_FORWARD_FUNCTION)(UUID *InterfaceId, RPC_VERSION *InterfaceVersion, UUID *ObjectId, unsigned char *Rpcpro, void **ppDestEndpoint);
85 typedef struct
87 unsigned int DispatchTableCount;
88 RPC_DISPATCH_FUNCTION* DispatchTable;
89 LONG_PTR Reserved;
90 } RPC_DISPATCH_TABLE, *PRPC_DISPATCH_TABLE;
92 typedef struct _RPC_PROTSEQ_ENDPOINT
94 unsigned char* RpcProtocolSequence;
95 unsigned char* Endpoint;
96 } RPC_PROTSEQ_ENDPOINT, *PRPC_PROTSEQ_ENDPOINT;
98 #define NT351_INTERFACE_SIZE 0x40
99 #define RPC_INTERFACE_HAS_PIPES 0x0001
101 typedef struct _RPC_SERVER_INTERFACE
103 unsigned int Length;
104 RPC_SYNTAX_IDENTIFIER InterfaceId;
105 RPC_SYNTAX_IDENTIFIER TransferSyntax;
106 PRPC_DISPATCH_TABLE DispatchTable;
107 unsigned int RpcProtseqEndpointCount;
108 PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
109 RPC_MGR_EPV* DefaultManagerEpv;
110 void const* InterpreterInfo;
111 unsigned int Flags;
112 } RPC_SERVER_INTERFACE, *PRPC_SERVER_INTERFACE;
114 typedef struct _RPC_CLIENT_INTERFACE
116 unsigned int Length;
117 RPC_SYNTAX_IDENTIFIER InterfaceId;
118 RPC_SYNTAX_IDENTIFIER TransferSyntax;
119 PRPC_DISPATCH_TABLE DispatchTable;
120 unsigned int RpcProtseqEndpointCount;
121 PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
122 ULONG_PTR Reserved;
123 void const* InterpreterInfo;
124 unsigned int Flags;
125 } RPC_CLIENT_INTERFACE, *PRPC_CLIENT_INTERFACE;
127 #define RPC_C_OPT_COOKIE_AUTH 7
129 typedef struct _RPC_C_OPT_COOKIE_AUTH_DESCRIPTOR
131 ULONG BufferSize;
132 char *Buffer;
133 } RPC_C_OPT_COOKIE_AUTH_DESCRIPTOR;
135 #define TRANSPORT_TYPE_CN 0x01
136 #define TRANSPORT_TYPE_DG 0x02
137 #define TRANSPORT_TYPE_LPC 0x04
138 #define TRANSPORT_TYPE_WMSG 0x08
140 RPCRTAPI RPC_STATUS RPC_ENTRY
141 I_RpcNegotiateTransferSyntax( RPC_MESSAGE* Message );
142 RPCRTAPI RPC_STATUS RPC_ENTRY
143 I_RpcGetBuffer( RPC_MESSAGE* Message );
144 RPCRTAPI RPC_STATUS RPC_ENTRY
145 I_RpcGetBufferWithObject( RPC_MESSAGE* Message, UUID* ObjectUuid );
146 RPCRTAPI RPC_STATUS RPC_ENTRY
147 I_RpcSendReceive( RPC_MESSAGE* Message );
148 RPCRTAPI RPC_STATUS RPC_ENTRY
149 I_RpcFreeBuffer( RPC_MESSAGE* Message );
150 RPCRTAPI RPC_STATUS RPC_ENTRY
151 I_RpcSend( RPC_MESSAGE* Message );
152 RPCRTAPI RPC_STATUS RPC_ENTRY
153 I_RpcReceive( RPC_MESSAGE* Message );
155 RPCRTAPI void RPC_ENTRY
156 I_RpcFree( void* Object );
157 RPCRTAPI void* RPC_ENTRY
158 I_RpcAllocate( unsigned int Size )
159 __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(I_RpcFree) __WINE_MALLOC;
161 RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
162 I_RpcGetCurrentCallHandle( void );
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.
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.
176 #if 1 /* WINNT */
177 #ifdef MSWMSG
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 );
189 typedef RPC_STATUS (*RPC_BLOCKING_FN)(void* hWnd, void* Context, HANDLE hSyncEvent);
191 RPCRTAPI RPC_STATUS RPC_ENTRY
192 I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn );
194 RPCRTAPI UINT RPC_ENTRY
195 I_RpcWindowProc( void* hWnd, UINT Message, UINT wParam, ULONG lParam );
197 RPCRTAPI RPC_STATUS RPC_ENTRY
198 I_RpcSetWMsgEndpoint( WCHAR* Endpoint );
200 #endif
202 #else
204 /* WIN9x */
205 RPCRTAPI RPC_STATUS RPC_ENTRY
206 I_RpcServerStartListening( void* hWnd );
208 RPCRTAPI RPC_STATUS RPC_ENTRY
209 I_RpcServerStopListening( void );
211 typedef RPC_STATUS (*RPC_BLOCKING_FN)(void* hWnd, void* Context, void* hSyncEvent);
213 RPCRTAPI RPC_STATUS RPC_ENTRY
214 I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn, ULONG ServerTid );
216 RPCRTAPI RPC_STATUS RPC_ENTRY
217 I_RpcSetThreadParams( int fClientFree, void* Context, void* hWndClient );
219 RPCRTAPI UINT RPC_ENTRY
220 I_RpcWindowProc( void* hWnd, unsigned int Message, unsigned int wParam, ULONG lParam );
222 #endif
224 RPCRTAPI RPC_STATUS RPC_ENTRY
225 I_RpcBindingInqLocalClientPID (RPC_BINDING_HANDLE Binding, ULONG *Pid );
227 RPCRTAPI RPC_STATUS RPC_ENTRY
228 I_RpcBindingInqTransportType( RPC_BINDING_HANDLE Binding, unsigned int* Type );
230 RPCRTAPI LONG RPC_ENTRY I_RpcMapWin32Status(RPC_STATUS);
232 #ifdef __cplusplus
234 #endif
236 #endif /*__WINE_RPCDCEP_H */