d3dx8: Implement D3DXPlaneDotCoord.
[wine] / include / rpcdcep.h
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 #ifndef __WINE_RPCDCEP_H
20 #define __WINE_RPCDCEP_H
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 typedef struct _RPC_VERSION {
27     unsigned short MajorVersion;
28     unsigned short MinorVersion;
29 } RPC_VERSION;
30
31 typedef struct _RPC_SYNTAX_IDENTIFIER {
32     GUID SyntaxGUID;
33     RPC_VERSION SyntaxVersion;
34 } RPC_SYNTAX_IDENTIFIER, *PRPC_SYNTAX_IDENTIFIER;
35
36 typedef struct _RPC_MESSAGE
37 {
38     RPC_BINDING_HANDLE Handle;
39     unsigned long 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     unsigned long RpcFlags;
49 } RPC_MESSAGE, *PRPC_MESSAGE;
50
51 #define RPC_NCA_FLAGS_DEFAULT       0x00000000
52 #define RPC_NCA_FLAGS_IDEMPOTENT    0x00000001
53 #define RPC_NCA_FLAGS_BROADCAST     0x00000002
54 #define RPC_NCA_FLAGS_MAYBE         0x00000004
55
56 typedef void  (__RPC_STUB *RPC_DISPATCH_FUNCTION)(PRPC_MESSAGE Message);
57
58 typedef struct
59 {
60     unsigned int DispatchTableCount;
61     RPC_DISPATCH_FUNCTION* DispatchTable;
62     LONG_PTR Reserved;
63 } RPC_DISPATCH_TABLE, *PRPC_DISPATCH_TABLE;
64
65 typedef struct _RPC_PROTSEQ_ENDPOINT
66 {
67     unsigned char* RpcProtocolSequence;
68     unsigned char* Endpoint;
69 } RPC_PROTSEQ_ENDPOINT, *PRPC_PROTSEQ_ENDPOINT;
70
71 #define NT351_INTERFACE_SIZE 0x40
72 #define RPC_INTERFACE_HAS_PIPES 0x0001
73
74 typedef struct _RPC_SERVER_INTERFACE
75 {
76     unsigned int Length;
77     RPC_SYNTAX_IDENTIFIER InterfaceId;
78     RPC_SYNTAX_IDENTIFIER TransferSyntax;
79     PRPC_DISPATCH_TABLE DispatchTable;
80     unsigned int RpcProtseqEndpointCount;
81     PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
82     RPC_MGR_EPV* DefaultManagerEpv;
83     void const* InterpreterInfo;
84     unsigned int Flags;
85 } RPC_SERVER_INTERFACE, *PRPC_SERVER_INTERFACE;
86
87 typedef struct _RPC_CLIENT_INTERFACE
88 {
89     unsigned int Length;
90     RPC_SYNTAX_IDENTIFIER InterfaceId;
91     RPC_SYNTAX_IDENTIFIER TransferSyntax;
92     PRPC_DISPATCH_TABLE DispatchTable;
93     unsigned int RpcProtseqEndpointCount;
94     PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
95     ULONG_PTR Reserved;
96     void const* InterpreterInfo;
97     unsigned int Flags;
98 } RPC_CLIENT_INTERFACE, *PRPC_CLIENT_INTERFACE;
99
100 #define TRANSPORT_TYPE_CN   0x01
101 #define TRANSPORT_TYPE_DG   0x02
102 #define TRANSPORT_TYPE_LPC  0x04
103 #define TRANSPORT_TYPE_WMSG 0x08
104
105 RPCRTAPI RPC_STATUS RPC_ENTRY
106   I_RpcGetBuffer( RPC_MESSAGE* Message );
107 RPCRTAPI RPC_STATUS RPC_ENTRY
108   I_RpcGetBufferWithObject( RPC_MESSAGE* Message, UUID* ObjectUuid );
109 RPCRTAPI RPC_STATUS RPC_ENTRY
110   I_RpcSendReceive( RPC_MESSAGE* Message );
111 RPCRTAPI RPC_STATUS RPC_ENTRY
112   I_RpcFreeBuffer( RPC_MESSAGE* Message );
113 RPCRTAPI RPC_STATUS RPC_ENTRY
114   I_RpcSend( RPC_MESSAGE* Message );
115 RPCRTAPI RPC_STATUS RPC_ENTRY
116   I_RpcReceive( RPC_MESSAGE* Message );
117
118 RPCRTAPI void* RPC_ENTRY
119   I_RpcAllocate( unsigned int Size );
120 RPCRTAPI void RPC_ENTRY
121   I_RpcFree( void* Object );
122
123 RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
124   I_RpcGetCurrentCallHandle( void );
125
126 /*
127  * The platform SDK headers don't define these functions at all if WINNT is defined
128  * The MSVC6 headers define two different sets of functions :
129  *  If WINNT and MSWMSG are defined, the NT versions are defined
130  *  If WINNT is not defined, the windows 9x versions are defined.
131  * Note that the prototypes for I_RpcBindingSetAsync are different for each case.
132  *
133  * Wine defaults to the WinNT case and only defines these function is MSWMSG is
134  *  defined. Defining the NT functions by default causes MIDL generated proxys
135  *  to not compile.
136  */
137
138 #if 1  /* WINNT */
139 #ifdef MSWMSG
140
141 RPCRTAPI RPC_STATUS RPC_ENTRY
142   I_RpcServerStartListening( HWND hWnd );
143 RPCRTAPI RPC_STATUS RPC_ENTRY
144   I_RpcServerStopListening( void );
145 /* WINNT */
146 RPCRTAPI RPC_STATUS RPC_ENTRY
147   I_GetThreadWindowHandle( HWND* hWnd );
148 RPCRTAPI RPC_STATUS RPC_ENTRY
149   I_RpcAsyncSendReceive( RPC_MESSAGE* Message, void* Context, HWND hWnd );
150
151 typedef RPC_STATUS (*RPC_BLOCKING_FN)(void* hWnd, void* Context, HANDLE hSyncEvent);
152
153 RPCRTAPI RPC_STATUS RPC_ENTRY
154   I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn );
155
156 RPCRTAPI UINT RPC_ENTRY
157   I_RpcWindowProc( void* hWnd, UINT Message, UINT wParam, ULONG lParam );
158
159 RPCRTAPI RPC_STATUS RPC_ENTRY
160   I_RpcSetWMsgEndpoint( WCHAR* Endpoint );
161
162 RPCRTAPI RPC_STATUS RPC_ENTRY
163   I_RpcBindingInqTransportType( RPC_BINDING_HANDLE Binding, unsigned int* Type );
164
165 #endif
166
167 #else
168
169 /* WIN9x */
170 RPCRTAPI RPC_STATUS RPC_ENTRY
171   I_RpcServerStartListening( void* hWnd );
172
173 RPCRTAPI RPC_STATUS RPC_ENTRY
174   I_RpcServerStopListening( void );
175
176 typedef RPC_STATUS (*RPC_BLOCKING_FN)(void* hWnd, void* Context, void* hSyncEvent);
177
178 RPCRTAPI RPC_STATUS RPC_ENTRY
179   I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING_FN BlockingFn, unsigned long ServerTid );
180
181 RPCRTAPI RPC_STATUS RPC_ENTRY
182   I_RpcSetThreadParams( int fClientFree, void* Context, void* hWndClient );
183
184 RPCRTAPI UINT RPC_ENTRY
185   I_RpcWindowProc( void* hWnd, unsigned int Message, unsigned int wParam, unsigned long lParam );
186
187 #endif
188
189 #ifdef __cplusplus
190 }
191 #endif
192
193 #endif /*__WINE_RPCDCEP_H */