[KERNEL32] Sync format_msg.c with Wine Staging 1.7.55. CORE-10536
[reactos.git] / rostests / win32 / rpcrt4 / context_handles / ctx_s.c
1
2 #pragma warning( disable: 4049 ) /* more than 64k source lines */
3
4 /* this ALWAYS GENERATED file contains the RPC server 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 #include "ctx.h"
22
23 #define TYPE_FORMAT_STRING_SIZE 23
24 #define PROC_FORMAT_STRING_SIZE 21
25 #define TRANSMIT_AS_TABLE_SIZE 0
26 #define WIRE_MARSHAL_TABLE_SIZE 0
27
28 typedef struct _MIDL_TYPE_FORMAT_STRING
29 {
30 short Pad;
31 unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
32 } MIDL_TYPE_FORMAT_STRING;
33
34 typedef struct _MIDL_PROC_FORMAT_STRING
35 {
36 short Pad;
37 unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
38 } MIDL_PROC_FORMAT_STRING;
39
40 extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
41 extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
42
43 /* Standard interface: hello, ver. 1.0,
44 GUID={0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}} */
45
46
47 extern RPC_DISPATCH_TABLE hello_v1_0_DispatchTable;
48
49 static const RPC_SERVER_INTERFACE hello___RpcServerInterface =
50 {
51 sizeof(RPC_SERVER_INTERFACE),
52 {{0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}},{1,0}},
53 {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
54 &hello_v1_0_DispatchTable,
55 0,
56 0,
57 0,
58 0,
59 0
60 };
61 RPC_IF_HANDLE hello_v1_0_s_ifspec = (RPC_IF_HANDLE)& hello___RpcServerInterface;
62
63 extern const MIDL_STUB_DESC hello_StubDesc;
64
65 void __RPC_STUB
66 hello_CtxOpen(
67 PRPC_MESSAGE _pRpcMessage )
68 {
69 long Value;
70 MIDL_STUB_MESSAGE _StubMsg;
71 NDR_SCONTEXT pphContext;
72 RPC_STATUS _Status;
73
74 ((void)(_Status));
75 NdrServerInitializeNew(
76 _pRpcMessage,
77 &_StubMsg,
78 &hello_StubDesc);
79
80 ( PCTXTYPE __RPC_FAR * )pphContext = 0;
81 RpcTryFinally
82 {
83 RpcTryExcept
84 {
85 if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
86 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
87
88 Value = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
89
90 if(_StubMsg.Buffer > _StubMsg.BufferEnd)
91 {
92 RpcRaiseException(RPC_X_BAD_STUB_DATA);
93 }
94 }
95 RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER )
96 {
97 RpcRaiseException(RPC_X_BAD_STUB_DATA);
98 }
99 RpcEndExcept
100 pphContext = NDRSContextUnmarshall( (char *)0, _pRpcMessage->DataRepresentation );
101
102
103 CtxOpen(( PCTXTYPE __RPC_FAR * )NDRSContextValue(pphContext),Value);
104
105 _StubMsg.BufferLength = 20U;
106 _pRpcMessage->BufferLength = _StubMsg.BufferLength;
107
108 _Status = I_RpcGetBuffer( _pRpcMessage );
109 if ( _Status )
110 RpcRaiseException( _Status );
111
112 _StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer;
113
114 NdrServerContextMarshall(
115 ( PMIDL_STUB_MESSAGE )&_StubMsg,
116 ( NDR_SCONTEXT )pphContext,
117 ( NDR_RUNDOWN )PCTXTYPE_rundown);
118
119 }
120 RpcFinally
121 {
122 }
123 RpcEndFinally
124 _pRpcMessage->BufferLength =
125 (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
126
127 }
128
129 void __RPC_STUB
130 hello_CtxHello(
131 PRPC_MESSAGE _pRpcMessage )
132 {
133 MIDL_STUB_MESSAGE _StubMsg;
134 NDR_SCONTEXT phContext;
135 RPC_STATUS _Status;
136
137 ((void)(_Status));
138 NdrServerInitializeNew(
139 _pRpcMessage,
140 &_StubMsg,
141 &hello_StubDesc);
142
143 RpcTryFinally
144 {
145 RpcTryExcept
146 {
147 if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
148 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[8] );
149
150 phContext = NdrServerContextUnmarshall(( PMIDL_STUB_MESSAGE )&_StubMsg);
151
152 if(_StubMsg.Buffer > _StubMsg.BufferEnd)
153 {
154 RpcRaiseException(RPC_X_BAD_STUB_DATA);
155 }
156 }
157 RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER )
158 {
159 RpcRaiseException(RPC_X_BAD_STUB_DATA);
160 }
161 RpcEndExcept
162
163 CtxHello(( PCTXTYPE )*NDRSContextValue(phContext));
164
165 }
166 RpcFinally
167 {
168 }
169 RpcEndFinally
170 _pRpcMessage->BufferLength =
171 (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
172
173 }
174
175 void __RPC_STUB
176 hello_CtxClose(
177 PRPC_MESSAGE _pRpcMessage )
178 {
179 MIDL_STUB_MESSAGE _StubMsg;
180 NDR_SCONTEXT pphContext;
181 RPC_STATUS _Status;
182
183 ((void)(_Status));
184 NdrServerInitializeNew(
185 _pRpcMessage,
186 &_StubMsg,
187 &hello_StubDesc);
188
189 ( PCTXTYPE __RPC_FAR * )pphContext = 0;
190 RpcTryFinally
191 {
192 RpcTryExcept
193 {
194 if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
195 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[14] );
196
197 pphContext = NdrServerContextUnmarshall(( PMIDL_STUB_MESSAGE )&_StubMsg);
198
199 if(_StubMsg.Buffer > _StubMsg.BufferEnd)
200 {
201 RpcRaiseException(RPC_X_BAD_STUB_DATA);
202 }
203 }
204 RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER )
205 {
206 RpcRaiseException(RPC_X_BAD_STUB_DATA);
207 }
208 RpcEndExcept
209
210 CtxClose(( PCTXTYPE __RPC_FAR * )NDRSContextValue(pphContext));
211
212 _StubMsg.BufferLength = 20U;
213 _pRpcMessage->BufferLength = _StubMsg.BufferLength;
214
215 _Status = I_RpcGetBuffer( _pRpcMessage );
216 if ( _Status )
217 RpcRaiseException( _Status );
218
219 _StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer;
220
221 NdrServerContextMarshall(
222 ( PMIDL_STUB_MESSAGE )&_StubMsg,
223 ( NDR_SCONTEXT )pphContext,
224 ( NDR_RUNDOWN )PCTXTYPE_rundown);
225
226 }
227 RpcFinally
228 {
229 }
230 RpcEndFinally
231 _pRpcMessage->BufferLength =
232 (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
233
234 }
235
236
237 static const MIDL_STUB_DESC hello_StubDesc =
238 {
239 (void __RPC_FAR *)& hello___RpcServerInterface,
240 MIDL_user_allocate,
241 MIDL_user_free,
242 0,
243 0,
244 0,
245 0,
246 0,
247 __MIDL_TypeFormatString.Format,
248 1, /* -error bounds_check flag */
249 0x10001, /* Ndr library version */
250 0,
251 0x5030118, /* MIDL Version 5.3.280 */
252 0,
253 0,
254 0, /* notify & notify_flag routine table */
255 0x1, /* MIDL flag */
256 0, /* Reserved3 */
257 0, /* Reserved4 */
258 0 /* Reserved5 */
259 };
260
261 static RPC_DISPATCH_FUNCTION hello_table[] =
262 {
263 hello_CtxOpen,
264 hello_CtxHello,
265 hello_CtxClose,
266 0
267 };
268 RPC_DISPATCH_TABLE hello_v1_0_DispatchTable =
269 {
270 3,
271 hello_table
272 };
273
274 #if !defined(__RPC_WIN32__)
275 #error Invalid build platform for this stub.
276 #endif
277
278 static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
279 {
280 0,
281 {
282
283 0x51, /* FC_OUT_PARAM */
284 #ifndef _ALPHA_
285 0x1, /* x86, MIPS & PPC stack size = 1 */
286 #else
287 0x2, /* Alpha stack size = 2 */
288 #endif
289 /* 2 */ NdrFcShort( 0x2 ), /* Type Offset=2 */
290 /* 4 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
291 0x8, /* FC_LONG */
292 /* 6 */ 0x5b, /* FC_END */
293 0x5c, /* FC_PAD */
294 /* 8 */
295 0x4d, /* FC_IN_PARAM */
296 #ifndef _ALPHA_
297 0x1, /* x86, MIPS & PPC stack size = 1 */
298 #else
299 0x2, /* Alpha stack size = 2 */
300 #endif
301 /* 10 */ NdrFcShort( 0xa ), /* Type Offset=10 */
302 /* 12 */ 0x5b, /* FC_END */
303 0x5c, /* FC_PAD */
304 /* 14 */
305 0x50, /* FC_IN_OUT_PARAM */
306 #ifndef _ALPHA_
307 0x1, /* x86, MIPS & PPC stack size = 1 */
308 #else
309 0x2, /* Alpha stack size = 2 */
310 #endif
311 /* 16 */ NdrFcShort( 0xe ), /* Type Offset=14 */
312 /* 18 */ 0x5b, /* FC_END */
313 0x5c, /* FC_PAD */
314
315 0x0
316 }
317 };
318
319 static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
320 {
321 0,
322 {
323 NdrFcShort( 0x0 ), /* 0 */
324 /* 2 */
325 0x11, 0x0, /* FC_RP */
326 /* 4 */ NdrFcShort( 0x2 ), /* Offset= 2 (6) */
327 /* 6 */ 0x30, /* FC_BIND_CONTEXT */
328 0xa0, /* Ctxt flags: via ptr, out, */
329 /* 8 */ 0x0, /* 0 */
330 0x0, /* 0 */
331 /* 10 */ 0x30, /* FC_BIND_CONTEXT */
332 0x41, /* Ctxt flags: in, can't be null */
333 /* 12 */ 0x0, /* 0 */
334 0x0, /* 0 */
335 /* 14 */
336 0x11, 0x0, /* FC_RP */
337 /* 16 */ NdrFcShort( 0x2 ), /* Offset= 2 (18) */
338 /* 18 */ 0x30, /* FC_BIND_CONTEXT */
339 0xe1, /* Ctxt flags: via ptr, in, out, can't be null */
340 /* 20 */ 0x0, /* 0 */
341 0x0, /* 0 */
342
343 0x0
344 }
345 };
346
347
348 #endif /* !defined(_M_IA64) && !defined(_M_AXP64)*/
349