Merge my current work done on the kd++ branch:
[reactos.git] / rostests / win32 / rpcrt4 / context_handles / ctx_c.c
1
2 #pragma warning( disable: 4049 ) /* more than 64k source lines */
3
4 /* this ALWAYS GENERATED file contains the RPC client stubs */
5
6
7 /* File created by MIDL compiler version 5.03.0280 */
8 /* at Fri Mar 24 18:32:16 2006
9 */
10 /* Compiler settings for ctx.idl:
11 Os (OptLev=s), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext
12 error checks: allocation ref bounds_check enum stub_data
13 VC __declspec() decoration level:
14 __declspec(uuid()), __declspec(selectany), __declspec(novtable)
15 DECLSPEC_UUID(), MIDL_INTERFACE()
16 */
17 //@@MIDL_FILE_HEADING( )
18
19 #if !defined(_M_IA64) && !defined(_M_AXP64)
20 #include <string.h>
21 #if defined( _ALPHA_ )
22 #include <stdarg.h>
23 #endif
24
25 #include "ctx.h"
26
27 #define TYPE_FORMAT_STRING_SIZE 23
28 #define PROC_FORMAT_STRING_SIZE 21
29 #define TRANSMIT_AS_TABLE_SIZE 0
30 #define WIRE_MARSHAL_TABLE_SIZE 0
31
32 typedef struct _MIDL_TYPE_FORMAT_STRING
33 {
34 short Pad;
35 unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
36 } MIDL_TYPE_FORMAT_STRING;
37
38 typedef struct _MIDL_PROC_FORMAT_STRING
39 {
40 short Pad;
41 unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
42 } MIDL_PROC_FORMAT_STRING;
43
44
45 extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
46 extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
47
48 #define GENERIC_BINDING_TABLE_SIZE 0
49
50
51 /* Standard interface: hello, ver. 1.0,
52 GUID={0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}} */
53
54 handle_t hBinding;
55
56
57 static const RPC_CLIENT_INTERFACE hello___RpcClientInterface =
58 {
59 sizeof(RPC_CLIENT_INTERFACE),
60 {{0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}},{1,0}},
61 {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
62 0,
63 0,
64 0,
65 0,
66 0,
67 0
68 };
69 RPC_IF_HANDLE hello_v1_0_c_ifspec = (RPC_IF_HANDLE)& hello___RpcClientInterface;
70
71 extern const MIDL_STUB_DESC hello_StubDesc;
72
73 RPC_BINDING_HANDLE hello__MIDL_AutoBindHandle;
74
75
76 void CtxOpen(
77 /* [out] */ PCTXTYPE __RPC_FAR *pphContext,
78 /* [in] */ long Value)
79 {
80
81 RPC_BINDING_HANDLE _Handle = 0;
82
83 RPC_MESSAGE _RpcMessage;
84
85 MIDL_STUB_MESSAGE _StubMsg;
86
87 if(!pphContext)
88 {
89 RpcRaiseException(RPC_X_NULL_REF_POINTER);
90 }
91 RpcTryFinally
92 {
93 NdrClientInitializeNew(
94 ( PRPC_MESSAGE )&_RpcMessage,
95 ( PMIDL_STUB_MESSAGE )&_StubMsg,
96 ( PMIDL_STUB_DESC )&hello_StubDesc,
97 0);
98
99
100 _Handle = hBinding;
101
102
103 _StubMsg.BufferLength = 4U;
104 NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
105
106 *(( long __RPC_FAR * )_StubMsg.Buffer)++ = Value;
107
108 NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
109
110 if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
111 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
112
113 *pphContext = (void *)0;
114 NdrClientContextUnmarshall(
115 ( PMIDL_STUB_MESSAGE )&_StubMsg,
116 ( NDR_CCONTEXT __RPC_FAR * )pphContext,
117 _Handle);
118
119 }
120 RpcFinally
121 {
122 NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
123
124 }
125 RpcEndFinally
126
127 }
128
129
130 void CtxHello(
131 /* [in] */ PCTXTYPE phContext)
132 {
133
134 RPC_BINDING_HANDLE _Handle = 0;
135
136 RPC_MESSAGE _RpcMessage;
137
138 MIDL_STUB_MESSAGE _StubMsg;
139
140 RpcTryFinally
141 {
142 NdrClientInitializeNew(
143 ( PRPC_MESSAGE )&_RpcMessage,
144 ( PMIDL_STUB_MESSAGE )&_StubMsg,
145 ( PMIDL_STUB_DESC )&hello_StubDesc,
146 1);
147
148
149 if(phContext != 0)
150 {
151 _Handle = NDRCContextBinding(( NDR_CCONTEXT )phContext);;
152
153 }
154 else
155 {
156 RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT);
157 }
158
159 _StubMsg.BufferLength = 20U;
160 NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
161
162 NdrClientContextMarshall(
163 ( PMIDL_STUB_MESSAGE )&_StubMsg,
164 ( NDR_CCONTEXT )phContext,
165 1);
166 NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
167
168 }
169 RpcFinally
170 {
171 NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
172
173 }
174 RpcEndFinally
175
176 }
177
178
179 void CtxClose(
180 /* [out][in] */ PCTXTYPE __RPC_FAR *pphContext)
181 {
182
183 RPC_BINDING_HANDLE _Handle = 0;
184
185 RPC_MESSAGE _RpcMessage;
186
187 MIDL_STUB_MESSAGE _StubMsg;
188
189 if(!pphContext)
190 {
191 RpcRaiseException(RPC_X_NULL_REF_POINTER);
192 }
193 RpcTryFinally
194 {
195 NdrClientInitializeNew(
196 ( PRPC_MESSAGE )&_RpcMessage,
197 ( PMIDL_STUB_MESSAGE )&_StubMsg,
198 ( PMIDL_STUB_DESC )&hello_StubDesc,
199 2);
200
201
202 if(*pphContext != 0)
203 {
204 _Handle = NDRCContextBinding(( NDR_CCONTEXT )*pphContext);;
205
206 }
207
208 _StubMsg.BufferLength = 20U;
209 NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
210
211 NdrClientContextMarshall(
212 ( PMIDL_STUB_MESSAGE )&_StubMsg,
213 ( NDR_CCONTEXT )*pphContext,
214 0);
215 NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
216
217 if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
218 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[14] );
219
220 NdrClientContextUnmarshall(
221 ( PMIDL_STUB_MESSAGE )&_StubMsg,
222 ( NDR_CCONTEXT __RPC_FAR * )pphContext,
223 _Handle);
224
225 }
226 RpcFinally
227 {
228 NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
229
230 }
231 RpcEndFinally
232
233 }
234
235
236 const MIDL_STUB_DESC hello_StubDesc =
237 {
238 (void __RPC_FAR *)& hello___RpcClientInterface,
239 MIDL_user_allocate,
240 MIDL_user_free,
241 &hBinding,
242 0,
243 0,
244 0,
245 0,
246 __MIDL_TypeFormatString.Format,
247 1, /* -error bounds_check flag */
248 0x10001, /* Ndr library version */
249 0,
250 0x5030118, /* MIDL Version 5.3.280 */
251 0,
252 0,
253 0, /* notify & notify_flag routine table */
254 0x1, /* MIDL flag */
255 0, /* Reserved3 */
256 0, /* Reserved4 */
257 0 /* Reserved5 */
258 };
259
260 #if !defined(__RPC_WIN32__)
261 #error Invalid build platform for this stub.
262 #endif
263
264 const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
265 {
266 0,
267 {
268
269 0x51, /* FC_OUT_PARAM */
270 #ifndef _ALPHA_
271 0x1, /* x86, MIPS & PPC stack size = 1 */
272 #else
273 0x2, /* Alpha stack size = 2 */
274 #endif
275 /* 2 */ NdrFcShort( 0x2 ), /* Type Offset=2 */
276 /* 4 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
277 0x8, /* FC_LONG */
278 /* 6 */ 0x5b, /* FC_END */
279 0x5c, /* FC_PAD */
280 /* 8 */
281 0x4d, /* FC_IN_PARAM */
282 #ifndef _ALPHA_
283 0x1, /* x86, MIPS & PPC stack size = 1 */
284 #else
285 0x2, /* Alpha stack size = 2 */
286 #endif
287 /* 10 */ NdrFcShort( 0xa ), /* Type Offset=10 */
288 /* 12 */ 0x5b, /* FC_END */
289 0x5c, /* FC_PAD */
290 /* 14 */
291 0x50, /* FC_IN_OUT_PARAM */
292 #ifndef _ALPHA_
293 0x1, /* x86, MIPS & PPC stack size = 1 */
294 #else
295 0x2, /* Alpha stack size = 2 */
296 #endif
297 /* 16 */ NdrFcShort( 0xe ), /* Type Offset=14 */
298 /* 18 */ 0x5b, /* FC_END */
299 0x5c, /* FC_PAD */
300
301 0x0
302 }
303 };
304
305 const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
306 {
307 0,
308 {
309 NdrFcShort( 0x0 ), /* 0 */
310 /* 2 */
311 0x11, 0x0, /* FC_RP */
312 /* 4 */ NdrFcShort( 0x2 ), /* Offset= 2 (6) */
313 /* 6 */ 0x30, /* FC_BIND_CONTEXT */
314 0xa0, /* Ctxt flags: via ptr, out, */
315 /* 8 */ 0x0, /* 0 */
316 0x0, /* 0 */
317 /* 10 */ 0x30, /* FC_BIND_CONTEXT */
318 0x41, /* Ctxt flags: in, can't be null */
319 /* 12 */ 0x0, /* 0 */
320 0x0, /* 0 */
321 /* 14 */
322 0x11, 0x0, /* FC_RP */
323 /* 16 */ NdrFcShort( 0x2 ), /* Offset= 2 (18) */
324 /* 18 */ 0x30, /* FC_BIND_CONTEXT */
325 0xe1, /* Ctxt flags: via ptr, in, out, can't be null */
326 /* 20 */ 0x0, /* 0 */
327 0x0, /* 0 */
328
329 0x0
330 }
331 };
332
333
334 #endif /* !defined(_M_IA64) && !defined(_M_AXP64)*/
335