ReactOS 0.4.16-dev-297-gc569aee
ctx_c.c File Reference
#include <string.h>
#include "ctx.h"
Include dependency graph for ctx_c.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
 
#define GENERIC_BINDING_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 CtxOpen (PCTXTYPE __RPC_FAR *pphContext, long Value)
 
void CtxHello (PCTXTYPE phContext)
 
void CtxClose (PCTXTYPE __RPC_FAR *pphContext)
 

Variables

const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString
 
const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString
 
handle_t hBinding
 
static const RPC_CLIENT_INTERFACE hello___RpcClientInterface
 
RPC_IF_HANDLE hello_v1_0_c_ifspec = (RPC_IF_HANDLE)& hello___RpcClientInterface
 
const MIDL_STUB_DESC hello_StubDesc
 
RPC_BINDING_HANDLE hello__MIDL_AutoBindHandle
 

Macro Definition Documentation

◆ GENERIC_BINDING_TABLE_SIZE

#define GENERIC_BINDING_TABLE_SIZE   0

Definition at line 48 of file ctx_c.c.

◆ PROC_FORMAT_STRING_SIZE

#define PROC_FORMAT_STRING_SIZE   21

Definition at line 28 of file ctx_c.c.

◆ TRANSMIT_AS_TABLE_SIZE

#define TRANSMIT_AS_TABLE_SIZE   0

Definition at line 29 of file ctx_c.c.

◆ TYPE_FORMAT_STRING_SIZE

#define TYPE_FORMAT_STRING_SIZE   23

Definition at line 27 of file ctx_c.c.

◆ WIRE_MARSHAL_TABLE_SIZE

#define WIRE_MARSHAL_TABLE_SIZE   0

Definition at line 30 of file ctx_c.c.

Typedef Documentation

◆ MIDL_PROC_FORMAT_STRING

◆ MIDL_TYPE_FORMAT_STRING

Function Documentation

◆ CtxClose()

void CtxClose ( PCTXTYPE __RPC_FAR pphContext)

Definition at line 179 of file ctx_c.c.

181{
182
183 RPC_BINDING_HANDLE _Handle = 0;
184
185 RPC_MESSAGE _RpcMessage;
186
187 MIDL_STUB_MESSAGE _StubMsg;
188
189 if(!pphContext)
190 {
192 }
194 {
196 ( PRPC_MESSAGE )&_RpcMessage,
197 ( PMIDL_STUB_MESSAGE )&_StubMsg,
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
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 )
219
221 ( PMIDL_STUB_MESSAGE )&_StubMsg,
222 ( NDR_CCONTEXT __RPC_FAR * )pphContext,
223 _Handle);
224
225 }
227 {
228 NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
229
230 }
232
233}
const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString
Definition: ctx_c.c:264
const MIDL_STUB_DESC hello_StubDesc
Definition: ctx_c.c:236
void WINAPI NdrClientContextMarshall(PMIDL_STUB_MESSAGE pStubMsg, NDR_CCONTEXT ContextHandle, int fCheck)
void WINAPI NdrClientContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, NDR_CCONTEXT *pContextHandle, RPC_BINDING_HANDLE BindHandle)
void WINAPI NdrConvert(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
void WINAPI NdrClientInitializeNew(PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum)
void WINAPI NdrFreeBuffer(PMIDL_STUB_MESSAGE pStubMsg)
unsigned char *WINAPI NdrGetBuffer(PMIDL_STUB_MESSAGE stubmsg, ULONG buflen, RPC_BINDING_HANDLE handle)
unsigned char *WINAPI NdrSendReceive(PMIDL_STUB_MESSAGE stubmsg, unsigned char *buffer)
RPC_BINDING_HANDLE WINAPI NDRCContextBinding(NDR_CCONTEXT CContext)
#define NDR_LOCAL_DATA_REPRESENTATION
Definition: rpcndr.h:107
const unsigned char * PFORMAT_STRING
Definition: rpcndr.h:176
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:188
#define RpcEndFinally
Definition: rpc.h:131
#define RpcTryFinally
Definition: rpc.h:129
#define __RPC_FAR
Definition: rpc.h:56
#define RpcFinally
Definition: rpc.h:130
unsigned char Format[PROC_FORMAT_STRING_SIZE]
Definition: client.c:20
unsigned char * Buffer
Definition: rpcndr.h:203
ULONG BufferLength
Definition: rpcndr.h:207
ULONG DataRepresentation
Definition: rpcdcep.h:39
#define RPC_X_NULL_REF_POINTER
Definition: winerror.h:1087

Referenced by hello_CtxClose().

◆ CtxHello()

void CtxHello ( PCTXTYPE  phContext)

Definition at line 130 of file ctx_c.c.

132{
133
134 RPC_BINDING_HANDLE _Handle = 0;
135
136 RPC_MESSAGE _RpcMessage;
137
138 MIDL_STUB_MESSAGE _StubMsg;
139
141 {
143 ( PRPC_MESSAGE )&_RpcMessage,
144 ( PMIDL_STUB_MESSAGE )&_StubMsg,
146 1);
147
148
149 if(phContext != 0)
150 {
151 _Handle = NDRCContextBinding(( NDR_CCONTEXT )phContext);;
152
153 }
154 else
155 {
157 }
158
159 _StubMsg.BufferLength = 20U;
160 NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
161
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 }
170 {
171 NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
172
173 }
175
176}
#define RPC_X_SS_IN_NULL_CONTEXT
Definition: winerror.h:1083

◆ CtxOpen()

void CtxOpen ( PCTXTYPE __RPC_FAR pphContext,
long  Value 
)

Definition at line 76 of file ctx_c.c.

79{
80
81 RPC_BINDING_HANDLE _Handle = 0;
82
83 RPC_MESSAGE _RpcMessage;
84
85 MIDL_STUB_MESSAGE _StubMsg;
86
87 if(!pphContext)
88 {
90 }
92 {
94 ( PRPC_MESSAGE )&_RpcMessage,
95 ( PMIDL_STUB_MESSAGE )&_StubMsg,
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 )
112
113 *pphContext = (void *)0;
115 ( PMIDL_STUB_MESSAGE )&_StubMsg,
116 ( NDR_CCONTEXT __RPC_FAR * )pphContext,
117 _Handle);
118
119 }
121 {
122 NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
123
124 }
126
127}
handle_t hBinding
Definition: ctx_c.c:54
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

Referenced by hello_CtxOpen(), and main().

Variable Documentation

◆ __MIDL_ProcFormatString

const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString

Definition at line 264 of file ctx_c.c.

Referenced by CtxClose(), and CtxOpen().

◆ __MIDL_TypeFormatString

static 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
}
}
#define NdrFcShort(s)
Definition: rpcndr.h:134

Definition at line 305 of file ctx_c.c.

◆ hBinding

handle_t hBinding

Definition at line 54 of file ctx_c.c.

Referenced by ATSVC_HANDLE_bind(), ATSVC_HANDLE_unbind(), BROWSER_IDENTIFY_HANDLE_bind(), BROWSER_IDENTIFY_HANDLE_unbind(), client_free_handle(), CreateProcessWithLogonW(), CtxOpen(), DNSRSLVR_HANDLE_bind(), DNSRSLVR_HANDLE_unbind(), do_ndr_client_call(), DsRoleGetPrimaryDomainInformation(), DsRolerGetPrimaryDomainInformation(), DsSetupBind(), DsSetupUnbind(), EVENTLOG_HANDLE_A_bind(), EVENTLOG_HANDLE_A_unbind(), EVENTLOG_HANDLE_W_bind(), EVENTLOG_HANDLE_W_unbind(), IsCallerInteractive(), LOGONSRV_HANDLE_bind(), LOGONSRV_HANDLE_unbind(), m_CtxOpen(), m_CtxOpen2(), main(), ndr_update_context_handle(), NDRCContextUnmarshall(), NDRSContextMarshall2(), NDRSContextMarshallEx(), NDRSContextUnmarshall2(), NDRSContextUnmarshallEx(), NetpBind(), PLSAPR_SERVER_NAME_bind(), PLSAPR_SERVER_NAME_unbind(), PNP_AddID(), PNP_Connect(), PNP_CreateDevInst(), PNP_CreateKey(), PNP_DeleteClassKey(), PNP_DeviceInstanceAction(), PNP_DisableDevInst(), PNP_Disconnect(), PNP_EnumerateSubKeys(), PNP_GetClassCount(), PNP_GetClassInstance(), PNP_GetClassName(), PNP_GetClassRegProp(), PNP_GetCustomDevProp(), PNP_GetDepth(), PNP_GetDeviceList(), PNP_GetDeviceListSize(), PNP_GetDeviceRegProp(), PNP_GetDeviceStatus(), PNP_GetFirstLogConf(), PNP_GetGlobalState(), PNP_GetHwProfInfo(), PNP_GetInterfaceDeviceList(), PNP_GetInterfaceDeviceListSize(), PNP_GetNextLogConf(), PNP_GetNextResDes(), PNP_GetRelatedDeviceInstance(), PNP_GetRootDeviceInstance(), PNP_GetServerSideDeviceInstallFlags(), PNP_GetVersion(), PNP_GetVersionInternal(), PNP_HwProfFlags(), PNP_InitDetection(), PNP_IsDockStationPresent(), PNP_QueryRemove(), PNP_RegisterDriver(), PNP_RegisterNotification(), PNP_ReportLogOn(), PNP_RequestDeviceEject(), PNP_RequestEjectPC(), PNP_SetClassRegProp(), PNP_SetDeviceProblem(), PNP_SetDeviceRegProp(), PNP_UnregisterNotification(), PNP_ValidateDeviceInstance(), PREGISTRY_SERVER_NAME_bind(), PREGISTRY_SERVER_NAME_unbind(), PSAMPR_SERVER_NAME_bind(), PSAMPR_SERVER_NAME_unbind(), SeclCreateProcessWithLogonW(), SRVSVC_HANDLE_bind(), SRVSVC_HANDLE_unbind(), SVCCTL_HANDLEA_bind(), SVCCTL_HANDLEA_unbind(), SVCCTL_HANDLEW_bind(), SVCCTL_HANDLEW_unbind(), WINSPOOL_HANDLE_bind(), WINSPOOL_HANDLE_unbind(), WKSSVC_IDENTIFY_HANDLE_bind(), WKSSVC_IDENTIFY_HANDLE_unbind(), WKSSVC_IMPERSONATE_HANDLE_bind(), WKSSVC_IMPERSONATE_HANDLE_unbind(), WLANSVC_HANDLE_bind(), and WLANSVC_HANDLE_unbind().

◆ hello___RpcClientInterface

const RPC_CLIENT_INTERFACE hello___RpcClientInterface
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,
0
}
struct _RPC_CLIENT_INTERFACE RPC_CLIENT_INTERFACE

Definition at line 57 of file ctx_c.c.

◆ hello__MIDL_AutoBindHandle

RPC_BINDING_HANDLE hello__MIDL_AutoBindHandle

Definition at line 73 of file ctx_c.c.

◆ hello_StubDesc

const MIDL_STUB_DESC hello_StubDesc
Initial value:
=
{
0,
0,
0,
0,
1,
0x10001,
0,
0x5030118,
0,
0,
0,
0x1,
0,
0,
0
}
const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString
Definition: ctx_c.c:305
static const RPC_CLIENT_INTERFACE hello___RpcClientInterface
Definition: ctx_c.c:57
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
unsigned char Format[TYPE_FORMAT_STRING_SIZE]
Definition: client.c:14

Definition at line 236 of file ctx_c.c.

Referenced by CtxClose(), CtxHello(), and CtxOpen().

◆ hello_v1_0_c_ifspec

Definition at line 69 of file ctx_c.c.