ReactOS  0.4.13-dev-39-g8b6696f
ctx_s.c File Reference
#include <string.h>
#include "ctx.h"
Include dependency graph for ctx_s.c:

Go to the source code of this file.

Classes

struct  _MIDL_TYPE_FORMAT_STRING
 
struct  _MIDL_PROC_FORMAT_STRING
 

Macros

#define TYPE_FORMAT_STRING_SIZE   23
 
#define PROC_FORMAT_STRING_SIZE   21
 
#define TRANSMIT_AS_TABLE_SIZE   0
 
#define WIRE_MARSHAL_TABLE_SIZE   0
 

Typedefs

typedef struct _MIDL_TYPE_FORMAT_STRING MIDL_TYPE_FORMAT_STRING
 
typedef struct _MIDL_PROC_FORMAT_STRING MIDL_PROC_FORMAT_STRING
 

Functions

void __RPC_STUB hello_CtxOpen (PRPC_MESSAGE _pRpcMessage)
 
void __RPC_STUB hello_CtxHello (PRPC_MESSAGE _pRpcMessage)
 
void __RPC_STUB hello_CtxClose (PRPC_MESSAGE _pRpcMessage)
 

Variables

const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString
 
const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString
 
RPC_DISPATCH_TABLE hello_v1_0_DispatchTable
 
static const RPC_SERVER_INTERFACE hello___RpcServerInterface
 
RPC_IF_HANDLE hello_v1_0_s_ifspec = (RPC_IF_HANDLE)& hello___RpcServerInterface
 
const MIDL_STUB_DESC hello_StubDesc
 
static RPC_DISPATCH_FUNCTION hello_table []
 

Macro Definition Documentation

◆ PROC_FORMAT_STRING_SIZE

#define PROC_FORMAT_STRING_SIZE   21

Definition at line 24 of file ctx_s.c.

◆ TRANSMIT_AS_TABLE_SIZE

#define TRANSMIT_AS_TABLE_SIZE   0

Definition at line 25 of file ctx_s.c.

◆ TYPE_FORMAT_STRING_SIZE

#define TYPE_FORMAT_STRING_SIZE   23

Definition at line 23 of file ctx_s.c.

◆ WIRE_MARSHAL_TABLE_SIZE

#define WIRE_MARSHAL_TABLE_SIZE   0

Definition at line 26 of file ctx_s.c.

Typedef Documentation

◆ MIDL_PROC_FORMAT_STRING

◆ MIDL_TYPE_FORMAT_STRING

Function Documentation

◆ hello_CtxClose()

void __RPC_STUB hello_CtxClose ( PRPC_MESSAGE  _pRpcMessage)

Definition at line 176 of file ctx_s.c.

178 {
179  MIDL_STUB_MESSAGE _StubMsg;
180  NDR_SCONTEXT pphContext;
181  RPC_STATUS _Status;
182 
183  ((void)(_Status));
185  _pRpcMessage,
186  &_StubMsg,
187  &hello_StubDesc);
188 
189  ( PCTXTYPE __RPC_FAR * )pphContext = 0;
191  {
193  {
194  if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
196 
197  pphContext = NdrServerContextUnmarshall(( PMIDL_STUB_MESSAGE )&_StubMsg);
198 
199  if(_StubMsg.Buffer > _StubMsg.BufferEnd)
200  {
202  }
203  }
205  {
207  }
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 
222  ( PMIDL_STUB_MESSAGE )&_StubMsg,
223  ( NDR_SCONTEXT )pphContext,
225 
226  }
227  RpcFinally
228  {
229  }
231  _pRpcMessage->BufferLength =
232  (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
233 
234 }
#define RpcEndExcept
Definition: rpc.h:128
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define NDRSContextValue(hContext)
Definition: rpcndr.h:150
void WINAPI NdrServerContextMarshall(PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT ContextHandle, NDR_RUNDOWN RundownRoutine)
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
#define U(x)
Definition: wordpad.c:44
unsigned char *WINAPI NdrServerInitializeNew(PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc)
unsigned char * Buffer
Definition: rpcndr.h:203
RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg)
Definition: rpc_message.c:1638
CTXTYPE __RPC_FAR * PCTXTYPE
Definition: ctx.h:48
void WINAPI NdrConvert(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
#define RpcFinally
Definition: rpc.h:130
NDR_SCONTEXT WINAPI NdrServerContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg)
#define RpcTryFinally
Definition: rpc.h:129
unsigned int BufferLength
Definition: rpcdcep.h:41
long RPC_STATUS
Definition: rpc.h:52
void * Buffer
Definition: rpcdcep.h:40
#define RpcEndFinally
Definition: rpc.h:131
#define RpcTryExcept
Definition: rpc.h:126
#define __RPC_FAR
Definition: rpc.h:56
struct tagNDR_SCONTEXT * NDR_SCONTEXT
void __RPC_USER PCTXTYPE_rundown(PCTXTYPE)
Definition: server.c:62
const unsigned char * PFORMAT_STRING
Definition: rpcndr.h:176
ULONG BufferLength
Definition: rpcndr.h:207
unsigned char * BufferEnd
Definition: rpcndr.h:205
void CtxClose(PCTXTYPE __RPC_FAR *pphContext)
Definition: ctx_c.c:179
const MIDL_STUB_DESC hello_StubDesc
Definition: ctx_s.c:237
#define NDR_LOCAL_DATA_REPRESENTATION
Definition: rpcndr.h:107
void(__RPC_USER * NDR_RUNDOWN)(void *context)
Definition: rpcndr.h:153
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090
ULONG DataRepresentation
Definition: rpcdcep.h:39
unsigned char Format[PROC_FORMAT_STRING_SIZE]
Definition: client.c:20
const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString
Definition: ctx_s.c:278
#define RpcExcept(expr)
Definition: rpc.h:127
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define RPC_BAD_STUB_DATA_EXCEPTION_FILTER
Definition: rpcndr.h:138

◆ hello_CtxHello()

void __RPC_STUB hello_CtxHello ( PRPC_MESSAGE  _pRpcMessage)

Definition at line 130 of file ctx_s.c.

132 {
133  MIDL_STUB_MESSAGE _StubMsg;
134  NDR_SCONTEXT phContext;
135  RPC_STATUS _Status;
136 
137  ((void)(_Status));
139  _pRpcMessage,
140  &_StubMsg,
141  &hello_StubDesc);
142 
144  {
146  {
147  if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
149 
150  phContext = NdrServerContextUnmarshall(( PMIDL_STUB_MESSAGE )&_StubMsg);
151 
152  if(_StubMsg.Buffer > _StubMsg.BufferEnd)
153  {
155  }
156  }
158  {
160  }
162 
163  CtxHello(( PCTXTYPE )*NDRSContextValue(phContext));
164 
165  }
166  RpcFinally
167  {
168  }
170  _pRpcMessage->BufferLength =
171  (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
172 
173 }
#define RpcEndExcept
Definition: rpc.h:128
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define NDRSContextValue(hContext)
Definition: rpcndr.h:150
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
unsigned char *WINAPI NdrServerInitializeNew(PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc)
unsigned char * Buffer
Definition: rpcndr.h:203
CTXTYPE __RPC_FAR * PCTXTYPE
Definition: ctx.h:48
void WINAPI NdrConvert(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
#define RpcFinally
Definition: rpc.h:130
NDR_SCONTEXT WINAPI NdrServerContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg)
#define RpcTryFinally
Definition: rpc.h:129
unsigned int BufferLength
Definition: rpcdcep.h:41
long RPC_STATUS
Definition: rpc.h:52
void * Buffer
Definition: rpcdcep.h:40
#define RpcEndFinally
Definition: rpc.h:131
#define RpcTryExcept
Definition: rpc.h:126
#define __RPC_FAR
Definition: rpc.h:56
void CtxHello(PCTXTYPE phContext)
Definition: ctx_c.c:130
const unsigned char * PFORMAT_STRING
Definition: rpcndr.h:176
unsigned char * BufferEnd
Definition: rpcndr.h:205
const MIDL_STUB_DESC hello_StubDesc
Definition: ctx_s.c:237
#define NDR_LOCAL_DATA_REPRESENTATION
Definition: rpcndr.h:107
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090
ULONG DataRepresentation
Definition: rpcdcep.h:39
unsigned char Format[PROC_FORMAT_STRING_SIZE]
Definition: client.c:20
const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString
Definition: ctx_s.c:278
#define RpcExcept(expr)
Definition: rpc.h:127
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define RPC_BAD_STUB_DATA_EXCEPTION_FILTER
Definition: rpcndr.h:138

◆ hello_CtxOpen()

void __RPC_STUB hello_CtxOpen ( PRPC_MESSAGE  _pRpcMessage)

Definition at line 66 of file ctx_s.c.

68 {
69  long Value;
70  MIDL_STUB_MESSAGE _StubMsg;
71  NDR_SCONTEXT pphContext;
72  RPC_STATUS _Status;
73 
74  ((void)(_Status));
76  _pRpcMessage,
77  &_StubMsg,
79 
80  ( PCTXTYPE __RPC_FAR * )pphContext = 0;
82  {
84  {
85  if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
87 
88  Value = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
89 
90  if(_StubMsg.Buffer > _StubMsg.BufferEnd)
91  {
93  }
94  }
96  {
98  }
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 
115  ( PMIDL_STUB_MESSAGE )&_StubMsg,
116  ( NDR_SCONTEXT )pphContext,
118 
119  }
120  RpcFinally
121  {
122  }
124  _pRpcMessage->BufferLength =
125  (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
126 
127 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
#define RpcEndExcept
Definition: rpc.h:128
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define NDRSContextValue(hContext)
Definition: rpcndr.h:150
void WINAPI NdrServerContextMarshall(PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT ContextHandle, NDR_RUNDOWN RundownRoutine)
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
#define U(x)
Definition: wordpad.c:44
unsigned char *WINAPI NdrServerInitializeNew(PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc)
unsigned char * Buffer
Definition: rpcndr.h:203
RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg)
Definition: rpc_message.c:1638
CTXTYPE __RPC_FAR * PCTXTYPE
Definition: ctx.h:48
void WINAPI NdrConvert(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
#define RpcFinally
Definition: rpc.h:130
#define RpcTryFinally
Definition: rpc.h:129
unsigned int BufferLength
Definition: rpcdcep.h:41
long RPC_STATUS
Definition: rpc.h:52
void * Buffer
Definition: rpcdcep.h:40
#define RpcEndFinally
Definition: rpc.h:131
#define RpcTryExcept
Definition: rpc.h:126
#define __RPC_FAR
Definition: rpc.h:56
struct tagNDR_SCONTEXT * NDR_SCONTEXT
NDR_SCONTEXT WINAPI NDRSContextUnmarshall(void *pBuff, ULONG DataRepresentation)
void __RPC_USER PCTXTYPE_rundown(PCTXTYPE)
Definition: server.c:62
const unsigned char * PFORMAT_STRING
Definition: rpcndr.h:176
ULONG BufferLength
Definition: rpcndr.h:207
unsigned char * BufferEnd
Definition: rpcndr.h:205
const MIDL_STUB_DESC hello_StubDesc
Definition: ctx_s.c:237
void CtxOpen(PCTXTYPE __RPC_FAR *pphContext, long Value)
Definition: ctx_c.c:76
#define NDR_LOCAL_DATA_REPRESENTATION
Definition: rpcndr.h:107
void(__RPC_USER * NDR_RUNDOWN)(void *context)
Definition: rpcndr.h:153
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090
ULONG DataRepresentation
Definition: rpcdcep.h:39
unsigned char Format[PROC_FORMAT_STRING_SIZE]
Definition: client.c:20
const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString
Definition: ctx_s.c:278
#define RpcExcept(expr)
Definition: rpc.h:127
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define RPC_BAD_STUB_DATA_EXCEPTION_FILTER
Definition: rpcndr.h:138

Variable Documentation

◆ __MIDL_ProcFormatString

const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString

Definition at line 278 of file ctx_s.c.

Referenced by hello_CtxClose(), hello_CtxHello(), and hello_CtxOpen().

◆ __MIDL_TypeFormatString

const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString
Initial value:
=
{
0,
{
NdrFcShort( 0x0 ),
0x11, 0x0,
NdrFcShort( 0x2 ),
0x30,
0xa0,
0x0,
0x0,
0x30,
0x41,
0x0,
0x0,
0x11, 0x0,
NdrFcShort( 0x2 ),
0x30,
0xe1,
0x0,
0x0,
0x0
}
}
GLint x0
Definition: linetemp.h:95
#define NdrFcShort(s)
Definition: rpcndr.h:134
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3706

Definition at line 319 of file ctx_s.c.

◆ hello___RpcServerInterface

const RPC_SERVER_INTERFACE hello___RpcServerInterface
static
Initial value:
=
{
{{0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}},{1,0}},
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
0,
0,
0,
0,
0
}
struct _RPC_SERVER_INTERFACE RPC_SERVER_INTERFACE
RPC_DISPATCH_TABLE hello_v1_0_DispatchTable
Definition: ctx_s.c:268

Definition at line 49 of file ctx_s.c.

◆ hello_StubDesc

const MIDL_STUB_DESC hello_StubDesc
Initial value:
=
{
0,
0,
0,
0,
0,
1,
0x10001,
0,
0x5030118,
0,
0,
0,
0x1,
0,
0,
0
}
unsigned char Format[TYPE_FORMAT_STRING_SIZE]
Definition: client.c:14
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
static const RPC_SERVER_INTERFACE hello___RpcServerInterface
Definition: ctx_s.c:49
#define __RPC_FAR
Definition: rpc.h:56
const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString
Definition: ctx_s.c:319
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371
void __RPC_USER MIDL_user_free(void *p)
Definition: irotp.c:376

Definition at line 237 of file ctx_s.c.

Referenced by hello_CtxClose(), hello_CtxHello(), and hello_CtxOpen().

◆ hello_table

RPC_DISPATCH_FUNCTION hello_table[]
static
Initial value:
=
{
0
}
void __RPC_STUB hello_CtxClose(PRPC_MESSAGE _pRpcMessage)
Definition: ctx_s.c:176
void __RPC_STUB hello_CtxHello(PRPC_MESSAGE _pRpcMessage)
Definition: ctx_s.c:130
void __RPC_STUB hello_CtxOpen(PRPC_MESSAGE _pRpcMessage)
Definition: ctx_s.c:66

Definition at line 261 of file ctx_s.c.

◆ hello_v1_0_DispatchTable

RPC_DISPATCH_TABLE hello_v1_0_DispatchTable
Initial value:
=
{
3,
}
static RPC_DISPATCH_FUNCTION hello_table[]
Definition: ctx_s.c:261

Definition at line 268 of file ctx_s.c.

◆ hello_v1_0_s_ifspec

Definition at line 61 of file ctx_s.c.

Referenced by main().