ReactOS 0.4.15-dev-5666-gc548b97
ctx.h File Reference
#include "rpc.h"
#include "rpcndr.h"
Include dependency graph for ctx.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __REQUIRED_RPCNDR_H_VERSION__   440
 
#define __hello_INTERFACE_DEFINED__
 

Typedefs

typedef long CTXTYPE
 
typedef CTXTYPE __RPC_FARPCTXTYPE
 

Functions

void __RPC_FAR *__RPC_USER MIDL_user_allocate (size_t)
 
void __RPC_USER MIDL_user_free (void __RPC_FAR *)
 
void CtxOpen (PCTXTYPE __RPC_FAR *pphContext, long Value)
 
void CtxHello (PCTXTYPE phContext)
 
void CtxClose (PCTXTYPE __RPC_FAR *pphContext)
 
void __RPC_USER PCTXTYPE_rundown (PCTXTYPE)
 

Variables

handle_t hBinding
 
RPC_IF_HANDLE hello_v1_0_c_ifspec
 
RPC_IF_HANDLE hello_v1_0_s_ifspec
 

Macro Definition Documentation

◆ __hello_INTERFACE_DEFINED__

#define __hello_INTERFACE_DEFINED__

Definition at line 41 of file ctx.h.

◆ __REQUIRED_RPCNDR_H_VERSION__

#define __REQUIRED_RPCNDR_H_VERSION__   440

Definition at line 22 of file ctx.h.

Typedef Documentation

◆ CTXTYPE

typedef long CTXTYPE

Definition at line 46 of file ctx.h.

◆ PCTXTYPE

Definition at line 48 of file ctx.h.

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

Referenced by hello_CtxHello().

◆ 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().

◆ MIDL_user_allocate()

void __RPC_FAR *__RPC_USER MIDL_user_allocate ( size_t  size)

Definition at line 371 of file irotp.c.

372{
373 return HeapAlloc(GetProcessHeap(), 0, size);
374}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
GLsizeiptr size
Definition: glext.h:5919

◆ MIDL_user_free()

void __RPC_USER MIDL_user_free ( void __RPC_FAR ptr)

Definition at line 62 of file rpcserver.c.

63{
65}
#define HeapFree(x, y, z)
Definition: compat.h:735
static PVOID ptr
Definition: dispmode.c:27

◆ PCTXTYPE_rundown()

void __RPC_USER PCTXTYPE_rundown ( PCTXTYPE  hContext)

Definition at line 62 of file server.c.

64{
65 PCTXTYPE pCtx = (PCTXTYPE)hContext;
66 printf("Context rundown: Value=%d \n", *pCtx);
67 midl_user_free(hContext);
68}
CTXTYPE __RPC_FAR * PCTXTYPE
Definition: ctx.h:48
#define printf
Definition: freeldr.h:94
#define midl_user_free
Definition: rpc.h:45

Referenced by hello_CtxClose(), and hello_CtxOpen().

Variable Documentation

◆ hBinding

handle_t hBinding
extern

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(), 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_v1_0_c_ifspec

RPC_IF_HANDLE hello_v1_0_c_ifspec
extern

Definition at line 69 of file ctx_c.c.

◆ hello_v1_0_s_ifspec

RPC_IF_HANDLE hello_v1_0_s_ifspec
extern

Definition at line 61 of file ctx_s.c.

Referenced by main().