ReactOS 0.4.16-dev-1946-g52006dd
rpcndr.h File Reference
#include <basetsd.h>
#include <rpcsal.h>
Include dependency graph for rpcndr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _NDR_SCONTEXT
 
struct  ARRAY_INFO
 
struct  CS_STUB_INFO
 
struct  _MIDL_STUB_MESSAGE
 
struct  _GENERIC_BINDING_ROUTINE_PAIR
 
struct  __GENERIC_BINDING_INFO
 
struct  _XMIT_ROUTINE_QUINTUPLE
 
struct  _USER_MARSHAL_ROUTINE_QUADRUPLE
 
struct  _USER_MARSHAL_CB
 
struct  _MALLOC_FREE_STRUCT
 
struct  _COMM_FAULT_OFFSETS
 
struct  _NDR_CS_SIZE_CONVERT_ROUTINES
 
struct  _NDR_CS_ROUTINES
 
struct  _NDR_EXPR_DESC
 
struct  _MIDL_STUB_DESC
 
struct  _MIDL_FORMAT_STRING
 
struct  _MIDL_METHOD_PROPERTY
 
struct  _MIDL_METHOD_PROPERTY_MAP
 
struct  _MIDL_INTERFACE_METHOD_PROPERTIES
 
struct  _MIDL_SYNTAX_INFO
 
struct  _MIDL_SERVER_INFO_
 
struct  _MIDL_STUBLESS_PROXY_INFO
 
union  _CLIENT_CALL_RETURN
 
struct  _FULL_PTR_TO_REFID_ELEMENT
 
struct  _FULL_PTR_XLAT_TABLES
 
struct  _SCONTEXT_QUEUE
 
struct  _NDR_USER_MARSHAL_INFO_LEVEL1
 
struct  _NDR_USER_MARSHAL_INFO
 

Macros

#define __RPCNDR_H_VERSION__   ( 500 )
 
#define CONST_VTBL
 
#define EXTERN_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)    EXTERN_C const GUID name
 
#define NDR_CHAR_REP_MASK   ((ULONG)0x000f)
 
#define NDR_INT_REP_MASK   ((ULONG)0x00f0)
 
#define NDR_FLOAT_REP_MASK   ((ULONG)0xff00)
 
#define NDR_IEEE_FLOAT   ((ULONG)0x0000)
 
#define NDR_VAX_FLOAT   ((ULONG)0x0100)
 
#define NDR_IBM_FLOAT   ((ULONG)0x0300)
 
#define NDR_ASCII_CHAR   ((ULONG)0x0000)
 
#define NDR_EBCDIC_CHAR   ((ULONG)0x0001)
 
#define NDR_LITTLE_ENDIAN   ((ULONG)0x0010)
 
#define NDR_BIG_ENDIAN   ((ULONG)0x0000)
 
#define NDR_LOCAL_DATA_REPRESENTATION   NDR_LITTLE_ENDIAN
 
#define NDR_LOCAL_ENDIAN   NDR_LITTLE_ENDIAN
 
#define TARGET_IS_NT50_OR_LATER   1
 
#define TARGET_IS_NT40_OR_LATER   1
 
#define TARGET_IS_NT351_OR_WIN95_OR_LATER   1
 
#define small   char
 
#define _ERROR_STATUS_T_DEFINED
 
#define __RPC_CALLEE   WINAPI
 
#define RPC_VAR_ENTRY   WINAPIV
 
#define NDR_SHAREABLE   static
 
#define MIDL_ascii_strlen(s)   strlen(s)
 
#define MIDL_ascii_strcpy(d, s)   strcpy(d,s)
 
#define MIDL_memset(d, v, n)   memset(d,v,n)
 
#define midl_user_free   MIDL_user_free
 
#define midl_user_allocate   MIDL_user_allocate
 
#define NdrFcShort(s)   (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
 
#define NdrFcLong(s)
 
#define RPC_BAD_STUB_DATA_EXCEPTION_FILTER
 
#define NDRSContextValue(hContext)   (&(hContext)->userContext)
 
#define cbNDRContext   20
 
#define DECLSPEC_NOVTABLE
 
#define DECLSPEC_UUID(x)
 
#define MIDL_INTERFACE(x)   struct DECLSPEC_UUID(x) DECLSPEC_NOVTABLE
 
#define USER_MARSHAL_CB_SIGNATURE
 
#define USER_CALL_CTXT_MASK(f)   ((f) & 0x00ff)
 
#define USER_CALL_AUX_MASK(f)   ((f) & 0xff00)
 
#define GET_USER_DATA_REP(f)   HIWORD(f)
 
#define USER_CALL_IS_ASYNC   0x0100
 
#define USER_CALL_NEW_CORRELATION_DESC   0x0200
 
#define SIMPLE_TYPE_MARSHAL(type)
 
#define TYPE_MARSHAL(type)
 
#define USER_MARSHAL_FC_BYTE   1
 
#define USER_MARSHAL_FC_CHAR   2
 
#define USER_MARSHAL_FC_SMALL   3
 
#define USER_MARSHAL_FC_USMALL   4
 
#define USER_MARSHAL_FC_WCHAR   5
 
#define USER_MARSHAL_FC_SHORT   6
 
#define USER_MARSHAL_FC_USHORT   7
 
#define USER_MARSHAL_FC_LONG   8
 
#define USER_MARSHAL_FC_ULONG   9
 
#define USER_MARSHAL_FC_FLOAT   10
 
#define USER_MARSHAL_FC_HYPER   11
 
#define USER_MARSHAL_FC_DOUBLE   12
 

Typedefs

typedef unsigned char byte
 
typedef INT64 hyper
 
typedef UINT64 MIDL_uhyper
 
typedef unsigned char boolean
 
typedef ULONG error_status_t
 
typedef struct _NDR_SCONTEXTNDR_SCONTEXT
 
typedef void(__RPC_USERNDR_RUNDOWN) (void *context)
 
typedef void(__RPC_USERNDR_NOTIFY_ROUTINE) (void)
 
typedef void(__RPC_USERNDR_NOTIFY2_ROUTINE) (boolean flag)
 
typedef unsigned charRPC_BUFPTR
 
typedef ULONG RPC_LENGTH
 
typedef void(__RPC_USEREXPR_EVAL) (struct _MIDL_STUB_MESSAGE *)
 
typedef const unsigned charPFORMAT_STRING
 
typedef struct ARRAY_INFOPARRAY_INFO
 
typedef struct _NDR_PIPE_DESC * PNDR_PIPE_DESC
 
typedef struct _NDR_PIPE_MESSAGE * PNDR_PIPE_MESSAGE
 
typedef struct _NDR_ASYNC_MESSAGE * PNDR_ASYNC_MESSAGE
 
typedef struct _NDR_CORRELATION_INFO * PNDR_CORRELATION_INFO
 
typedef struct _MIDL_STUB_MESSAGE MIDL_STUB_MESSAGE
 
typedef struct _MIDL_STUB_MESSAGEPMIDL_STUB_MESSAGE
 
typedef void *(__RPC_APIGENERIC_BINDING_ROUTINE) (void *)
 
typedef void(__RPC_APIGENERIC_UNBIND_ROUTINE) (void *, unsigned char *)
 
typedef struct _GENERIC_BINDING_ROUTINE_PAIR GENERIC_BINDING_ROUTINE_PAIR
 
typedef struct _GENERIC_BINDING_ROUTINE_PAIRPGENERIC_BINDING_ROUTINE_PAIR
 
typedef struct __GENERIC_BINDING_INFO GENERIC_BINDING_INFO
 
typedef struct __GENERIC_BINDING_INFOPGENERIC_BINDING_INFO
 
typedef void(__RPC_USERXMIT_HELPER_ROUTINE) (PMIDL_STUB_MESSAGE)
 
typedef struct _XMIT_ROUTINE_QUINTUPLE XMIT_ROUTINE_QUINTUPLE
 
typedef struct _XMIT_ROUTINE_QUINTUPLEPXMIT_ROUTINE_QUINTUPLE
 
typedef ULONG(__RPC_USERUSER_MARSHAL_SIZING_ROUTINE) (ULONG *, ULONG, void *)
 
typedef unsigned char *(__RPC_USERUSER_MARSHAL_MARSHALLING_ROUTINE) (ULONG *, unsigned char *, void *)
 
typedef unsigned char *(__RPC_USERUSER_MARSHAL_UNMARSHALLING_ROUTINE) (ULONG *, unsigned char *, void *)
 
typedef void(__RPC_USERUSER_MARSHAL_FREEING_ROUTINE) (ULONG *, void *)
 
typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE USER_MARSHAL_ROUTINE_QUADRUPLE
 
typedef struct _USER_MARSHAL_CB USER_MARSHAL_CB
 
typedef struct _MALLOC_FREE_STRUCT MALLOC_FREE_STRUCT
 
typedef struct _COMM_FAULT_OFFSETS COMM_FAULT_OFFSETS
 
typedef enum _IDL_CS_CONVERT IDL_CS_CONVERT
 
typedef void(__RPC_USERCS_TYPE_NET_SIZE_ROUTINE) (RPC_BINDING_HANDLE, ULONG, ULONG, IDL_CS_CONVERT *, ULONG *, error_status_t *)
 
typedef void(__RPC_USERCS_TYPE_TO_NETCS_ROUTINE) (RPC_BINDING_HANDLE, ULONG, void *, ULONG, byte *, ULONG *, error_status_t *)
 
typedef void(__RPC_USERCS_TYPE_LOCAL_SIZE_ROUTINE) (RPC_BINDING_HANDLE, ULONG, ULONG, IDL_CS_CONVERT *, ULONG *, error_status_t *)
 
typedef void(__RPC_USERCS_TYPE_FROM_NETCS_ROUTINE) (RPC_BINDING_HANDLE, ULONG, byte *, ULONG, ULONG, void *, ULONG *, error_status_t *)
 
typedef void(__RPC_USERCS_TAG_GETTING_ROUTINE) (RPC_BINDING_HANDLE, int, ULONG *, ULONG *, ULONG *, error_status_t *)
 
typedef struct _NDR_CS_SIZE_CONVERT_ROUTINES NDR_CS_SIZE_CONVERT_ROUTINES
 
typedef struct _NDR_CS_ROUTINES NDR_CS_ROUTINES
 
typedef struct _NDR_EXPR_DESC NDR_EXPR_DESC
 
typedef struct _MIDL_STUB_DESC MIDL_STUB_DESC
 
typedef const MIDL_STUB_DESCPMIDL_STUB_DESC
 
typedef struct _MIDL_FORMAT_STRING MIDL_FORMAT_STRING
 
typedef struct _MIDL_METHOD_PROPERTY MIDL_METHOD_PROPERTY
 
typedef struct _MIDL_METHOD_PROPERTYPMIDL_METHOD_PROPERTY
 
typedef struct _MIDL_METHOD_PROPERTY_MAP MIDL_METHOD_PROPERTY_MAP
 
typedef struct _MIDL_METHOD_PROPERTY_MAPPMIDL_METHOD_PROPERTY_MAP
 
typedef struct _MIDL_INTERFACE_METHOD_PROPERTIES MIDL_INTERFACE_METHOD_PROPERTIES
 
typedef struct _MIDL_SYNTAX_INFO MIDL_SYNTAX_INFO
 
typedef struct _MIDL_SYNTAX_INFOPMIDL_SYNTAX_INFO
 
typedef void(__RPC_APISTUB_THUNK) (PMIDL_STUB_MESSAGE)
 
typedef LONG(__RPC_APISERVER_ROUTINE) (void)
 
typedef struct _MIDL_SERVER_INFO_ MIDL_SERVER_INFO
 
typedef struct _MIDL_SERVER_INFO_PMIDL_SERVER_INFO
 
typedef struct _MIDL_STUBLESS_PROXY_INFO MIDL_STUBLESS_PROXY_INFO
 
typedef struct _MIDL_STUBLESS_PROXY_INFOPMIDL_STUBLESS_PROXY_INFO
 
typedef union _CLIENT_CALL_RETURN CLIENT_CALL_RETURN
 
typedef struct _FULL_PTR_TO_REFID_ELEMENT FULL_PTR_TO_REFID_ELEMENT
 
typedef struct _FULL_PTR_TO_REFID_ELEMENTPFULL_PTR_TO_REFID_ELEMENT
 
typedef struct _FULL_PTR_XLAT_TABLES FULL_PTR_XLAT_TABLES
 
typedef struct _FULL_PTR_XLAT_TABLESPFULL_PTR_XLAT_TABLES
 
typedef voidNDR_CCONTEXT
 
typedef struct _SCONTEXT_QUEUE SCONTEXT_QUEUE
 
typedef struct _SCONTEXT_QUEUEPSCONTEXT_QUEUE
 
typedef struct _NDR_USER_MARSHAL_INFO_LEVEL1 NDR_USER_MARSHAL_INFO_LEVEL1
 
typedef struct _NDR_USER_MARSHAL_INFO NDR_USER_MARSHAL_INFO
 

Enumerations

enum  USER_MARSHAL_CB_TYPE { USER_MARSHAL_CB_BUFFER_SIZE , USER_MARSHAL_CB_MARSHALL , USER_MARSHAL_CB_UNMARSHALL , USER_MARSHAL_CB_FREE }
 
enum  _IDL_CS_CONVERT { IDL_CS_NO_CONVERT , IDL_CS_IN_PLACE_CONVERT , IDL_CS_NEW_BUFFER_CONVERT }
 
enum  STUB_PHASE { STUB_UNMARSHAL , STUB_CALL_SERVER , STUB_MARSHAL , STUB_CALL_SERVER_NO_HRESULT }
 
enum  PROXY_PHASE {
  PROXY_CALCSIZE , PROXY_GETBUFFER , PROXY_MARSHAL , PROXY_SENDRECEIVE ,
  PROXY_UNMARSHAL
}
 
enum  XLAT_SIDE { XLAT_SERVER = 1 , XLAT_CLIENT }
 

Functions

void __RPC_USER MIDL_user_free (void *)
 
void *__RPC_USER MIDL_user_allocate (SIZE_T) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(MIDL_user_free) __WINE_MALLOC
 
RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY NDRCContextBinding (NDR_CCONTEXT CContext)
 
RPCRTAPI void RPC_ENTRY NDRCContextMarshall (NDR_CCONTEXT CContext, void *pBuff)
 
RPCRTAPI void RPC_ENTRY NDRCContextUnmarshall (NDR_CCONTEXT *pCContext, RPC_BINDING_HANDLE hBinding, void *pBuff, ULONG DataRepresentation)
 
RPCRTAPI void RPC_ENTRY NDRSContextMarshall (NDR_SCONTEXT CContext, void *pBuff, NDR_RUNDOWN userRunDownIn)
 
RPCRTAPI NDR_SCONTEXT RPC_ENTRY NDRSContextUnmarshall (void *pBuff, ULONG DataRepresentation)
 
RPCRTAPI void RPC_ENTRY NDRSContextMarshallEx (RPC_BINDING_HANDLE BindingHandle, NDR_SCONTEXT CContext, void *pBuff, NDR_RUNDOWN userRunDownIn)
 
RPCRTAPI void RPC_ENTRY NDRSContextMarshall2 (RPC_BINDING_HANDLE BindingHandle, NDR_SCONTEXT CContext, void *pBuff, NDR_RUNDOWN userRunDownIn, void *CtxGuard, ULONG Flags)
 
RPCRTAPI NDR_SCONTEXT RPC_ENTRY NDRSContextUnmarshallEx (RPC_BINDING_HANDLE BindingHandle, void *pBuff, ULONG DataRepresentation)
 
RPCRTAPI NDR_SCONTEXT RPC_ENTRY NDRSContextUnmarshall2 (RPC_BINDING_HANDLE BindingHandle, void *pBuff, ULONG DataRepresentation, void *CtxGuard, ULONG Flags)
 
RPCRTAPI void RPC_ENTRY NdrClientContextMarshall (PMIDL_STUB_MESSAGE pStubMsg, NDR_CCONTEXT ContextHandle, int fCheck)
 
RPCRTAPI void RPC_ENTRY NdrClientContextUnmarshall (PMIDL_STUB_MESSAGE pStubMsg, NDR_CCONTEXT *pContextHandle, RPC_BINDING_HANDLE BindHandle)
 
RPCRTAPI void RPC_ENTRY NdrServerContextMarshall (PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT ContextHandle, NDR_RUNDOWN RundownRoutine)
 
RPCRTAPI NDR_SCONTEXT RPC_ENTRY NdrServerContextUnmarshall (PMIDL_STUB_MESSAGE pStubMsg)
 
RPCRTAPI void RPC_ENTRY NdrContextHandleSize (PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
 
RPCRTAPI NDR_SCONTEXT RPC_ENTRY NdrContextHandleInitialize (PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
 
RPCRTAPI void RPC_ENTRY NdrServerContextNewMarshall (PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT ContextHandle, NDR_RUNDOWN RundownRoutine, PFORMAT_STRING pFormat)
 
RPCRTAPI NDR_SCONTEXT RPC_ENTRY NdrServerContextNewUnmarshall (PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
 
RPCRTAPI RPC_STATUS RPC_ENTRY RpcSmDestroyClientContext (void **ContextHandle)
 
RPCRTAPI void RPC_ENTRY RpcSsDestroyClientContext (void **ContextHandle)
 
RPCRTAPI void RPC_ENTRY NdrSimpleTypeMarshall (PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, unsigned char FormatChar)
 
RPCRTAPI void RPC_ENTRY NdrSimpleTypeUnmarshall (PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, unsigned char FormatChar)
 
RPCRTAPI unsigned char *RPC_ENTRY NdrByteCountPointerMarshall (PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
 
RPCRTAPI unsigned char *RPC_ENTRY NdrByteCountPointerUnmarshall (PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
 
RPCRTAPI void RPC_ENTRY NdrByteCountPointerBufferSize (PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
 
RPCRTAPI void RPC_ENTRY NdrByteCountPointerFree (PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat)
 
RPCRTAPI unsigned char *RPC_ENTRY NdrRangeUnmarshall (PMIDL_STUB_MESSAGE pStubMsg, unsigned char **ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc)
 
RPCRTAPI void RPC_ENTRY NdrCorrelationInitialize (PMIDL_STUB_MESSAGE pStubMsg, void *pMemory, ULONG CacheSize, ULONG flags)
 
RPCRTAPI void RPC_ENTRY NdrCorrelationPass (PMIDL_STUB_MESSAGE pStubMsg)
 
RPCRTAPI void RPC_ENTRY NdrCorrelationFree (PMIDL_STUB_MESSAGE pStubMsg)
 
RPCRTAPI void RPC_ENTRY NdrConvert2 (PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, LONG NumberParams)
 
RPCRTAPI void RPC_ENTRY NdrConvert (PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
 
RPCRTAPI unsigned char *RPC_ENTRY NdrUserMarshalSimpleTypeConvert (ULONG *pFlags, unsigned char *pBuffer, unsigned char FormatChar)
 
CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrClientCall (PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat,...)
 
CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrClientCall2 (PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat,...)
 
CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrClientCall3 (MIDL_STUBLESS_PROXY_INFO *info, ULONG proc, void *retval,...)
 
CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrAsyncClientCall (PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat,...)
 
CLIENT_CALL_RETURN RPC_VAR_ENTRY Ndr64AsyncClientCall (MIDL_STUBLESS_PROXY_INFO *info, ULONG proc, void *retval,...)
 
CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrDcomAsyncClientCall (PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat,...)
 
RPCRTAPI void RPC_ENTRY NdrServerCall2 (PRPC_MESSAGE pRpcMsg)
 
RPCRTAPI void RPC_ENTRY NdrServerCall (PRPC_MESSAGE pRpcMsg)
 
RPCRTAPI void RPC_ENTRY NdrServerCallAll (PRPC_MESSAGE pRpcMsg)
 
RPCRTAPI void RPC_ENTRY NdrAsyncServerCall (PRPC_MESSAGE pRpcMsg)
 
RPCRTAPI LONG RPC_ENTRY NdrStubCall2 (struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg, DWORD *pdwStubPhase)
 
RPCRTAPI LONG RPC_ENTRY NdrStubCall (struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg, DWORD *pdwStubPhase)
 
RPCRTAPI LONG RPC_ENTRY NdrAsyncStubCall (struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg, DWORD *pdwStubPhase)
 
RPCRTAPI LONG RPC_ENTRY NdrDcomAsyncStubCall (struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg, DWORD *pdwStubPhase)
 
RPCRTAPI void *RPC_ENTRY NdrAllocate (PMIDL_STUB_MESSAGE pStubMsg, SIZE_T Len) __WINE_ALLOC_SIZE(2) __WINE_MALLOC
 
RPCRTAPI void RPC_ENTRY NdrClearOutParameters (PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, void *ArgAddr)
 
RPCRTAPI RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus (PMIDL_STUB_MESSAGE pStubMsg, ULONG *pCommStatus, ULONG *pFaultStatus, RPC_STATUS Status_)
 
RPCRTAPI void RPC_ENTRY NdrOleFree (void *NodeToFree)
 
RPCRTAPI void *RPC_ENTRY NdrOleAllocate (SIZE_T Size) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrOleFree) __WINE_MALLOC
 
RPCRTAPI void RPC_ENTRY NdrClientInitialize (PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum)
 
RPCRTAPI void RPC_ENTRY NdrClientInitializeNew (PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum)
 
RPCRTAPI unsigned char *RPC_ENTRY NdrServerInitialize (PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc)
 
RPCRTAPI unsigned char *RPC_ENTRY NdrServerInitializeNew (PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc)
 
RPCRTAPI unsigned char *RPC_ENTRY NdrServerInitializeUnmarshall (PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, PRPC_MESSAGE pRpcMsg)
 
RPCRTAPI void RPC_ENTRY NdrServerInitializeMarshall (PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg)
 
RPCRTAPI void RPC_ENTRY NdrServerMarshall (struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
 
RPCRTAPI void RPC_ENTRY NdrServerUnmarshall (struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, void *pParamList)
 
RPCRTAPI unsigned char *RPC_ENTRY NdrGetBuffer (PMIDL_STUB_MESSAGE stubmsg, ULONG buflen, RPC_BINDING_HANDLE handle) __WINE_ALLOC_SIZE(2) __WINE_MALLOC
 
RPCRTAPI void RPC_ENTRY NdrFreeBuffer (PMIDL_STUB_MESSAGE pStubMsg)
 
RPCRTAPI unsigned char *RPC_ENTRY NdrSendReceive (PMIDL_STUB_MESSAGE stubmsg, unsigned char *buffer)
 
RPCRTAPI unsigned char *RPC_ENTRY NdrNsGetBuffer (PMIDL_STUB_MESSAGE pStubMsg, ULONG BufferLength, RPC_BINDING_HANDLE Handle)
 
RPCRTAPI unsigned char *RPC_ENTRY NdrNsSendReceive (PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pBufferEnd, RPC_BINDING_HANDLE *pAutoHandle)
 
RPCRTAPI RPC_STATUS RPC_ENTRY NdrGetDcomProtocolVersion (PMIDL_STUB_MESSAGE pStubMsg, RPC_VERSION *pVersion)
 
RPCRTAPI PFULL_PTR_XLAT_TABLES RPC_ENTRY NdrFullPointerXlatInit (ULONG NumberOfPointers, XLAT_SIDE XlatSide)
 
RPCRTAPI void RPC_ENTRY NdrFullPointerXlatFree (PFULL_PTR_XLAT_TABLES pXlatTables)
 
RPCRTAPI int RPC_ENTRY NdrFullPointerQueryPointer (PFULL_PTR_XLAT_TABLES pXlatTables, void *pPointer, unsigned char QueryType, ULONG *pRefId)
 
RPCRTAPI int RPC_ENTRY NdrFullPointerQueryRefId (PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId, unsigned char QueryType, void **ppPointer)
 
RPCRTAPI void RPC_ENTRY NdrFullPointerInsertRefId (PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId, void *pPointer)
 
RPCRTAPI int RPC_ENTRY NdrFullPointerFree (PFULL_PTR_XLAT_TABLES pXlatTables, void *Pointer)
 
RPCRTAPI void RPC_ENTRY NdrRpcSsEnableAllocate (PMIDL_STUB_MESSAGE pMessage)
 
RPCRTAPI void RPC_ENTRY NdrRpcSsDisableAllocate (PMIDL_STUB_MESSAGE pMessage)
 
RPCRTAPI void RPC_ENTRY NdrRpcSmSetClientToOsf (PMIDL_STUB_MESSAGE pMessage)
 
RPCRTAPI void RPC_ENTRY NdrRpcSmClientFree (void *NodeToFree)
 
RPCRTAPI void *RPC_ENTRY NdrRpcSmClientAllocate (SIZE_T Size) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrRpcSmClientFree) __WINE_MALLOC
 
RPCRTAPI void RPC_ENTRY NdrRpcSsDefaultFree (void *NodeToFree)
 
RPCRTAPI void *RPC_ENTRY NdrRpcSsDefaultAllocate (SIZE_T Size) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrRpcSsDefaultFree) __WINE_MALLOC
 
RPCRTAPI RPC_STATUS RPC_ENTRY NdrGetUserMarshalInfo (ULONG *pFlags, ULONG InformationLevel, NDR_USER_MARSHAL_INFO *pMarshalInfo)
 

Macro Definition Documentation

◆ __RPC_CALLEE

#define __RPC_CALLEE   WINAPI

Definition at line 86 of file rpcndr.h.

◆ __RPCNDR_H_VERSION__

#define __RPCNDR_H_VERSION__   ( 500 )

Definition at line 20 of file rpcndr.h.

◆ _ERROR_STATUS_T_DEFINED

#define _ERROR_STATUS_T_DEFINED

Definition at line 83 of file rpcndr.h.

◆ cbNDRContext

#define cbNDRContext   20

Definition at line 116 of file rpcndr.h.

◆ CONST_VTBL

#define CONST_VTBL

Definition at line 44 of file rpcndr.h.

◆ DECLSPEC_NOVTABLE

#define DECLSPEC_NOVTABLE

Definition at line 136 of file rpcndr.h.

◆ DECLSPEC_UUID

#define DECLSPEC_UUID (   x)

Definition at line 144 of file rpcndr.h.

◆ EXTERN_GUID

#define EXTERN_GUID (   name,
  l,
  w1,
  w2,
  b1,
  b2,
  b3,
  b4,
  b5,
  b6,
  b7,
  b8 
)     EXTERN_C const GUID name

Definition at line 53 of file rpcndr.h.

◆ GET_USER_DATA_REP

#define GET_USER_DATA_REP (   f)    HIWORD(f)

Definition at line 326 of file rpcndr.h.

◆ MIDL_ascii_strcpy

#define MIDL_ascii_strcpy (   d,
  s 
)    strcpy(d,s)

Definition at line 91 of file rpcndr.h.

◆ MIDL_ascii_strlen

#define MIDL_ascii_strlen (   s)    strlen(s)

Definition at line 90 of file rpcndr.h.

◆ MIDL_INTERFACE

#define MIDL_INTERFACE (   x)    struct DECLSPEC_UUID(x) DECLSPEC_NOVTABLE

Definition at line 148 of file rpcndr.h.

◆ MIDL_memset

#define MIDL_memset (   d,
  v,
  n 
)    memset(d,v,n)

Definition at line 92 of file rpcndr.h.

◆ midl_user_allocate

#define midl_user_allocate   MIDL_user_allocate

Definition at line 94 of file rpcndr.h.

◆ midl_user_free

#define midl_user_free   MIDL_user_free

Definition at line 93 of file rpcndr.h.

◆ NDR_ASCII_CHAR

#define NDR_ASCII_CHAR   ((ULONG)0x0000)

Definition at line 64 of file rpcndr.h.

◆ NDR_BIG_ENDIAN

#define NDR_BIG_ENDIAN   ((ULONG)0x0000)

Definition at line 67 of file rpcndr.h.

◆ NDR_CHAR_REP_MASK

#define NDR_CHAR_REP_MASK   ((ULONG)0x000f)

Definition at line 58 of file rpcndr.h.

◆ NDR_EBCDIC_CHAR

#define NDR_EBCDIC_CHAR   ((ULONG)0x0001)

Definition at line 65 of file rpcndr.h.

◆ NDR_FLOAT_REP_MASK

#define NDR_FLOAT_REP_MASK   ((ULONG)0xff00)

Definition at line 60 of file rpcndr.h.

◆ NDR_IBM_FLOAT

#define NDR_IBM_FLOAT   ((ULONG)0x0300)

Definition at line 63 of file rpcndr.h.

◆ NDR_IEEE_FLOAT

#define NDR_IEEE_FLOAT   ((ULONG)0x0000)

Definition at line 61 of file rpcndr.h.

◆ NDR_INT_REP_MASK

#define NDR_INT_REP_MASK   ((ULONG)0x00f0)

Definition at line 59 of file rpcndr.h.

◆ NDR_LITTLE_ENDIAN

#define NDR_LITTLE_ENDIAN   ((ULONG)0x0010)

Definition at line 66 of file rpcndr.h.

◆ NDR_LOCAL_DATA_REPRESENTATION

#define NDR_LOCAL_DATA_REPRESENTATION   NDR_LITTLE_ENDIAN

Definition at line 68 of file rpcndr.h.

◆ NDR_LOCAL_ENDIAN

#define NDR_LOCAL_ENDIAN   NDR_LITTLE_ENDIAN

Definition at line 69 of file rpcndr.h.

◆ NDR_SHAREABLE

#define NDR_SHAREABLE   static

Definition at line 88 of file rpcndr.h.

◆ NDR_VAX_FLOAT

#define NDR_VAX_FLOAT   ((ULONG)0x0100)

Definition at line 62 of file rpcndr.h.

◆ NdrFcLong

#define NdrFcLong (   s)
Value:
(unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), \
(unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
unsigned char
Definition: typeof.h:29
GLdouble s
Definition: gl.h:2039

Definition at line 100 of file rpcndr.h.

◆ NdrFcShort

#define NdrFcShort (   s)    (unsigned char)(s & 0xff), (unsigned char)(s >> 8)

Definition at line 99 of file rpcndr.h.

◆ NDRSContextValue

#define NDRSContextValue (   hContext)    (&(hContext)->userContext)

Definition at line 115 of file rpcndr.h.

◆ RPC_BAD_STUB_DATA_EXCEPTION_FILTER

#define RPC_BAD_STUB_DATA_EXCEPTION_FILTER
Value:
#define STATUS_ACCESS_VIOLATION
#define STATUS_DATATYPE_MISALIGNMENT
Definition: ntstatus.h:263
#define RpcExceptionCode()
Definition: rpc.h:127
#define RPC_S_INVALID_BOUND
Definition: winerror.h:1400
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1447

Definition at line 103 of file rpcndr.h.

◆ RPC_VAR_ENTRY

#define RPC_VAR_ENTRY   WINAPIV

Definition at line 87 of file rpcndr.h.

◆ SIMPLE_TYPE_MARSHAL

#define SIMPLE_TYPE_MARSHAL (   type)
Value:
RPCRTAPI unsigned char* RPC_ENTRY \
Ndr##type##Marshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
RPCRTAPI unsigned char* RPC_ENTRY \
Ndr##type##Unmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc ); \
RPCRTAPI void RPC_ENTRY \
Ndr##type##BufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
RPCRTAPI ULONG RPC_ENTRY \
Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
#define BufferSize
Definition: mmc.h:75
FxMemoryObject * pMemory
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
const unsigned char * PFORMAT_STRING
Definition: rpcndr.h:159
#define RPCRTAPI
Definition: rpc.h:78
static CONST DWORD MemorySize[]
Definition: svga.c:32
uint32_t ULONG
Definition: typedefs.h:59

Definition at line 642 of file rpcndr.h.

◆ small

#define small   char

Definition at line 75 of file rpcndr.h.

◆ TARGET_IS_NT351_OR_WIN95_OR_LATER

#define TARGET_IS_NT351_OR_WIN95_OR_LATER   1

Definition at line 73 of file rpcndr.h.

◆ TARGET_IS_NT40_OR_LATER

#define TARGET_IS_NT40_OR_LATER   1

Definition at line 72 of file rpcndr.h.

◆ TARGET_IS_NT50_OR_LATER

#define TARGET_IS_NT50_OR_LATER   1

Definition at line 71 of file rpcndr.h.

◆ TYPE_MARSHAL

#define TYPE_MARSHAL (   type)
Value:
RPCRTAPI void RPC_ENTRY \
Ndr##type##Free( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
#define SIMPLE_TYPE_MARSHAL(type)
Definition: rpcndr.h:642
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815

Definition at line 652 of file rpcndr.h.

◆ USER_CALL_AUX_MASK

#define USER_CALL_AUX_MASK (   f)    ((f) & 0xff00)

Definition at line 325 of file rpcndr.h.

◆ USER_CALL_CTXT_MASK

#define USER_CALL_CTXT_MASK (   f)    ((f) & 0x00ff)

Definition at line 324 of file rpcndr.h.

◆ USER_CALL_IS_ASYNC

#define USER_CALL_IS_ASYNC   0x0100

Definition at line 328 of file rpcndr.h.

◆ USER_CALL_NEW_CORRELATION_DESC

#define USER_CALL_NEW_CORRELATION_DESC   0x0200

Definition at line 329 of file rpcndr.h.

◆ USER_MARSHAL_CB_SIGNATURE

#define USER_MARSHAL_CB_SIGNATURE
Value:
( ( (DWORD)'U' << 24 ) | ( (DWORD)'S' << 16 ) | \
( (DWORD)'R' << 8 ) | ( (DWORD)'C' ) )
#define DWORD
Definition: nt_native.h:44

Definition at line 301 of file rpcndr.h.

◆ USER_MARSHAL_FC_BYTE

#define USER_MARSHAL_FC_BYTE   1

Definition at line 691 of file rpcndr.h.

◆ USER_MARSHAL_FC_CHAR

#define USER_MARSHAL_FC_CHAR   2

Definition at line 692 of file rpcndr.h.

◆ USER_MARSHAL_FC_DOUBLE

#define USER_MARSHAL_FC_DOUBLE   12

Definition at line 702 of file rpcndr.h.

◆ USER_MARSHAL_FC_FLOAT

#define USER_MARSHAL_FC_FLOAT   10

Definition at line 700 of file rpcndr.h.

◆ USER_MARSHAL_FC_HYPER

#define USER_MARSHAL_FC_HYPER   11

Definition at line 701 of file rpcndr.h.

◆ USER_MARSHAL_FC_LONG

#define USER_MARSHAL_FC_LONG   8

Definition at line 698 of file rpcndr.h.

◆ USER_MARSHAL_FC_SHORT

#define USER_MARSHAL_FC_SHORT   6

Definition at line 696 of file rpcndr.h.

◆ USER_MARSHAL_FC_SMALL

#define USER_MARSHAL_FC_SMALL   3

Definition at line 693 of file rpcndr.h.

◆ USER_MARSHAL_FC_ULONG

#define USER_MARSHAL_FC_ULONG   9

Definition at line 699 of file rpcndr.h.

◆ USER_MARSHAL_FC_USHORT

#define USER_MARSHAL_FC_USHORT   7

Definition at line 697 of file rpcndr.h.

◆ USER_MARSHAL_FC_USMALL

#define USER_MARSHAL_FC_USMALL   4

Definition at line 694 of file rpcndr.h.

◆ USER_MARSHAL_FC_WCHAR

#define USER_MARSHAL_FC_WCHAR   5

Definition at line 695 of file rpcndr.h.

Typedef Documentation

◆ boolean

Definition at line 79 of file rpcndr.h.

◆ byte

typedef unsigned char byte

Definition at line 76 of file rpcndr.h.

◆ CLIENT_CALL_RETURN

◆ COMM_FAULT_OFFSETS

◆ CS_TAG_GETTING_ROUTINE

typedef void(__RPC_USER * CS_TAG_GETTING_ROUTINE) (RPC_BINDING_HANDLE, int, ULONG *, ULONG *, ULONG *, error_status_t *)

Definition at line 354 of file rpcndr.h.

◆ CS_TYPE_FROM_NETCS_ROUTINE

typedef void(__RPC_USER * CS_TYPE_FROM_NETCS_ROUTINE) (RPC_BINDING_HANDLE, ULONG, byte *, ULONG, ULONG, void *, ULONG *, error_status_t *)

Definition at line 353 of file rpcndr.h.

◆ CS_TYPE_LOCAL_SIZE_ROUTINE

typedef void(__RPC_USER * CS_TYPE_LOCAL_SIZE_ROUTINE) (RPC_BINDING_HANDLE, ULONG, ULONG, IDL_CS_CONVERT *, ULONG *, error_status_t *)

Definition at line 352 of file rpcndr.h.

◆ CS_TYPE_NET_SIZE_ROUTINE

typedef void(__RPC_USER * CS_TYPE_NET_SIZE_ROUTINE) (RPC_BINDING_HANDLE, ULONG, ULONG, IDL_CS_CONVERT *, ULONG *, error_status_t *)

Definition at line 350 of file rpcndr.h.

◆ CS_TYPE_TO_NETCS_ROUTINE

typedef void(__RPC_USER * CS_TYPE_TO_NETCS_ROUTINE) (RPC_BINDING_HANDLE, ULONG, void *, ULONG, byte *, ULONG *, error_status_t *)

Definition at line 351 of file rpcndr.h.

◆ error_status_t

Definition at line 82 of file rpcndr.h.

◆ EXPR_EVAL

typedef void(__RPC_USER * EXPR_EVAL) (struct _MIDL_STUB_MESSAGE *)

Definition at line 158 of file rpcndr.h.

◆ FULL_PTR_TO_REFID_ELEMENT

◆ FULL_PTR_XLAT_TABLES

◆ GENERIC_BINDING_INFO

◆ GENERIC_BINDING_ROUTINE

typedef void *(__RPC_API * GENERIC_BINDING_ROUTINE) (void *)

Definition at line 260 of file rpcndr.h.

◆ GENERIC_BINDING_ROUTINE_PAIR

◆ GENERIC_UNBIND_ROUTINE

typedef void(__RPC_API * GENERIC_UNBIND_ROUTINE) (void *, unsigned char *)

Definition at line 261 of file rpcndr.h.

◆ hyper

typedef INT64 hyper

Definition at line 77 of file rpcndr.h.

◆ IDL_CS_CONVERT

◆ MALLOC_FREE_STRUCT

◆ MIDL_FORMAT_STRING

◆ MIDL_INTERFACE_METHOD_PROPERTIES

◆ MIDL_METHOD_PROPERTY

◆ MIDL_METHOD_PROPERTY_MAP

◆ MIDL_SERVER_INFO

◆ MIDL_STUB_DESC

◆ MIDL_STUB_MESSAGE

◆ MIDL_STUBLESS_PROXY_INFO

◆ MIDL_SYNTAX_INFO

◆ MIDL_uhyper

Definition at line 78 of file rpcndr.h.

◆ NDR_CCONTEXT

typedef void* NDR_CCONTEXT

Definition at line 530 of file rpcndr.h.

◆ NDR_CS_ROUTINES

◆ NDR_CS_SIZE_CONVERT_ROUTINES

◆ NDR_EXPR_DESC

◆ NDR_NOTIFY2_ROUTINE

typedef void(__RPC_USER * NDR_NOTIFY2_ROUTINE) (boolean flag)

Definition at line 120 of file rpcndr.h.

◆ NDR_NOTIFY_ROUTINE

typedef void(__RPC_USER * NDR_NOTIFY_ROUTINE) (void)

Definition at line 119 of file rpcndr.h.

◆ NDR_RUNDOWN

typedef void(__RPC_USER * NDR_RUNDOWN) (void *context)

Definition at line 118 of file rpcndr.h.

◆ NDR_SCONTEXT

◆ NDR_USER_MARSHAL_INFO

◆ NDR_USER_MARSHAL_INFO_LEVEL1

◆ PARRAY_INFO

◆ PFORMAT_STRING

Definition at line 159 of file rpcndr.h.

◆ PFULL_PTR_TO_REFID_ELEMENT

◆ PFULL_PTR_XLAT_TABLES

◆ PGENERIC_BINDING_INFO

◆ PGENERIC_BINDING_ROUTINE_PAIR

◆ PMIDL_METHOD_PROPERTY

◆ PMIDL_METHOD_PROPERTY_MAP

◆ PMIDL_SERVER_INFO

◆ PMIDL_STUB_DESC

Definition at line 403 of file rpcndr.h.

◆ PMIDL_STUB_MESSAGE

◆ PMIDL_STUBLESS_PROXY_INFO

◆ PMIDL_SYNTAX_INFO

◆ PNDR_ASYNC_MESSAGE

typedef struct _NDR_ASYNC_MESSAGE* PNDR_ASYNC_MESSAGE

Definition at line 180 of file rpcndr.h.

◆ PNDR_CORRELATION_INFO

typedef struct _NDR_CORRELATION_INFO* PNDR_CORRELATION_INFO

Definition at line 181 of file rpcndr.h.

◆ PNDR_PIPE_DESC

typedef struct _NDR_PIPE_DESC* PNDR_PIPE_DESC

Definition at line 178 of file rpcndr.h.

◆ PNDR_PIPE_MESSAGE

typedef struct _NDR_PIPE_MESSAGE* PNDR_PIPE_MESSAGE

Definition at line 179 of file rpcndr.h.

◆ PSCONTEXT_QUEUE

◆ PXMIT_ROUTINE_QUINTUPLE

◆ RPC_BUFPTR

Definition at line 156 of file rpcndr.h.

◆ RPC_LENGTH

typedef ULONG RPC_LENGTH

Definition at line 157 of file rpcndr.h.

◆ SCONTEXT_QUEUE

◆ SERVER_ROUTINE

typedef LONG(__RPC_API * SERVER_ROUTINE) (void)

Definition at line 444 of file rpcndr.h.

◆ STUB_THUNK

typedef void(__RPC_API * STUB_THUNK) (PMIDL_STUB_MESSAGE)

Definition at line 441 of file rpcndr.h.

◆ USER_MARSHAL_CB

◆ USER_MARSHAL_FREEING_ROUTINE

typedef void(__RPC_USER * USER_MARSHAL_FREEING_ROUTINE) (ULONG *, void *)

Definition at line 290 of file rpcndr.h.

◆ USER_MARSHAL_MARSHALLING_ROUTINE

typedef unsigned char *(__RPC_USER * USER_MARSHAL_MARSHALLING_ROUTINE) (ULONG *, unsigned char *, void *)

Definition at line 288 of file rpcndr.h.

◆ USER_MARSHAL_ROUTINE_QUADRUPLE

◆ USER_MARSHAL_SIZING_ROUTINE

typedef ULONG(__RPC_USER * USER_MARSHAL_SIZING_ROUTINE) (ULONG *, ULONG, void *)

Definition at line 287 of file rpcndr.h.

◆ USER_MARSHAL_UNMARSHALLING_ROUTINE

typedef unsigned char *(__RPC_USER * USER_MARSHAL_UNMARSHALLING_ROUTINE) (ULONG *, unsigned char *, void *)

Definition at line 289 of file rpcndr.h.

◆ XMIT_HELPER_ROUTINE

typedef void(__RPC_USER * XMIT_HELPER_ROUTINE) (PMIDL_STUB_MESSAGE)

Definition at line 277 of file rpcndr.h.

◆ XMIT_ROUTINE_QUINTUPLE

Enumeration Type Documentation

◆ _IDL_CS_CONVERT

Enumerator
IDL_CS_NO_CONVERT 
IDL_CS_IN_PLACE_CONVERT 
IDL_CS_NEW_BUFFER_CONVERT 

Definition at line 343 of file rpcndr.h.

344{
enum _IDL_CS_CONVERT IDL_CS_CONVERT
@ IDL_CS_NO_CONVERT
Definition: rpcndr.h:345
@ IDL_CS_NEW_BUFFER_CONVERT
Definition: rpcndr.h:347
@ IDL_CS_IN_PLACE_CONVERT
Definition: rpcndr.h:346

◆ PROXY_PHASE

Enumerator
PROXY_CALCSIZE 
PROXY_GETBUFFER 
PROXY_MARSHAL 
PROXY_SENDRECEIVE 
PROXY_UNMARSHAL 

Definition at line 490 of file rpcndr.h.

490 {
PROXY_PHASE
Definition: rpcndr.h:490
@ PROXY_CALCSIZE
Definition: rpcndr.h:491
@ PROXY_GETBUFFER
Definition: rpcndr.h:492
@ PROXY_UNMARSHAL
Definition: rpcndr.h:495
@ PROXY_MARSHAL
Definition: rpcndr.h:493
@ PROXY_SENDRECEIVE
Definition: rpcndr.h:494

◆ STUB_PHASE

Enumerator
STUB_UNMARSHAL 
STUB_CALL_SERVER 
STUB_MARSHAL 
STUB_CALL_SERVER_NO_HRESULT 

Definition at line 483 of file rpcndr.h.

483 {
488} STUB_PHASE;
STUB_PHASE
Definition: rpcndr.h:483
@ STUB_MARSHAL
Definition: rpcndr.h:486
@ STUB_CALL_SERVER
Definition: rpcndr.h:485
@ STUB_CALL_SERVER_NO_HRESULT
Definition: rpcndr.h:487
@ STUB_UNMARSHAL
Definition: rpcndr.h:484

◆ USER_MARSHAL_CB_TYPE

Enumerator
USER_MARSHAL_CB_BUFFER_SIZE 
USER_MARSHAL_CB_MARSHALL 
USER_MARSHAL_CB_UNMARSHALL 
USER_MARSHAL_CB_FREE 

Definition at line 305 of file rpcndr.h.

306{
USER_MARSHAL_CB_TYPE
Definition: rpcndr.h:306
@ USER_MARSHAL_CB_BUFFER_SIZE
Definition: rpcndr.h:307
@ USER_MARSHAL_CB_UNMARSHALL
Definition: rpcndr.h:309
@ USER_MARSHAL_CB_FREE
Definition: rpcndr.h:310
@ USER_MARSHAL_CB_MARSHALL
Definition: rpcndr.h:308

◆ XLAT_SIDE

Enumerator
XLAT_SERVER 
XLAT_CLIENT 

Definition at line 498 of file rpcndr.h.

498 {
499 XLAT_SERVER = 1,
501} XLAT_SIDE;
XLAT_SIDE
Definition: rpcndr.h:498
@ XLAT_CLIENT
Definition: rpcndr.h:500
@ XLAT_SERVER
Definition: rpcndr.h:499

Function Documentation

◆ MIDL_user_allocate()

void *__RPC_USER MIDL_user_allocate ( SIZE_T  len)

◆ MIDL_user_free()

void __RPC_USER MIDL_user_free ( void p)

Definition at line 376 of file irotp.c.

377{
379}
#define HeapFree(x, y, z)
Definition: compat.h:735
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by IrotEnumRunning(), IrotRevoke(), and rot_entry_delete().

◆ Ndr64AsyncClientCall()

CLIENT_CALL_RETURN RPC_VAR_ENTRY Ndr64AsyncClientCall ( MIDL_STUBLESS_PROXY_INFO info,
ULONG  proc,
void retval,
  ... 
)

◆ NdrAllocate()

RPCRTAPI void *RPC_ENTRY NdrAllocate ( PMIDL_STUB_MESSAGE  pStubMsg,
SIZE_T  Len 
)

◆ NdrAsyncClientCall()

CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrAsyncClientCall ( PMIDL_STUB_DESC  pStubDescriptor,
PFORMAT_STRING  pFormat,
  ... 
)

◆ NdrAsyncServerCall()

RPCRTAPI void RPC_ENTRY NdrAsyncServerCall ( PRPC_MESSAGE  pRpcMsg)

Definition at line 1917 of file ndr_stubless.c.

1918{
1919 const MIDL_SERVER_INFO *pServerInfo;
1920 const MIDL_STUB_DESC *pStubDesc;
1921 PFORMAT_STRING pFormat;
1922 /* pointer to start of stack to pass into stub implementation */
1923 unsigned char *args;
1924 /* header for procedure string */
1925 const NDR_PROC_HEADER *pProcHeader;
1926 const NDR_PROC_PARTIAL_OIF_HEADER *pOIFHeader = NULL;
1928 PRPC_ASYNC_STATE pAsync;
1930
1931 TRACE("%p\n", pRpcMsg);
1932
1933 pServerInfo = ((RPC_SERVER_INTERFACE *)pRpcMsg->RpcInterfaceInformation)->InterpreterInfo;
1934
1935 pStubDesc = pServerInfo->pStubDesc;
1936 pFormat = pServerInfo->ProcString + pServerInfo->FmtStringOffset[pRpcMsg->ProcNum];
1937 pProcHeader = (const NDR_PROC_HEADER *)&pFormat[0];
1938
1939 TRACE("NDR Version: 0x%lx\n", pStubDesc->Version);
1940
1944
1946 *(PRPC_MESSAGE)(async_call_data->pStubMsg + 1) = *pRpcMsg;
1947
1949 {
1950 const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0];
1951 async_call_data->stack_size = header_rpc->stack_size;
1952 pFormat += sizeof(NDR_PROC_HEADER_RPC);
1953 }
1954 else
1955 {
1957 pFormat += sizeof(NDR_PROC_HEADER);
1958 }
1959
1960 TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags);
1961
1962 /* binding */
1963 switch (pProcHeader->handle_type)
1964 {
1965 /* explicit binding: parse additional section */
1966 case 0:
1967 switch (*pFormat) /* handle_type */
1968 {
1969 case FC_BIND_PRIMITIVE: /* explicit primitive */
1970 pFormat += sizeof(NDR_EHD_PRIMITIVE);
1971 break;
1972 case FC_BIND_GENERIC: /* explicit generic */
1973 pFormat += sizeof(NDR_EHD_GENERIC);
1974 break;
1975 case FC_BIND_CONTEXT: /* explicit context */
1976 pFormat += sizeof(NDR_EHD_CONTEXT);
1977 break;
1978 default:
1979 ERR("bad explicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
1981 }
1982 break;
1983 case FC_BIND_GENERIC: /* implicit generic */
1984 case FC_BIND_PRIMITIVE: /* implicit primitive */
1985 case FC_CALLBACK_HANDLE: /* implicit callback */
1986 case FC_AUTO_HANDLE: /* implicit auto handle */
1987 break;
1988 default:
1989 ERR("bad implicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
1991 }
1992
1994 {
1995 ERR("objects not supported\n");
1998 }
1999
2000 NdrServerInitializeNew(pRpcMsg, async_call_data->pStubMsg, pStubDesc);
2001
2002 /* create the full pointer translation tables, if requested */
2005
2006 /* use alternate memory allocation routines */
2008#if 0
2009 NdrRpcSsEnableAllocate(&stubMsg);
2010#else
2011 FIXME("Set RPCSS memory allocation routines\n");
2012#endif
2013
2014 TRACE("allocating memory for stack of size %x\n", async_call_data->stack_size);
2015
2017 async_call_data->pStubMsg->StackTop = args; /* used by conformance of top-level objects */
2018
2019 pAsync = I_RpcAllocate(sizeof(*pAsync));
2020 if (!pAsync) RpcRaiseException(RPC_X_NO_MEMORY);
2021
2022 status = RpcAsyncInitializeHandle(pAsync, sizeof(*pAsync));
2023 if (status != RPC_S_OK)
2025
2026 pAsync->StubInfo = async_call_data;
2027 TRACE("pAsync %p, pAsync->StubInfo %p, pFormat %p\n", pAsync, pAsync->StubInfo, async_call_data->pHandleFormat);
2028
2029 /* add the implicit pAsync pointer as the first arg to the function */
2030 *(void **)args = pAsync;
2031
2032 if (is_oicf_stubdesc(pStubDesc))
2033 {
2034 INTERPRETER_OPT_FLAGS2 ext_flags = { 0 };
2035
2036 pOIFHeader = (const NDR_PROC_PARTIAL_OIF_HEADER *)pFormat;
2038
2039 pFormat += sizeof(NDR_PROC_PARTIAL_OIF_HEADER);
2040
2041 TRACE("Oif_flags = %s\n", debugstr_INTERPRETER_OPT_FLAGS(pOIFHeader->Oi2Flags) );
2042
2043 if (pOIFHeader->Oi2Flags.HasExtensions)
2044 {
2045 const NDR_PROC_HEADER_EXTS *extensions = (const NDR_PROC_HEADER_EXTS *)pFormat;
2046 ext_flags = extensions->Flags2;
2047 pFormat += extensions->Size;
2048 }
2049
2050 if (pOIFHeader->Oi2Flags.HasPipes)
2051 {
2052 FIXME("pipes not supported yet\n");
2053 RpcRaiseException(RPC_X_WRONG_STUB_VERSION); /* FIXME: remove when implemented */
2054 /* init pipes package */
2055 /* NdrPipesInitialize(...) */
2056 }
2057 if (ext_flags.HasNewCorrDesc)
2058 {
2059 /* initialize extra correlation package */
2061 if (ext_flags.Unused & 0x2) /* has range on conformance */
2063 }
2064 }
2065 else
2066 {
2069 /* reuse the correlation cache, it's not needed for v1 format */
2071 }
2072
2073 /* convert strings, floating point values and endianness into our
2074 * preferred format */
2075 if ((pRpcMsg->DataRepresentation & 0x0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION)
2077
2078 async_call_data->pHandleFormat = pFormat;
2079
2080 /* 1. UNMARSHAL */
2081 TRACE("UNMARSHAL\n");
2083
2084 /* 2. INITOUT */
2085 TRACE("INITOUT\n");
2087
2088 /* 3. CALLSERVER */
2089 TRACE("CALLSERVER\n");
2090 if (pServerInfo->ThunkTable && pServerInfo->ThunkTable[pRpcMsg->ProcNum])
2091 pServerInfo->ThunkTable[pRpcMsg->ProcNum](async_call_data->pStubMsg);
2092 else
2094 pOIFHeader);
2095}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
#define NULL
Definition: types.h:112
void WINAPI NdrCorrelationInitialize(PMIDL_STUB_MESSAGE pStubMsg, void *pMemory, ULONG CacheSize, ULONG Flags)
void WINAPI NdrConvert(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
RPC_STATUS WINAPI RpcAsyncInitializeHandle(PRPC_ASYNC_STATE pAsync, unsigned int Size)
Definition: rpc_async.c:57
unsigned char *WINAPI NdrServerInitializeNew(PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc)
PFULL_PTR_XLAT_TABLES WINAPI NdrFullPointerXlatInit(ULONG NumberOfPointers, XLAT_SIDE XlatSide)
static BOOL is_oicf_stubdesc(const PMIDL_STUB_DESC pStubDesc)
Definition: ndr_stubless.c:50
LONG_PTR __cdecl call_server_func(SERVER_ROUTINE func, unsigned char *args, unsigned int stack_size, const NDR_PROC_PARTIAL_OIF_HEADER *header)
static const char * debugstr_INTERPRETER_OPT_FLAGS(INTERPRETER_OPT_FLAGS Oi2Flags)
Definition: ndr_stubless.c:261
static LONG_PTR * stub_do_args(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat, enum stubless_phase phase, unsigned short number_of_params)
PFORMAT_STRING convert_old_args(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, unsigned int stack_size, BOOL object_proc, void *buffer, unsigned int size, unsigned int *count)
Definition: ndr_stubless.c:596
struct _NDR_PROC_HEADER_RPC NDR_PROC_HEADER_RPC
struct _NDR_EHD_CONTEXT NDR_EHD_CONTEXT
struct _NDR_EHD_PRIMITIVE NDR_EHD_PRIMITIVE
struct _NDR_PROC_HEADER NDR_PROC_HEADER
@ STUBLESS_INITOUT
Definition: ndr_stubless.h:249
@ STUBLESS_UNMARSHAL
Definition: ndr_stubless.h:248
struct _NDR_EHD_GENERIC NDR_EHD_GENERIC
struct _NDR_PROC_PARTIAL_OIF_HEADER NDR_PROC_PARTIAL_OIF_HEADER
#define Oi_RPCSS_ALLOC_USED
Definition: ndrtypes.h:291
#define Oi_FULL_PTR_USED
Definition: ndrtypes.h:290
@ FC_BIND_PRIMITIVE
Definition: ndrtypes.h:194
@ FC_BIND_GENERIC
Definition: ndrtypes.h:193
@ FC_AUTO_HANDLE
Definition: ndrtypes.h:195
@ FC_BIND_CONTEXT
Definition: ndrtypes.h:191
@ FC_CALLBACK_HANDLE
Definition: ndrtypes.h:196
#define Oi_HAS_RPCFLAGS
Definition: ndrtypes.h:293
#define Oi_OBJECT_PROC
Definition: ndrtypes.h:292
#define calloc
Definition: rosglue.h:14
struct _RPC_MESSAGE * PRPC_MESSAGE
#define NDR_LOCAL_DATA_REPRESENTATION
Definition: rpcndr.h:68
struct _MIDL_STUB_MESSAGE * PMIDL_STUB_MESSAGE
RPCRTAPI void RPC_ENTRY NdrRpcSsEnableAllocate(PMIDL_STUB_MESSAGE pMessage)
#define RPC_X_NO_MEMORY
Definition: rpcnterr.h:35
#define RPC_S_OK
Definition: rpcnterr.h:22
void WINAPI I_RpcFree(void *Object)
Definition: rpcrt4_main.c:755
void *WINAPI I_RpcAllocate(unsigned int Size)
Definition: rpcrt4_main.c:747
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:213
long RPC_STATUS
Definition: rpc.h:48
#define args
Definition: format.c:66
#define TRACE(s)
Definition: solgame.cpp:4
unsigned char HasNewCorrDesc
Definition: ndrtypes.h:76
unsigned char Unused
Definition: ndrtypes.h:89
unsigned char HasExtensions
Definition: ndrtypes.h:68
unsigned char HasPipes
Definition: ndrtypes.h:64
INTERPRETER_OPT_FLAGS2 Flags2
Definition: ndrtypes.h:99
unsigned char Size
Definition: ndrtypes.h:97
const unsigned short * FmtStringOffset
Definition: rpcndr.h:454
const STUB_THUNK * ThunkTable
Definition: rpcndr.h:455
const SERVER_ROUTINE * DispatchTable
Definition: rpcndr.h:452
PMIDL_STUB_DESC pStubDesc
Definition: rpcndr.h:451
PFORMAT_STRING ProcString
Definition: rpcndr.h:453
ULONG Version
Definition: rpcndr.h:392
unsigned char * StackTop
Definition: rpcndr.h:209
unsigned char CorrDespIncrement
Definition: rpcndr.h:201
struct _FULL_PTR_XLAT_TABLES * FullPtrXlatTables
Definition: rpcndr.h:214
unsigned short stack_size
Definition: ndr_stubless.h:93
unsigned char Oi_flags
Definition: ndr_stubless.h:64
unsigned char handle_type
Definition: ndr_stubless.h:43
unsigned short stack_size
Definition: ndr_stubless.h:71
INTERPRETER_OPT_FLAGS Oi2Flags
Definition: ndr_stubless.h:107
void * StubInfo
Definition: rpcasync.h:158
unsigned int ProcNum
Definition: rpcdcep.h:42
void * RpcInterfaceInformation
Definition: rpcdcep.h:44
ULONG DataRepresentation
Definition: rpcdcep.h:39
Definition: match.c:390
MIDL_STUB_MESSAGE * pStubMsg
Definition: ndr_stubless.h:231
unsigned short stack_size
Definition: ndr_stubless.h:237
PFORMAT_STRING pHandleFormat
Definition: ndr_stubless.h:233
ULONG_PTR NdrCorrCache[256]
Definition: ndr_stubless.h:243
unsigned int number_of_params
Definition: ndr_stubless.h:239
LONG_PTR * retval_ptr
Definition: ndr_stubless.h:241
const NDR_PROC_HEADER * pProcHeader
Definition: ndr_stubless.h:232
Definition: ps.c:97
#define RPC_X_WRONG_STUB_VERSION
Definition: winerror.h:1493

◆ NdrAsyncStubCall()

RPCRTAPI LONG RPC_ENTRY NdrAsyncStubCall ( struct IRpcStubBuffer pThis,
struct IRpcChannelBuffer pChannel,
PRPC_MESSAGE  pRpcMsg,
DWORD pdwStubPhase 
)

Definition at line 1909 of file ndr_stubless.c.

1912{
1913 FIXME("unimplemented, expect crash!\n");
1914 return 0;
1915}

◆ NdrByteCountPointerBufferSize()

RPCRTAPI void RPC_ENTRY NdrByteCountPointerBufferSize ( PMIDL_STUB_MESSAGE  pStubMsg,
unsigned char pMemory,
PFORMAT_STRING  pFormat 
)

Definition at line 6358 of file ndr_marshall.c.

6361{
6362 FIXME("stub\n");
6363}

◆ NdrByteCountPointerFree()

RPCRTAPI void RPC_ENTRY NdrByteCountPointerFree ( PMIDL_STUB_MESSAGE  pStubMsg,
unsigned char pMemory,
PFORMAT_STRING  pFormat 
)

Definition at line 6378 of file ndr_marshall.c.

6381{
6382 FIXME("stub\n");
6383}

◆ NdrByteCountPointerMarshall()

RPCRTAPI unsigned char *RPC_ENTRY NdrByteCountPointerMarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
unsigned char pMemory,
PFORMAT_STRING  pFormat 
)

Definition at line 6335 of file ndr_marshall.c.

6338{
6339 FIXME("stub\n");
6340 return NULL;
6341}

◆ NdrByteCountPointerUnmarshall()

RPCRTAPI unsigned char *RPC_ENTRY NdrByteCountPointerUnmarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
unsigned char **  ppMemory,
PFORMAT_STRING  pFormat,
unsigned char  fMustAlloc 
)

Definition at line 6346 of file ndr_marshall.c.

6350{
6351 FIXME("stub\n");
6352 return NULL;
6353}

◆ NDRCContextBinding()

RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY NDRCContextBinding ( NDR_CCONTEXT  CContext)

Definition at line 79 of file ndr_contexthandle.c.

80{
81 struct context_handle_entry *che;
83
84 TRACE("%p\n", CContext);
85
88 if (che)
89 handle = che->handle;
91
92 if (!handle)
93 {
94 ERR("invalid handle %p\n", CContext);
96 }
97 return handle;
98}
static CRITICAL_SECTION ndr_context_cs
static struct context_handle_entry * get_context_entry(NDR_CCONTEXT CContext)
#define RPC_X_SS_CONTEXT_MISMATCH
Definition: rpcnterr.h:39
RPC_BINDING_HANDLE handle
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by client_get_handle(), CtxClose(), CtxHello(), m_CtxClose(), m_CtxHello(), and main().

◆ NDRCContextMarshall()

RPCRTAPI void RPC_ENTRY NDRCContextMarshall ( NDR_CCONTEXT  CContext,
void pBuff 
)

Definition at line 100 of file ndr_contexthandle.c.

101{
102 struct context_handle_entry *che;
103
104 TRACE("%p %p\n", CContext, pBuff);
105
106 if (CContext)
107 {
110 memcpy(pBuff, &che->wire_data, sizeof (ndr_context_handle));
112 }
113 else
114 {
118 }
119}
#define GUID_NULL
Definition: ks.h:106
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
ndr_context_handle wire_data
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList

Referenced by main(), and NdrClientContextMarshall().

◆ NDRCContextUnmarshall()

RPCRTAPI void RPC_ENTRY NDRCContextUnmarshall ( NDR_CCONTEXT pCContext,
RPC_BINDING_HANDLE  hBinding,
void pBuff,
ULONG  DataRepresentation 
)

Definition at line 209 of file ndr_contexthandle.c.

212{
214
215 TRACE("*%p=(%p) %p %p %08lx\n",
216 CContext, *CContext, hBinding, pBuff, DataRepresentation);
217
221 if (status)
223}
handle_t hBinding
Definition: ctx_c.c:54
static RPC_STATUS ndr_update_context_handle(NDR_CCONTEXT *CContext, RPC_BINDING_HANDLE hBinding, const ndr_context_handle *chi)

Referenced by m_CtxOpen2(), and NdrClientContextUnmarshall().

◆ NdrClearOutParameters()

RPCRTAPI void RPC_ENTRY NdrClearOutParameters ( PMIDL_STUB_MESSAGE  pStubMsg,
PFORMAT_STRING  pFormat,
void ArgAddr 
)

Definition at line 4660 of file ndr_marshall.c.

4663{
4664 FIXME("(%p,%p,%p): stub\n", pStubMsg, pFormat, ArgAddr);
4665}

Referenced by client_do_args().

◆ NdrClientCall()

CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrClientCall ( PMIDL_STUB_DESC  pStubDescriptor,
PFORMAT_STRING  pFormat,
  ... 
)

◆ NdrClientCall2()

CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrClientCall2 ( PMIDL_STUB_DESC  pStubDescriptor,
PFORMAT_STRING  pFormat,
  ... 
)

◆ NdrClientCall3()

CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrClientCall3 ( MIDL_STUBLESS_PROXY_INFO info,
ULONG  proc,
void retval,
  ... 
)

◆ NdrClientContextMarshall()

RPCRTAPI void RPC_ENTRY NdrClientContextMarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
NDR_CCONTEXT  ContextHandle,
int  fCheck 
)

Definition at line 7060 of file ndr_marshall.c.

7063{
7064 TRACE("(%p, %p, %d)\n", pStubMsg, ContextHandle, fCheck);
7065
7066 align_pointer_clear(&pStubMsg->Buffer, 4);
7067
7068 if (pStubMsg->Buffer + cbNDRContext > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)
7069 {
7070 ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n",
7071 pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength);
7073 }
7074
7075 /* FIXME: what does fCheck do? */
7076 NDRCContextMarshall(ContextHandle,
7077 pStubMsg->Buffer);
7078
7079 pStubMsg->Buffer += cbNDRContext;
7080}
static void align_pointer_clear(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:102
void WINAPI NDRCContextMarshall(NDR_CCONTEXT CContext, void *pBuff)
#define cbNDRContext
Definition: rpcndr.h:116
unsigned char * Buffer
Definition: rpcndr.h:186
ULONG BufferLength
Definition: rpcndr.h:190
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:185
void * Buffer
Definition: rpcdcep.h:40

Referenced by CtxClose(), CtxHello(), m_CtxClose(), m_CtxHello(), m_CtxOpen2(), and NdrContextHandleMarshall().

◆ NdrClientContextUnmarshall()

RPCRTAPI void RPC_ENTRY NdrClientContextUnmarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
NDR_CCONTEXT pContextHandle,
RPC_BINDING_HANDLE  BindHandle 
)

Definition at line 7085 of file ndr_marshall.c.

7088{
7089 TRACE("(%p, %p, %p)\n", pStubMsg, pContextHandle, BindHandle);
7090
7091 align_pointer(&pStubMsg->Buffer, 4);
7092
7093 if (pStubMsg->Buffer + cbNDRContext > pStubMsg->BufferEnd)
7095
7096 NDRCContextUnmarshall(pContextHandle,
7097 BindHandle,
7098 pStubMsg->Buffer,
7099 pStubMsg->RpcMsg->DataRepresentation);
7100
7101 pStubMsg->Buffer += cbNDRContext;
7102}
static void align_pointer(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:96
void WINAPI NDRCContextUnmarshall(NDR_CCONTEXT *CContext, RPC_BINDING_HANDLE hBinding, void *pBuff, ULONG DataRepresentation)
unsigned char * BufferEnd
Definition: rpcndr.h:188

Referenced by CtxClose(), CtxOpen(), m_CtxClose(), m_CtxOpen(), m_CtxOpen2(), and NdrContextHandleUnmarshall().

◆ NdrClientInitialize()

RPCRTAPI void RPC_ENTRY NdrClientInitialize ( PRPC_MESSAGE  pRpcMessage,
PMIDL_STUB_MESSAGE  pStubMsg,
PMIDL_STUB_DESC  pStubDesc,
unsigned int  ProcNum 
)

◆ NdrClientInitializeNew()

RPCRTAPI void RPC_ENTRY NdrClientInitializeNew ( PRPC_MESSAGE  pRpcMessage,
PMIDL_STUB_MESSAGE  pStubMsg,
PMIDL_STUB_DESC  pStubDesc,
unsigned int  ProcNum 
)

Definition at line 47 of file ndr_clientserver.c.

49{
50 TRACE("(pRpcMessage == ^%p, pStubMsg == ^%p, pStubDesc == ^%p, ProcNum == %d)\n",
51 pRpcMessage, pStubMsg, pStubDesc, ProcNum);
52
53 pRpcMessage->Handle = NULL;
54 pRpcMessage->ProcNum = ProcNum | RPC_FLAGS_VALID_BIT;
55 pRpcMessage->RpcInterfaceInformation = pStubDesc->RpcInterfaceInformation;
56 pRpcMessage->RpcFlags = 0;
57 pRpcMessage->ReservedForRuntime = NULL;
59
60 pStubMsg->RpcMsg = pRpcMessage;
61 pStubMsg->BufferStart = NULL;
62 pStubMsg->BufferEnd = NULL;
63 pStubMsg->BufferLength = 0;
64 pStubMsg->IsClient = TRUE;
65 pStubMsg->ReuseBuffer = FALSE;
66 pStubMsg->pAllocAllNodesContext = NULL;
67 pStubMsg->pPointerQueueState = NULL;
68 pStubMsg->IgnoreEmbeddedPointers = 0;
69 pStubMsg->PointerBufferMark = NULL;
70 pStubMsg->CorrDespIncrement = 0;
71 pStubMsg->uFlags = 0;
72 pStubMsg->UniquePtrCount = 0;
73 pStubMsg->pfnAllocate = pStubDesc->pfnAllocate;
74 pStubMsg->pfnFree = pStubDesc->pfnFree;
75 pStubMsg->StackTop = NULL;
76 pStubMsg->StubDesc = pStubDesc;
77 pStubMsg->FullPtrRefId = 0;
78 pStubMsg->PointerLength = 0;
79 pStubMsg->fInDontFree = 0;
80 pStubMsg->fDontCallFreeInst = 0;
81 pStubMsg->fHasReturn = 0;
82 pStubMsg->fHasExtensions = 0;
83 pStubMsg->fHasNewCorrDesc = 0;
84 pStubMsg->fIsIn = 0;
85 pStubMsg->fIsOut = 0;
86 pStubMsg->fIsOicf = 0;
87 pStubMsg->fBufferValid = 0;
88 pStubMsg->fHasMemoryValidateCallback = 0;
89 pStubMsg->fInFree = 0;
90 pStubMsg->fNeedMCCP = 0;
91 pStubMsg->fUnused2 = 0;
92 pStubMsg->dwDestContext = MSHCTX_DIFFERENTMACHINE;
93 pStubMsg->pvDestContext = NULL;
94 pStubMsg->pRpcChannelBuffer = NULL;
95 pStubMsg->pArrayInfo = NULL;
96 pStubMsg->dwStubPhase = 0;
97 /* FIXME: LowStackMark */
98 pStubMsg->pAsyncMsg = NULL;
99 pStubMsg->pCorrInfo = NULL;
100 pStubMsg->pCorrMemory = NULL;
101 pStubMsg->pMemoryList = NULL;
102}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define RPC_FLAGS_VALID_BIT
Definition: rpcdcep.h:52
void * RpcInterfaceInformation
Definition: rpcndr.h:378
unsigned int fIsOicf
Definition: rpcndr.h:225
ULONG PointerLength
Definition: rpcndr.h:216
PNDR_CORRELATION_INFO pCorrInfo
Definition: rpcndr.h:245
unsigned int fIsIn
Definition: rpcndr.h:223
unsigned int fBufferValid
Definition: rpcndr.h:226
unsigned int fDontCallFreeInst
Definition: rpcndr.h:218
struct NDR_POINTER_QUEUE_STATE * pPointerQueueState
Definition: rpcndr.h:198
void * pvDestContext
Definition: rpcndr.h:233
DWORD dwStubPhase
Definition: rpcndr.h:242
unsigned int fNeedMCCP
Definition: rpcndr.h:229
ULONG FullPtrRefId
Definition: rpcndr.h:215
struct IRpcChannelBuffer * pRpcChannelBuffer
Definition: rpcndr.h:236
void * pMemoryList
Definition: rpcndr.h:247
PNDR_ASYNC_MESSAGE pAsyncMsg
Definition: rpcndr.h:244
unsigned int fHasReturn
Definition: rpcndr.h:220
unsigned int fHasExtensions
Definition: rpcndr.h:221
unsigned int fInFree
Definition: rpcndr.h:228
PARRAY_INFO pArrayInfo
Definition: rpcndr.h:237
int IgnoreEmbeddedPointers
Definition: rpcndr.h:199
DWORD dwDestContext
Definition: rpcndr.h:232
unsigned int fHasMemoryValidateCallback
Definition: rpcndr.h:227
unsigned char * pCorrMemory
Definition: rpcndr.h:246
unsigned char uFlags
Definition: rpcndr.h:202
const struct _MIDL_STUB_DESC * StubDesc
Definition: rpcndr.h:213
unsigned char IsClient
Definition: rpcndr.h:193
unsigned char * BufferStart
Definition: rpcndr.h:187
unsigned int fHasNewCorrDesc
Definition: rpcndr.h:222
struct NDR_ALLOC_ALL_NODES_CONTEXT * pAllocAllNodesContext
Definition: rpcndr.h:197
unsigned char * PointerBufferMark
Definition: rpcndr.h:200
unsigned short UniquePtrCount
Definition: rpcndr.h:203
unsigned int fIsOut
Definition: rpcndr.h:224
unsigned int fInDontFree
Definition: rpcndr.h:217
void * ReservedForRuntime
Definition: rpcdcep.h:45
RPC_BINDING_HANDLE Handle
Definition: rpcdcep.h:38
ULONG RpcFlags
Definition: rpcdcep.h:48

Referenced by CtxClose(), CtxHello(), CtxOpen(), determine_pointer_marshalling_style(), do_ndr_async_client_call(), m_CtxClose(), m_CtxHello(), m_CtxOpen(), m_CtxOpen2(), ndr_client_call(), NdrProxyInitialize(), test_client_init(), test_conf_complex_array(), test_conf_complex_struct(), test_conformant_array(), test_conformant_string(), test_iface_ptr(), test_ndr_allocate(), test_ndr_buffer(), test_ndr_simple_type(), test_NdrMapCommAndFaultStatus(), test_nonconformant_string(), test_nontrivial_pointer_types(), test_pointer_marshal(), test_simple_struct_marshal(), and test_struct_align().

◆ NdrContextHandleInitialize()

RPCRTAPI NDR_SCONTEXT RPC_ENTRY NdrContextHandleInitialize ( PMIDL_STUB_MESSAGE  pStubMsg,
PFORMAT_STRING  pFormat 
)

Definition at line 7156 of file ndr_marshall.c.

7158{
7159 RPC_SYNTAX_IDENTIFIER *if_id = NULL;
7161
7162 TRACE("(%p, %p)\n", pStubMsg, pFormat);
7163
7164 if (pFormat[1] & NDR_CONTEXT_HANDLE_SERIALIZE)
7166 if (pFormat[1] & NDR_CONTEXT_HANDLE_NOSERIALIZE)
7168 if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
7169 {
7170 RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
7171 if_id = &sif->InterfaceId;
7172 }
7173
7174 return NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle, NULL,
7175 pStubMsg->RpcMsg->DataRepresentation, if_id,
7176 flags);
7177}
GLbitfield flags
Definition: glext.h:7161
NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding, void *pBuff, ULONG DataRepresentation, void *CtxGuard, ULONG Flags)
#define NDR_CONTEXT_HANDLE_SERIALIZE
Definition: ndrtypes.h:287
#define NDR_CONTEXT_HANDLE_NOSERIALIZE
Definition: ndrtypes.h:286
#define NDR_STRICT_CONTEXT_HANDLE
Definition: ndrtypes.h:285
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS
Definition: rpcdcep.h:56
#define RPC_CONTEXT_HANDLE_DONT_SERIALIZE
Definition: rpcdcep.h:59
#define RPC_CONTEXT_HANDLE_SERIALIZE
Definition: rpcdcep.h:58
RPC_SYNTAX_IDENTIFIER InterfaceId
Definition: rpcdcep.h:104

Referenced by stub_do_args().

◆ NdrContextHandleSize()

RPCRTAPI void RPC_ENTRY NdrContextHandleSize ( PMIDL_STUB_MESSAGE  pStubMsg,
unsigned char pMemory,
PFORMAT_STRING  pFormat 
)

Definition at line 7149 of file ndr_marshall.c.

7152{
7153 FIXME("(%p, %p, %p): stub\n", pStubMsg, pMemory, pFormat);
7154}

◆ NdrConvert()

RPCRTAPI void RPC_ENTRY NdrConvert ( PMIDL_STUB_MESSAGE  pStubMsg,
PFORMAT_STRING  pFormat 
)

Definition at line 4670 of file ndr_marshall.c.

4671{
4672 FIXME("(pStubMsg == ^%p, pFormat == ^%p): stub.\n", pStubMsg, pFormat);
4673 /* FIXME: since this stub doesn't do any converting, the proper behavior
4674 is to raise an exception */
4675}

Referenced by CtxClose(), CtxOpen(), hello_CtxClose(), hello_CtxHello(), hello_CtxOpen(), m_CtxClose(), m_CtxOpen(), m_CtxOpen2(), ndr_client_call(), NdrAsyncServerCall(), NdrpCompleteAsyncClientCall(), and NdrStubCall2().

◆ NdrConvert2()

RPCRTAPI void RPC_ENTRY NdrConvert2 ( PMIDL_STUB_MESSAGE  pStubMsg,
PFORMAT_STRING  pFormat,
LONG  NumberParams 
)

Definition at line 4680 of file ndr_marshall.c.

4681{
4682 FIXME("(pStubMsg == ^%p, pFormat == ^%p, NumberParams == %ld): stub.\n",
4683 pStubMsg, pFormat, NumberParams);
4684 /* FIXME: since this stub doesn't do any converting, the proper behavior
4685 is to raise an exception */
4686}

◆ NdrCorrelationFree()

RPCRTAPI void RPC_ENTRY NdrCorrelationFree ( PMIDL_STUB_MESSAGE  pStubMsg)

Definition at line 7303 of file ndr_marshall.c.

7304{
7305 /* FIXME: free memory */
7306}

Referenced by ndr_client_call_finally(), NdrpCompleteAsyncClientCall(), NdrpCompleteAsyncServerCall(), and NdrStubCall2().

◆ NdrCorrelationInitialize()

RPCRTAPI void RPC_ENTRY NdrCorrelationInitialize ( PMIDL_STUB_MESSAGE  pStubMsg,
void pMemory,
ULONG  CacheSize,
ULONG  flags 
)

Definition at line 7264 of file ndr_marshall.c.

7265{
7266 TRACE("(%p, %p, %ld, 0x%lx)\n", pStubMsg, pMemory, CacheSize, Flags);
7267
7268 if (pStubMsg->CorrDespIncrement == 0)
7269 pStubMsg->CorrDespIncrement = 2; /* size of the normal (non-range) /robust payload */
7270
7271 pStubMsg->fHasNewCorrDesc = TRUE;
7272 pStubMsg->pCorrInfo = pMemory;
7273}
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

Referenced by do_ndr_async_client_call(), ndr_client_call(), NdrAsyncServerCall(), NdrStubCall2(), and test_NdrCorrelationInitialize().

◆ NdrCorrelationPass()

RPCRTAPI void RPC_ENTRY NdrCorrelationPass ( PMIDL_STUB_MESSAGE  pStubMsg)

Definition at line 7286 of file ndr_marshall.c.

7287{
7288 FIXME("(%p): stub\n", pStubMsg);
7289}

◆ NdrDcomAsyncClientCall()

CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrDcomAsyncClientCall ( PMIDL_STUB_DESC  pStubDescriptor,
PFORMAT_STRING  pFormat,
  ... 
)

◆ NdrDcomAsyncStubCall()

RPCRTAPI LONG RPC_ENTRY NdrDcomAsyncStubCall ( struct IRpcStubBuffer pThis,
struct IRpcChannelBuffer pChannel,
PRPC_MESSAGE  pRpcMsg,
DWORD pdwStubPhase 
)

◆ NdrFreeBuffer()

RPCRTAPI void RPC_ENTRY NdrFreeBuffer ( PMIDL_STUB_MESSAGE  pStubMsg)

Definition at line 182 of file ndr_clientserver.c.

183{
184 TRACE("(pStubMsg == ^%p)\n", pStubMsg);
185 if (pStubMsg->fBufferValid)
186 {
187 I_RpcFreeBuffer(pStubMsg->RpcMsg);
188 pStubMsg->fBufferValid = FALSE;
189 }
190}
RPC_STATUS WINAPI I_RpcFreeBuffer(PRPC_MESSAGE pMsg)
Definition: rpc_message.c:1692

Referenced by CtxClose(), CtxHello(), CtxOpen(), m_CtxClose(), m_CtxHello(), m_CtxOpen(), m_CtxOpen2(), ndr_client_call_finally(), NdrpCompleteAsyncClientCall(), and test_ndr_buffer().

◆ NdrFullPointerFree()

RPCRTAPI int RPC_ENTRY NdrFullPointerFree ( PFULL_PTR_XLAT_TABLES  pXlatTables,
void Pointer 
)

Definition at line 240 of file ndr_fullpointer.c.

241{
242 ULONG Hash = 0;
243 unsigned int i;
244 PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
245 ULONG RefId = 0;
246
247 TRACE("(%p, %p)\n", pXlatTables, Pointer);
248
249 if (!Pointer)
250 return 1;
251
252 /* simple hashing algorithm, don't know whether it matches native */
253 for (i = 0; i < sizeof(Pointer); i++)
254 Hash = (Hash * 3) ^ ((unsigned char *)&Pointer)[i];
255
256 XlatTableEntry = pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask];
257 for (; XlatTableEntry; XlatTableEntry = XlatTableEntry->Next)
258 if (Pointer == XlatTableEntry->Pointer)
259 {
260 if (XlatTableEntry->State & 0x20)
261 return 0;
262 XlatTableEntry->State |= 0x20;
263 RefId = XlatTableEntry->RefId;
264 break;
265 }
266
267 if (!XlatTableEntry)
268 return 0;
269
270 if (pXlatTables->RefIdToPointer.NumberOfEntries > RefId)
271 {
272 pXlatTables->RefIdToPointer.StateTable[RefId] |= 0x20;
273 return 1;
274 }
275
276 return 0;
277}
static int Hash(const char *)
Definition: reader.c:2237
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
struct _FULL_PTR_TO_REFID_ELEMENT * Next
Definition: rpcndr.h:504
unsigned char State
Definition: rpcndr.h:507
struct _FULL_PTR_XLAT_TABLES::@3417 RefIdToPointer
struct _FULL_PTR_XLAT_TABLES::@3418 PointerToRefId

Referenced by PointerFree(), and test_fullpointer_xlat().

◆ NdrFullPointerInsertRefId()

RPCRTAPI void RPC_ENTRY NdrFullPointerInsertRefId ( PFULL_PTR_XLAT_TABLES  pXlatTables,
ULONG  RefId,
void pPointer 
)

Definition at line 214 of file ndr_fullpointer.c.

216{
217 ULONG Hash = 0;
218 unsigned int i;
219 PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
220
221 TRACE("(%p, 0x%lx, %p)\n", pXlatTables, RefId, pPointer);
222
223 /* simple hashing algorithm, don't know whether it matches native */
224 for (i = 0; i < sizeof(pPointer); i++)
225 Hash = (Hash * 3) ^ ((unsigned char *)&pPointer)[i];
226
227 XlatTableEntry = malloc(sizeof(*XlatTableEntry));
228 XlatTableEntry->Next = pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask];
229 XlatTableEntry->Pointer = pPointer;
230 XlatTableEntry->RefId = RefId;
231 XlatTableEntry->State = 0;
232 pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask] = XlatTableEntry;
233
234 /* insert pointer into mapping table */
235 expand_pointer_table_if_necessary(pXlatTables, RefId);
236 if (pXlatTables->RefIdToPointer.NumberOfEntries > RefId)
237 pXlatTables->RefIdToPointer.XlatTable[XlatTableEntry->RefId] = pPointer;
238}
#define malloc
Definition: debug_ros.c:4
static void expand_pointer_table_if_necessary(PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId)

Referenced by PointerUnmarshall(), and test_fullpointer_xlat().

◆ NdrFullPointerQueryPointer()

RPCRTAPI int RPC_ENTRY NdrFullPointerQueryPointer ( PFULL_PTR_XLAT_TABLES  pXlatTables,
void pPointer,
unsigned char  QueryType,
ULONG pRefId 
)

Definition at line 135 of file ndr_fullpointer.c.

138{
139 ULONG Hash = 0;
140 unsigned int i;
141 PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
142
143 TRACE("(%p, %p, %d, %p)\n", pXlatTables, pPointer, QueryType, pRefId);
144
145 if (!pPointer)
146 {
147 *pRefId = 0;
148 return 1;
149 }
150
151 /* simple hashing algorithm, don't know whether it matches native */
152 for (i = 0; i < sizeof(pPointer); i++)
153 Hash = (Hash * 3) ^ ((unsigned char *)&pPointer)[i];
154
155 XlatTableEntry = pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask];
156 for (; XlatTableEntry; XlatTableEntry = XlatTableEntry->Next)
157 if (pPointer == XlatTableEntry->Pointer)
158 {
159 *pRefId = XlatTableEntry->RefId;
160 if (XlatTableEntry->State & QueryType)
161 return 1;
162 XlatTableEntry->State |= QueryType;
163 return 0;
164 }
165
166 XlatTableEntry = malloc(sizeof(*XlatTableEntry));
167 XlatTableEntry->Next = pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask];
168 XlatTableEntry->Pointer = pPointer;
169 XlatTableEntry->RefId = *pRefId = pXlatTables->NextRefId++;
170 XlatTableEntry->State = QueryType;
171 pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask] = XlatTableEntry;
172
173 /* insert pointer into mapping table */
174 expand_pointer_table_if_necessary(pXlatTables, XlatTableEntry->RefId);
175 if (pXlatTables->RefIdToPointer.NumberOfEntries > XlatTableEntry->RefId)
176 {
177 pXlatTables->RefIdToPointer.XlatTable[XlatTableEntry->RefId] = pPointer;
178 pXlatTables->RefIdToPointer.StateTable[XlatTableEntry->RefId] = QueryType;
179 }
180
181 return 0;
182}
_Must_inspect_result_ _In_ KTMOBJECT_TYPE QueryType
Definition: nttmapi.h:404

Referenced by PointerBufferSize(), PointerMarshall(), and test_fullpointer_xlat().

◆ NdrFullPointerQueryRefId()

RPCRTAPI int RPC_ENTRY NdrFullPointerQueryRefId ( PFULL_PTR_XLAT_TABLES  pXlatTables,
ULONG  RefId,
unsigned char  QueryType,
void **  ppPointer 
)

Definition at line 184 of file ndr_fullpointer.c.

187{
188 TRACE("(%p, 0x%lx, %d, %p)\n", pXlatTables, RefId, QueryType, ppPointer);
189
190 if (!RefId)
191 return 1;
192
193 expand_pointer_table_if_necessary(pXlatTables, RefId);
194
195 pXlatTables->NextRefId = max(RefId + 1, pXlatTables->NextRefId);
196
197 if (pXlatTables->RefIdToPointer.NumberOfEntries > RefId)
198 {
199 *ppPointer = pXlatTables->RefIdToPointer.XlatTable[RefId];
200 if (QueryType)
201 {
202 if (pXlatTables->RefIdToPointer.StateTable[RefId] & QueryType)
203 return 1;
204 pXlatTables->RefIdToPointer.StateTable[RefId] |= QueryType;
205 return 0;
206 }
207 else
208 return 0;
209 }
210 *ppPointer = NULL;
211 return 0;
212}
#define max(a, b)
Definition: svc.c:63

Referenced by PointerMemorySize(), PointerUnmarshall(), and test_fullpointer_xlat().

◆ NdrFullPointerXlatFree()

RPCRTAPI void RPC_ENTRY NdrFullPointerXlatFree ( PFULL_PTR_XLAT_TABLES  pXlatTables)

Definition at line 59 of file ndr_fullpointer.c.

60{
61 ULONG i;
62
63 TRACE("(%p)\n", pXlatTables);
64
65 /* free the entries in the table */
66 for (i = 0; i < pXlatTables->PointerToRefId.NumberOfBuckets; i++)
67 {
68 PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
69 for (XlatTableEntry = pXlatTables->PointerToRefId.XlatTable[i];
70 XlatTableEntry; )
71 {
72 PFULL_PTR_TO_REFID_ELEMENT Next = XlatTableEntry->Next;
73 free(XlatTableEntry);
74 XlatTableEntry = Next;
75 }
76 }
77
78 free(pXlatTables->RefIdToPointer.XlatTable);
79 free(pXlatTables->RefIdToPointer.StateTable);
80 free(pXlatTables->PointerToRefId.XlatTable);
81
82 free(pXlatTables);
83}
#define free
Definition: debug_ros.c:5
STDMETHOD() Next(THIS_ ULONG celt, IAssociationElement *pElement, ULONG *pceltFetched) PURE

Referenced by ndr_client_call_finally(), NdrMesProcEncodeDecode(), NdrpCompleteAsyncClientCall(), NdrpCompleteAsyncServerCall(), NdrStubCall2(), and test_fullpointer_xlat().

◆ NdrFullPointerXlatInit()

RPCRTAPI PFULL_PTR_XLAT_TABLES RPC_ENTRY NdrFullPointerXlatInit ( ULONG  NumberOfPointers,
XLAT_SIDE  XlatSide 
)

Definition at line 33 of file ndr_fullpointer.c.

35{
36 ULONG NumberOfBuckets;
37 FULL_PTR_XLAT_TABLES *pXlatTables = malloc(sizeof(*pXlatTables));
38
39 TRACE("(%ld, %d)\n", NumberOfPointers, XlatSide);
40
41 if (!NumberOfPointers) NumberOfPointers = 512;
42 NumberOfBuckets = ((NumberOfPointers + 3) & ~3) - 1;
43
44 pXlatTables->RefIdToPointer.XlatTable = calloc(NumberOfPointers, sizeof(void *));
45 pXlatTables->RefIdToPointer.StateTable = calloc(NumberOfPointers, sizeof(unsigned char));
46 pXlatTables->RefIdToPointer.NumberOfEntries = NumberOfPointers;
47
48 TRACE("NumberOfBuckets = %ld\n", NumberOfBuckets);
49 pXlatTables->PointerToRefId.XlatTable = calloc(NumberOfBuckets, sizeof(FULL_PTR_TO_REFID_ELEMENT *));
50 pXlatTables->PointerToRefId.NumberOfBuckets = NumberOfBuckets;
51 pXlatTables->PointerToRefId.HashMask = NumberOfBuckets - 1;
52
53 pXlatTables->NextRefId = 1;
54 pXlatTables->XlatSide = XlatSide;
55
56 return pXlatTables;
57}
XLAT_SIDE XlatSide
Definition: rpcndr.h:525

Referenced by do_ndr_async_client_call(), ndr_client_call(), NdrAsyncServerCall(), NdrMesProcEncodeDecode(), NdrStubCall2(), and test_fullpointer_xlat().

◆ NdrGetBuffer()

RPCRTAPI unsigned char *RPC_ENTRY NdrGetBuffer ( PMIDL_STUB_MESSAGE  stubmsg,
ULONG  buflen,
RPC_BINDING_HANDLE  handle 
)

Definition at line 161 of file ndr_clientserver.c.

162{
164
165 TRACE("(stubmsg == ^%p, buflen == %lu, handle == %p)\n", stubmsg, buflen, handle);
166
167 stubmsg->RpcMsg->Handle = handle;
168 stubmsg->RpcMsg->BufferLength = buflen;
169
170 status = I_RpcGetBuffer(stubmsg->RpcMsg);
171 if (status != RPC_S_OK)
173
174 stubmsg->Buffer = stubmsg->RpcMsg->Buffer;
175 stubmsg->fBufferValid = TRUE;
176 stubmsg->BufferLength = stubmsg->RpcMsg->BufferLength;
177 return stubmsg->Buffer;
178}
RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg)
Definition: rpc_message.c:1634
unsigned int BufferLength
Definition: rpcdcep.h:41

Referenced by CtxClose(), CtxHello(), CtxOpen(), do_ndr_async_client_call(), m_CtxClose(), m_CtxHello(), m_CtxOpen(), m_CtxOpen2(), ndr_client_call(), and test_ndr_buffer().

◆ NdrGetDcomProtocolVersion()

RPCRTAPI RPC_STATUS RPC_ENTRY NdrGetDcomProtocolVersion ( PMIDL_STUB_MESSAGE  pStubMsg,
RPC_VERSION pVersion 
)

◆ NdrGetUserMarshalInfo()

RPCRTAPI RPC_STATUS RPC_ENTRY NdrGetUserMarshalInfo ( ULONG pFlags,
ULONG  InformationLevel,
NDR_USER_MARSHAL_INFO pMarshalInfo 
)

Definition at line 4610 of file ndr_marshall.c.

4611{
4613
4614 TRACE("(%p,%lu,%p)\n", flags, level, umi);
4615
4616 if (level != 1)
4617 return RPC_S_INVALID_ARG;
4618
4619 memset(&umi->Level1, 0, sizeof(umi->Level1));
4620 umi->InformationLevel = level;
4621
4623 return RPC_S_INVALID_ARG;
4624
4625 umi->Level1.pfnAllocate = umcb->pStubMsg->pfnAllocate;
4626 umi->Level1.pfnFree = umcb->pStubMsg->pfnFree;
4627 umi->Level1.pRpcChannelBuffer = umcb->pStubMsg->pRpcChannelBuffer;
4628
4629 switch (umcb->CBType)
4630 {
4633 {
4634 RPC_MESSAGE *msg = umcb->pStubMsg->RpcMsg;
4635 unsigned char *buffer_start = msg->Buffer;
4636 unsigned char *buffer_end =
4637 (unsigned char *)msg->Buffer + msg->BufferLength;
4638
4639 if (umcb->pStubMsg->Buffer < buffer_start ||
4640 umcb->pStubMsg->Buffer > buffer_end)
4641 return RPC_X_INVALID_BUFFER;
4642
4643 umi->Level1.Buffer = umcb->pStubMsg->Buffer;
4644 umi->Level1.BufferSize = buffer_end - umcb->pStubMsg->Buffer;
4645 break;
4646 }
4649 break;
4650 default:
4651 WARN("unrecognised CBType %d\n", umcb->CBType);
4652 }
4653
4654 return RPC_S_OK;
4655}
#define msg(x)
Definition: auth_time.c:54
#define WARN(fmt,...)
Definition: precomp.h:61
GLint level
Definition: gl.h:1546
#define buffer_end
Definition: intsym.h:274
#define buffer_start
Definition: intsym.h:267
if(dx< 0)
Definition: linetemp.h:194
#define USER_MARSHAL_CB_SIGNATURE
Definition: rpcndr.h:301
#define RPC_S_INVALID_ARG
Definition: rpcnterr.h:23
#define RPC_X_INVALID_BUFFER
Definition: rpcnterr.h:40
#define memset(x, y, z)
Definition: compat.h:39
USER_MARSHAL_CB_TYPE CBType
Definition: rpcndr.h:319
ULONG Signature
Definition: rpcndr.h:318
PMIDL_STUB_MESSAGE pStubMsg
Definition: rpcndr.h:316
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by test_NdrGetUserMarshalInfo().

◆ NdrMapCommAndFaultStatus()

RPCRTAPI RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus ( PMIDL_STUB_MESSAGE  pStubMsg,
ULONG pCommStatus,
ULONG pFaultStatus,
RPC_STATUS  Status_ 
)

Definition at line 229 of file ndr_clientserver.c.

233{
234 TRACE("(%p, %p, %p, %ld)\n", pStubMsg, pCommStatus, pFaultStatus, Status);
235
236 switch (Status)
237 {
240 case RPC_S_UNKNOWN_IF:
250 *pCommStatus = Status;
251 *pFaultStatus = 0;
252 break;
253 default:
254 *pCommStatus = 0;
255 *pFaultStatus = Status;
256 }
257
258 return RPC_S_OK;
259}
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
Status
Definition: gdiplustypes.h:25
#define RPC_S_SERVER_TOO_BUSY
Definition: winerror.h:1390
#define RPC_S_CALL_FAILED_DNE
Definition: winerror.h:1394
#define EPT_S_NOT_REGISTERED
Definition: winerror.h:1418
#define RPC_S_UNSUPPORTED_TRANS_SYN
Definition: winerror.h:1397
#define RPC_S_UNSUPPORTED_TYPE
Definition: winerror.h:1398
#define RPC_S_UNKNOWN_IF
Definition: winerror.h:1384
#define RPC_S_PROTOCOL_ERROR
Definition: winerror.h:1395
#define RPC_S_SERVER_UNAVAILABLE
Definition: winerror.h:1389
#define RPC_S_INVALID_BINDING
Definition: winerror.h:1369
#define RPC_S_COMM_FAILURE
Definition: winerror.h:1484
#define RPC_S_PROCNUM_OUT_OF_RANGE
Definition: winerror.h:1410

Referenced by NdrpClientCall2(), and test_NdrMapCommAndFaultStatus().

◆ NdrNsGetBuffer()

RPCRTAPI unsigned char *RPC_ENTRY NdrNsGetBuffer ( PMIDL_STUB_MESSAGE  pStubMsg,
ULONG  BufferLength,
RPC_BINDING_HANDLE  Handle 
)

◆ NdrNsSendReceive()

RPCRTAPI unsigned char *RPC_ENTRY NdrNsSendReceive ( PMIDL_STUB_MESSAGE  pStubMsg,
unsigned char pBufferEnd,
RPC_BINDING_HANDLE pAutoHandle 
)

Referenced by ndr_client_call().

◆ NdrOleAllocate()

RPCRTAPI void *RPC_ENTRY NdrOleAllocate ( SIZE_T  Size)

Definition at line 391 of file ndr_ole.c.

392{
393 return CoTaskMemAlloc(Size);
394}
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539

Referenced by determine_pointer_marshalling_style(), init_stub_desc(), test_conf_complex_array(), test_conf_complex_struct(), test_conformant_array(), test_conformant_string(), test_iface_ptr(), test_ndr_simple_type(), test_nonconformant_string(), test_nontrivial_pointer_types(), test_pointer_marshal(), test_simple_struct_marshal(), and test_struct_align().

◆ NdrOleFree()

◆ NdrRangeUnmarshall()

RPCRTAPI unsigned char *RPC_ENTRY NdrRangeUnmarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
unsigned char **  ppMemory,
PFORMAT_STRING  pFormat,
unsigned char  fMustAlloc 
)

Definition at line 6466 of file ndr_marshall.c.

6471{
6472 const NDR_RANGE *pRange = (const NDR_RANGE *)pFormat;
6473 unsigned char base_type;
6474
6475 TRACE("pStubMsg: %p, ppMemory: %p, type: 0x%02x, fMustAlloc: %s\n", pStubMsg, ppMemory, *pFormat, fMustAlloc ? "true" : "false");
6476
6477 if (pRange->type != FC_RANGE)
6478 {
6479 ERR("invalid format type %x\n", pRange->type);
6481 return NULL;
6482 }
6483 base_type = pRange->flags_type & 0xf;
6484
6485 TRACE("base_type = 0x%02x, low_value = %ld, high_value = %ld\n",
6486 base_type, pRange->low_value, pRange->high_value);
6487
6488#define RANGE_UNMARSHALL(mem_type, wire_type, format_spec) \
6489 do \
6490 { \
6491 align_pointer(&pStubMsg->Buffer, sizeof(wire_type)); \
6492 if (!fMustAlloc && !*ppMemory) \
6493 fMustAlloc = TRUE; \
6494 if (fMustAlloc) \
6495 *ppMemory = NdrAllocate(pStubMsg, sizeof(mem_type)); \
6496 if (pStubMsg->Buffer + sizeof(wire_type) > pStubMsg->BufferEnd) \
6497 { \
6498 ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n", \
6499 pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength); \
6500 RpcRaiseException(RPC_X_BAD_STUB_DATA); \
6501 } \
6502 if ((*(wire_type *)pStubMsg->Buffer < (mem_type)pRange->low_value) || \
6503 (*(wire_type *)pStubMsg->Buffer > (mem_type)pRange->high_value)) \
6504 { \
6505 ERR("value exceeded bounds: " format_spec ", low: " format_spec ", high: " format_spec "\n", \
6506 *(wire_type *)pStubMsg->Buffer, (mem_type)pRange->low_value, \
6507 (mem_type)pRange->high_value); \
6508 RpcRaiseException(RPC_S_INVALID_BOUND); \
6509 return NULL; \
6510 } \
6511 TRACE("*ppMemory: %p\n", *ppMemory); \
6512 **(mem_type **)ppMemory = *(wire_type *)pStubMsg->Buffer; \
6513 pStubMsg->Buffer += sizeof(wire_type); \
6514 } while (0)
6515
6516 switch(base_type)
6517 {
6518 case FC_CHAR:
6519 case FC_SMALL:
6521 TRACE("value: 0x%02x\n", **ppMemory);
6522 break;
6523 case FC_BYTE:
6524 case FC_USMALL:
6525 RANGE_UNMARSHALL(CHAR, CHAR, "%u");
6526 TRACE("value: 0x%02x\n", **ppMemory);
6527 break;
6528 case FC_WCHAR: /* FIXME: valid? */
6529 case FC_USHORT:
6531 TRACE("value: 0x%04x\n", **(USHORT **)ppMemory);
6532 break;
6533 case FC_SHORT:
6535 TRACE("value: 0x%04x\n", **(USHORT **)ppMemory);
6536 break;
6537 case FC_LONG:
6538 case FC_ENUM32:
6539 RANGE_UNMARSHALL(LONG, LONG, "%ld");
6540 TRACE("value: 0x%08lx\n", **(ULONG **)ppMemory);
6541 break;
6542 case FC_ULONG:
6543 RANGE_UNMARSHALL(ULONG, ULONG, "%lu");
6544 TRACE("value: 0x%08lx\n", **(ULONG **)ppMemory);
6545 break;
6546 case FC_ENUM16:
6548 TRACE("value: 0x%08x\n", **(UINT **)ppMemory);
6549 break;
6550 case FC_FLOAT:
6551 case FC_DOUBLE:
6552 case FC_HYPER:
6553 default:
6554 ERR("invalid range base type: 0x%02x\n", base_type);
6556 }
6557
6558 return NULL;
6559}
#define RANGE_UNMARSHALL(mem_type, wire_type, format_spec)
unsigned int UINT
Definition: ndis.h:50
short SHORT
Definition: pedump.c:59
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
@ FC_USMALL
Definition: ndrtypes.h:138
@ FC_SMALL
Definition: ndrtypes.h:137
@ FC_DOUBLE
Definition: ndrtypes.h:146
@ FC_USHORT
Definition: ndrtypes.h:141
@ FC_ENUM16
Definition: ndrtypes.h:147
@ FC_LONG
Definition: ndrtypes.h:142
@ FC_CHAR
Definition: ndrtypes.h:136
@ FC_RANGE
Definition: ndrtypes.h:266
@ FC_HYPER
Definition: ndrtypes.h:145
@ FC_ULONG
Definition: ndrtypes.h:143
@ FC_FLOAT
Definition: ndrtypes.h:144
@ FC_ENUM32
Definition: ndrtypes.h:148
@ FC_BYTE
Definition: ndrtypes.h:135
@ FC_SHORT
Definition: ndrtypes.h:140
@ FC_WCHAR
Definition: ndrtypes.h:139
ULONG low_value
unsigned char type
ULONG high_value
unsigned char flags_type
#define RPC_S_INTERNAL_ERROR
Definition: winerror.h:1431
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175

◆ NdrRpcSmClientAllocate()

RPCRTAPI void *RPC_ENTRY NdrRpcSmClientAllocate ( SIZE_T  Size)

Referenced by NdrRpcSmSetClientToOsf().

◆ NdrRpcSmClientFree()

RPCRTAPI void RPC_ENTRY NdrRpcSmClientFree ( void NodeToFree)

Referenced by NdrRpcSmSetClientToOsf().

◆ NdrRpcSmSetClientToOsf()

RPCRTAPI void RPC_ENTRY NdrRpcSmSetClientToOsf ( PMIDL_STUB_MESSAGE  pMessage)

Definition at line 232 of file ndr_stubless.c.

233{
234#if 0 /* these functions are not defined yet */
235 pMessage->pfnAllocate = NdrRpcSmClientAllocate;
236 pMessage->pfnFree = NdrRpcSmClientFree;
237#endif
238}
RPCRTAPI void RPC_ENTRY NdrRpcSmClientFree(void *NodeToFree)
RPCRTAPI void *RPC_ENTRY NdrRpcSmClientAllocate(SIZE_T Size) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrRpcSmClientFree) __WINE_MALLOC

Referenced by do_ndr_async_client_call(), and ndr_client_call().

◆ NdrRpcSsDefaultAllocate()

RPCRTAPI void *RPC_ENTRY NdrRpcSsDefaultAllocate ( SIZE_T  Size)

◆ NdrRpcSsDefaultFree()

RPCRTAPI void RPC_ENTRY NdrRpcSsDefaultFree ( void NodeToFree)

◆ NdrRpcSsDisableAllocate()

RPCRTAPI void RPC_ENTRY NdrRpcSsDisableAllocate ( PMIDL_STUB_MESSAGE  pMessage)

◆ NdrRpcSsEnableAllocate()

RPCRTAPI void RPC_ENTRY NdrRpcSsEnableAllocate ( PMIDL_STUB_MESSAGE  pMessage)

Referenced by NdrAsyncServerCall(), and NdrStubCall2().

◆ NDRSContextMarshall()

RPCRTAPI void RPC_ENTRY NDRSContextMarshall ( NDR_SCONTEXT  CContext,
void pBuff,
NDR_RUNDOWN  userRunDownIn 
)

Definition at line 228 of file ndr_contexthandle.c.

231{
232 TRACE("(%p %p %p)\n", SContext, pBuff, userRunDownIn);
234 userRunDownIn, NULL, RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
235}
void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding, NDR_SCONTEXT SContext, void *pBuff, NDR_RUNDOWN userRunDownIn, void *CtxGuard, ULONG Flags)
RPC_BINDING_HANDLE WINAPI I_RpcGetCurrentCallHandle(void)
Definition: rpc_server.c:1743

◆ NDRSContextMarshall2()

RPCRTAPI void RPC_ENTRY NDRSContextMarshall2 ( RPC_BINDING_HANDLE  BindingHandle,
NDR_SCONTEXT  CContext,
void pBuff,
NDR_RUNDOWN  userRunDownIn,
void CtxGuard,
ULONG  Flags 
)

Definition at line 253 of file ndr_contexthandle.c.

258{
261 ndr_context_handle *ndr = pBuff;
262
263 TRACE("(%p %p %p %p %p %lu)\n",
264 hBinding, SContext, pBuff, userRunDownIn, CtxGuard, Flags);
265
266 if (!binding->server || !binding->Assoc)
268
269 if (SContext->userContext)
270 {
271 status = RpcServerAssoc_UpdateContextHandle(binding->Assoc, SContext, CtxGuard, userRunDownIn);
272 if (status != RPC_S_OK)
274 ndr->attributes = 0;
275 RpcContextHandle_GetUuid(SContext, &ndr->uuid);
276
279 }
280 else
281 {
282 if (!RpcContextHandle_IsGuardCorrect(SContext, CtxGuard))
284 memset(ndr, 0, sizeof(*ndr));
285
287 /* Note: release the context handle twice in this case to release
288 * one ref being kept around for the data and one ref for the
289 * unmarshall/marshall sequence */
290 if (!RpcServerAssoc_ReleaseContextHandle(binding->Assoc, SContext, TRUE))
291 return; /* this is to cope with the case of the data not being valid
292 * before and so not having a further reference */
294 }
295}
static RPC_BINDING_HANDLE binding
Definition: server.c:166
void RpcContextHandle_GetUuid(NDR_SCONTEXT SContext, UUID *uuid)
Definition: rpc_assoc.c:542
RPC_STATUS RpcServerAssoc_UpdateContextHandle(RpcAssoc *assoc, NDR_SCONTEXT SContext, void *CtxGuard, NDR_RUNDOWN rundown_routine)
Definition: rpc_assoc.c:516
BOOL RpcContextHandle_IsGuardCorrect(NDR_SCONTEXT SContext, void *CtxGuard)
Definition: rpc_assoc.c:482
unsigned int RpcServerAssoc_ReleaseContextHandle(RpcAssoc *assoc, NDR_SCONTEXT SContext, BOOL release_lock)
Definition: rpc_assoc.c:565
void RPCRT4_RemoveThreadContextHandle(NDR_SCONTEXT SContext)
Definition: rpcrt4_main.c:1026

Referenced by NDRSContextMarshall(), NDRSContextMarshallEx(), NdrServerContextMarshall(), and NdrServerContextNewMarshall().

◆ NDRSContextMarshallEx()

RPCRTAPI void RPC_ENTRY NDRSContextMarshallEx ( RPC_BINDING_HANDLE  BindingHandle,
NDR_SCONTEXT  CContext,
void pBuff,
NDR_RUNDOWN  userRunDownIn 
)

Definition at line 240 of file ndr_contexthandle.c.

244{
245 TRACE("(%p %p %p %p)\n", hBinding, SContext, pBuff, userRunDownIn);
246 NDRSContextMarshall2(hBinding, SContext, pBuff, userRunDownIn, NULL,
248}

◆ NDRSContextUnmarshall()

RPCRTAPI NDR_SCONTEXT RPC_ENTRY NDRSContextUnmarshall ( void pBuff,
ULONG  DataRepresentation 
)

Definition at line 300 of file ndr_contexthandle.c.

302{
303 TRACE("(%p %08lx)\n", pBuff, DataRepresentation);
305 DataRepresentation, NULL,
307}

Referenced by hello_CtxOpen().

◆ NDRSContextUnmarshall2()

RPCRTAPI NDR_SCONTEXT RPC_ENTRY NDRSContextUnmarshall2 ( RPC_BINDING_HANDLE  BindingHandle,
void pBuff,
ULONG  DataRepresentation,
void CtxGuard,
ULONG  Flags 
)

Definition at line 324 of file ndr_contexthandle.c.

328{
330 NDR_SCONTEXT SContext;
332 const ndr_context_handle *context_ndr = pBuff;
333
334 TRACE("(%p %p %08lx %p %lu)\n",
335 hBinding, pBuff, DataRepresentation, CtxGuard, Flags);
336
337 if (!binding->server || !binding->Assoc)
339
340 if (!pBuff || (!context_ndr->attributes &&
341 UuidIsNil((UUID *)&context_ndr->uuid, &status)))
343 &SContext);
344 else
345 {
346 if (context_ndr->attributes)
347 {
348 ERR("non-null attributes 0x%lx\n", context_ndr->attributes);
350 }
351 else
353 &context_ndr->uuid,
354 CtxGuard, Flags,
355 &SContext);
356 }
357
358 if (status != RPC_S_OK)
360
362 return SContext;
363}
RPC_STATUS RpcServerAssoc_FindContextHandle(RpcAssoc *assoc, const UUID *uuid, void *CtxGuard, ULONG Flags, NDR_SCONTEXT *SContext)
Definition: rpc_assoc.c:488
RPC_STATUS RpcServerAssoc_AllocateContextHandle(RpcAssoc *assoc, void *CtxGuard, NDR_SCONTEXT *SContext)
Definition: rpc_assoc.c:456
void RPCRT4_PushThreadContextHandle(NDR_SCONTEXT SContext)
Definition: rpcrt4_main.c:1011
int WINAPI UuidIsNil(UUID *Uuid, RPC_STATUS *Status)
Definition: rpcrt4_main.c:293

Referenced by NdrContextHandleInitialize(), NDRSContextUnmarshall(), NDRSContextUnmarshallEx(), NdrServerContextNewUnmarshall(), and NdrServerContextUnmarshall().

◆ NDRSContextUnmarshallEx()

RPCRTAPI NDR_SCONTEXT RPC_ENTRY NDRSContextUnmarshallEx ( RPC_BINDING_HANDLE  BindingHandle,
void pBuff,
ULONG  DataRepresentation 
)

Definition at line 312 of file ndr_contexthandle.c.

315{
316 TRACE("(%p %p %08lx)\n", hBinding, pBuff, DataRepresentation);
317 return NDRSContextUnmarshall2(hBinding, pBuff, DataRepresentation, NULL,
319}

◆ NdrSendReceive()

RPCRTAPI unsigned char *RPC_ENTRY NdrSendReceive ( PMIDL_STUB_MESSAGE  stubmsg,
unsigned char buffer 
)

Definition at line 195 of file ndr_clientserver.c.

196{
198
199 TRACE("(stubmsg == ^%p, buffer == ^%p)\n", stubmsg, buffer);
200
201 /* FIXME: how to handle errors? (raise exception?) */
202 if (!stubmsg) {
203 ERR("NULL stub message. No action taken.\n");
204 return NULL;
205 }
206 if (!stubmsg->RpcMsg) {
207 ERR("RPC Message not present in stub message. No action taken.\n");
208 return NULL;
209 }
210
211 /* avoid sending uninitialised parts of the buffer on the wire */
212 stubmsg->RpcMsg->BufferLength = buffer - (unsigned char *)stubmsg->RpcMsg->Buffer;
213 status = I_RpcSendReceive(stubmsg->RpcMsg);
214 if (status != RPC_S_OK)
216
217 stubmsg->BufferLength = stubmsg->RpcMsg->BufferLength;
218 stubmsg->BufferStart = stubmsg->RpcMsg->Buffer;
219 stubmsg->BufferEnd = stubmsg->BufferStart + stubmsg->BufferLength;
220 stubmsg->Buffer = stubmsg->BufferStart;
221
222 /* FIXME: is this the right return value? */
223 return NULL;
224}
GLuint buffer
Definition: glext.h:5915
RPC_STATUS WINAPI I_RpcSendReceive(PRPC_MESSAGE pMsg)
Definition: rpc_message.c:1914

Referenced by CtxClose(), CtxHello(), CtxOpen(), m_CtxClose(), m_CtxHello(), m_CtxOpen(), m_CtxOpen2(), and ndr_client_call().

◆ NdrServerCall()

RPCRTAPI void RPC_ENTRY NdrServerCall ( PRPC_MESSAGE  pRpcMsg)

Definition at line 1515 of file ndr_stubless.c.

1516{
1517 DWORD phase;
1518 NdrStubCall( NULL, NULL, msg, &phase );
1519}
unsigned long DWORD
Definition: ntddk_ex.h:95
LONG WINAPI NdrStubCall(struct IRpcStubBuffer *This, struct IRpcChannelBuffer *channel, PRPC_MESSAGE msg, DWORD *phase)

◆ NdrServerCall2()

RPCRTAPI void RPC_ENTRY NdrServerCall2 ( PRPC_MESSAGE  pRpcMsg)

Definition at line 1497 of file ndr_stubless.c.

1498{
1499 DWORD dwPhase;
1500 NdrStubCall2(NULL, NULL, pRpcMsg, &dwPhase);
1501}
LONG WINAPI NdrStubCall2(struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg, DWORD *pdwStubPhase)

◆ NdrServerCallAll()

RPCRTAPI void RPC_ENTRY NdrServerCallAll ( PRPC_MESSAGE  pRpcMsg)

Definition at line 1524 of file ndr_stubless.c.

1525{
1526 FIXME("%p stub\n", msg);
1527}

◆ NdrServerContextMarshall()

RPCRTAPI void RPC_ENTRY NdrServerContextMarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
NDR_SCONTEXT  ContextHandle,
NDR_RUNDOWN  RundownRoutine 
)

Definition at line 7104 of file ndr_marshall.c.

7107{
7108 TRACE("(%p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine);
7109
7110 align_pointer(&pStubMsg->Buffer, 4);
7111
7112 if (pStubMsg->Buffer + cbNDRContext > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)
7113 {
7114 ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n",
7115 pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength);
7117 }
7118
7119 NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle,
7120 pStubMsg->Buffer, RundownRoutine, NULL,
7122 pStubMsg->Buffer += cbNDRContext;
7123}

Referenced by hello_CtxClose(), and hello_CtxOpen().

◆ NdrServerContextNewMarshall()

RPCRTAPI void RPC_ENTRY NdrServerContextNewMarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
NDR_SCONTEXT  ContextHandle,
NDR_RUNDOWN  RundownRoutine,
PFORMAT_STRING  pFormat 
)

Definition at line 7179 of file ndr_marshall.c.

7183{
7184 RPC_SYNTAX_IDENTIFIER *if_id = NULL;
7186
7187 TRACE("(%p, %p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine, pFormat);
7188
7189 align_pointer(&pStubMsg->Buffer, 4);
7190
7191 if (pStubMsg->Buffer + cbNDRContext > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)
7192 {
7193 ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n",
7194 pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength);
7196 }
7197
7198 if (pFormat[1] & NDR_CONTEXT_HANDLE_SERIALIZE)
7200 if (pFormat[1] & NDR_CONTEXT_HANDLE_NOSERIALIZE)
7202 if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
7203 {
7204 RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
7205 if_id = &sif->InterfaceId;
7206 }
7207
7208 NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle,
7209 pStubMsg->Buffer, RundownRoutine, if_id, flags);
7210 pStubMsg->Buffer += cbNDRContext;
7211}

Referenced by NdrContextHandleMarshall().

◆ NdrServerContextNewUnmarshall()

RPCRTAPI NDR_SCONTEXT RPC_ENTRY NdrServerContextNewUnmarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
PFORMAT_STRING  pFormat 
)

Definition at line 7213 of file ndr_marshall.c.

7215{
7216 NDR_SCONTEXT ContextHandle;
7217 RPC_SYNTAX_IDENTIFIER *if_id = NULL;
7219
7220 TRACE("(%p, %p)\n", pStubMsg, pFormat);
7221
7222 align_pointer(&pStubMsg->Buffer, 4);
7223
7224 if (pStubMsg->Buffer + cbNDRContext > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)
7225 {
7226 ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n",
7227 pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength);
7229 }
7230
7231 if (pFormat[1] & NDR_CONTEXT_HANDLE_SERIALIZE)
7233 if (pFormat[1] & NDR_CONTEXT_HANDLE_NOSERIALIZE)
7235 if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
7236 {
7237 RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
7238 if_id = &sif->InterfaceId;
7239 }
7240
7241 ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle,
7242 pStubMsg->Buffer,
7243 pStubMsg->RpcMsg->DataRepresentation,
7244 if_id, flags);
7245 pStubMsg->Buffer += cbNDRContext;
7246
7247 return ContextHandle;
7248}

Referenced by NdrContextHandleUnmarshall().

◆ NdrServerContextUnmarshall()

RPCRTAPI NDR_SCONTEXT RPC_ENTRY NdrServerContextUnmarshall ( PMIDL_STUB_MESSAGE  pStubMsg)

Definition at line 7125 of file ndr_marshall.c.

7126{
7127 NDR_SCONTEXT ContextHandle;
7128
7129 TRACE("(%p)\n", pStubMsg);
7130
7131 align_pointer(&pStubMsg->Buffer, 4);
7132
7133 if (pStubMsg->Buffer + cbNDRContext > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)
7134 {
7135 ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n",
7136 pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength);
7138 }
7139
7140 ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle,
7141 pStubMsg->Buffer,
7142 pStubMsg->RpcMsg->DataRepresentation,
7144 pStubMsg->Buffer += cbNDRContext;
7145
7146 return ContextHandle;
7147}

Referenced by hello_CtxClose(), and hello_CtxHello().

◆ NdrServerInitialize()

RPCRTAPI unsigned char *RPC_ENTRY NdrServerInitialize ( PRPC_MESSAGE  pRpcMsg,
PMIDL_STUB_MESSAGE  pStubMsg,
PMIDL_STUB_DESC  pStubDesc 
)

◆ NdrServerInitializeMarshall()

RPCRTAPI void RPC_ENTRY NdrServerInitializeMarshall ( PRPC_MESSAGE  pRpcMsg,
PMIDL_STUB_MESSAGE  pStubMsg 
)

◆ NdrServerInitializeNew()

RPCRTAPI unsigned char *RPC_ENTRY NdrServerInitializeNew ( PRPC_MESSAGE  pRpcMsg,
PMIDL_STUB_MESSAGE  pStubMsg,
PMIDL_STUB_DESC  pStubDesc 
)

Definition at line 107 of file ndr_clientserver.c.

109{
110 TRACE("(pRpcMsg == ^%p, pStubMsg == ^%p, pStubDesc == ^%p)\n", pRpcMsg, pStubMsg, pStubDesc);
111
112 pStubMsg->RpcMsg = pRpcMsg;
113 pStubMsg->Buffer = pStubMsg->BufferStart = pRpcMsg->Buffer;
114 pStubMsg->BufferEnd = pStubMsg->Buffer + pRpcMsg->BufferLength;
115 pStubMsg->BufferLength = pRpcMsg->BufferLength;
116 pStubMsg->IsClient = FALSE;
117 pStubMsg->ReuseBuffer = FALSE;
118 pStubMsg->pAllocAllNodesContext = NULL;
119 pStubMsg->pPointerQueueState = NULL;
120 pStubMsg->IgnoreEmbeddedPointers = 0;
121 pStubMsg->PointerBufferMark = NULL;
122 pStubMsg->CorrDespIncrement = 0;
123 pStubMsg->uFlags = 0;
124 pStubMsg->UniquePtrCount = 0;
125 pStubMsg->pfnAllocate = pStubDesc->pfnAllocate;
126 pStubMsg->pfnFree = pStubDesc->pfnFree;
127 pStubMsg->StackTop = NULL;
128 pStubMsg->StubDesc = pStubDesc;
129 pStubMsg->FullPtrXlatTables = NULL;
130 pStubMsg->FullPtrRefId = 0;
131 pStubMsg->PointerLength = 0;
132 pStubMsg->fInDontFree = 0;
133 pStubMsg->fDontCallFreeInst = 0;
134 pStubMsg->fHasReturn = 0;
135 pStubMsg->fHasExtensions = 0;
136 pStubMsg->fHasNewCorrDesc = 0;
137 pStubMsg->fIsIn = 0;
138 pStubMsg->fIsOut = 0;
139 pStubMsg->fIsOicf = 0;
140 pStubMsg->fHasMemoryValidateCallback = 0;
141 pStubMsg->fInFree = 0;
142 pStubMsg->fNeedMCCP = 0;
143 pStubMsg->fUnused2 = 0;
144 pStubMsg->dwDestContext = MSHCTX_DIFFERENTMACHINE;
145 pStubMsg->pvDestContext = NULL;
146 pStubMsg->pRpcChannelBuffer = NULL;
147 pStubMsg->pArrayInfo = NULL;
148 pStubMsg->dwStubPhase = 0;
149 /* FIXME: LowStackMark */
150 pStubMsg->pAsyncMsg = NULL;
151 pStubMsg->pCorrInfo = NULL;
152 pStubMsg->pCorrMemory = NULL;
153 pStubMsg->pMemoryList = NULL;
154
155 return NULL;
156}

Referenced by hello_CtxClose(), hello_CtxHello(), hello_CtxOpen(), NdrAsyncServerCall(), NdrStubCall2(), NdrStubInitialize(), and test_server_init().

◆ NdrServerInitializeUnmarshall()

RPCRTAPI unsigned char *RPC_ENTRY NdrServerInitializeUnmarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
PMIDL_STUB_DESC  pStubDesc,
PRPC_MESSAGE  pRpcMsg 
)

◆ NdrServerMarshall()

RPCRTAPI void RPC_ENTRY NdrServerMarshall ( struct IRpcStubBuffer pThis,
struct IRpcChannelBuffer pChannel,
PMIDL_STUB_MESSAGE  pStubMsg,
PFORMAT_STRING  pFormat 
)

◆ NdrServerUnmarshall()

RPCRTAPI void RPC_ENTRY NdrServerUnmarshall ( struct IRpcChannelBuffer pChannel,
PRPC_MESSAGE  pRpcMsg,
PMIDL_STUB_MESSAGE  pStubMsg,
PMIDL_STUB_DESC  pStubDesc,
PFORMAT_STRING  pFormat,
void pParamList 
)

◆ NdrSimpleTypeMarshall()

RPCRTAPI void RPC_ENTRY NdrSimpleTypeMarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
unsigned char pMemory,
unsigned char  FormatChar 
)

Definition at line 1651 of file ndr_marshall.c.

1653{
1654 NdrBaseTypeMarshall(pStubMsg, pMemory, &FormatChar);
1655}
static unsigned char *WINAPI NdrBaseTypeMarshall(PMIDL_STUB_MESSAGE, unsigned char *, PFORMAT_STRING)

Referenced by test_ndr_simple_type().

◆ NdrSimpleTypeUnmarshall()

RPCRTAPI void RPC_ENTRY NdrSimpleTypeUnmarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
unsigned char pMemory,
unsigned char  FormatChar 
)

Definition at line 1666 of file ndr_marshall.c.

1668{
1669#define BASE_TYPE_UNMARSHALL(type) \
1670 align_pointer(&pStubMsg->Buffer, sizeof(type)); \
1671 TRACE("pMemory: %p\n", pMemory); \
1672 *(type *)pMemory = *(type *)pStubMsg->Buffer; \
1673 pStubMsg->Buffer += sizeof(type);
1674
1675 switch(FormatChar)
1676 {
1677 case FC_BYTE:
1678 case FC_CHAR:
1679 case FC_SMALL:
1680 case FC_USMALL:
1682 TRACE("value: 0x%02x\n", *pMemory);
1683 break;
1684 case FC_WCHAR:
1685 case FC_SHORT:
1686 case FC_USHORT:
1688 TRACE("value: 0x%04x\n", *(USHORT *)pMemory);
1689 break;
1690 case FC_LONG:
1691 case FC_ULONG:
1692 case FC_ERROR_STATUS_T:
1693 case FC_ENUM32:
1695 TRACE("value: 0x%08lx\n", *(ULONG *)pMemory);
1696 break;
1697 case FC_FLOAT:
1698 BASE_TYPE_UNMARSHALL(float);
1699 TRACE("value: %f\n", *(float *)pMemory);
1700 break;
1701 case FC_DOUBLE:
1702 BASE_TYPE_UNMARSHALL(double);
1703 TRACE("value: %f\n", *(double *)pMemory);
1704 break;
1705 case FC_HYPER:
1707 TRACE("value: %s\n", wine_dbgstr_longlong(*(ULONGLONG *)pMemory));
1708 break;
1709 case FC_ENUM16:
1710 align_pointer(&pStubMsg->Buffer, sizeof(USHORT));
1711 TRACE("pMemory: %p\n", pMemory);
1712 /* 16-bits on the wire, but int in memory */
1713 *(UINT *)pMemory = *(USHORT *)pStubMsg->Buffer;
1714 pStubMsg->Buffer += sizeof(USHORT);
1715 TRACE("value: 0x%08x\n", *(UINT *)pMemory);
1716 break;
1717 case FC_INT3264:
1718 align_pointer(&pStubMsg->Buffer, sizeof(INT));
1719 /* 32-bits on the wire, but int_ptr in memory */
1720 *(INT_PTR *)pMemory = *(INT *)pStubMsg->Buffer;
1721 pStubMsg->Buffer += sizeof(INT);
1722 TRACE("value: 0x%08Ix\n", *(INT_PTR *)pMemory);
1723 break;
1724 case FC_UINT3264:
1725 align_pointer(&pStubMsg->Buffer, sizeof(UINT));
1726 /* 32-bits on the wire, but int_ptr in memory */
1727 *(UINT_PTR *)pMemory = *(UINT *)pStubMsg->Buffer;
1728 pStubMsg->Buffer += sizeof(UINT);
1729 TRACE("value: 0x%08Ix\n", *(UINT_PTR *)pMemory);
1730 break;
1731 case FC_IGNORE:
1732 break;
1733 default:
1734 FIXME("Unhandled base type: 0x%02x\n", FormatChar);
1735 }
1736#undef BASE_TYPE_UNMARSHALL
1737}
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
#define BASE_TYPE_UNMARSHALL(type)
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
#define INT
Definition: polytest.cpp:20
@ FC_INT3264
Definition: ndrtypes.h:268
@ FC_IGNORE
Definition: ndrtypes.h:149
@ FC_ERROR_STATUS_T
Definition: ndrtypes.h:150
@ FC_UINT3264
Definition: ndrtypes.h:269
int32_t INT_PTR
Definition: typedefs.h:64
int32_t INT
Definition: typedefs.h:58
uint64_t ULONGLONG
Definition: typedefs.h:67

Referenced by test_ndr_simple_type().

◆ NdrStubCall()

RPCRTAPI LONG RPC_ENTRY NdrStubCall ( struct IRpcStubBuffer pThis,
struct IRpcChannelBuffer pChannel,
PRPC_MESSAGE  pRpcMsg,
DWORD pdwStubPhase 
)

Definition at line 1506 of file ndr_stubless.c.

1508{
1509 return NdrStubCall2( This, channel, msg, phase );
1510}

Referenced by NdrServerCall().

◆ NdrStubCall2()

RPCRTAPI LONG RPC_ENTRY NdrStubCall2 ( struct IRpcStubBuffer pThis,
struct IRpcChannelBuffer pChannel,
PRPC_MESSAGE  pRpcMsg,
DWORD pdwStubPhase 
)

Definition at line 1232 of file ndr_stubless.c.

1237{
1238 const MIDL_SERVER_INFO *pServerInfo;
1239 const MIDL_STUB_DESC *pStubDesc;
1240 PFORMAT_STRING pFormat;
1241 MIDL_STUB_MESSAGE stubMsg;
1242 /* pointer to start of stack to pass into stub implementation */
1243 unsigned char * args;
1244 /* size of stack */
1245 unsigned short stack_size;
1246 /* number of parameters. optional for client to give it to us */
1247 unsigned int number_of_params;
1248 /* cache of Oif_flags from v2 procedure header */
1249 INTERPRETER_OPT_FLAGS Oif_flags = { 0 };
1250 /* cache of extension flags from NDR_PROC_HEADER_EXTS */
1251 INTERPRETER_OPT_FLAGS2 ext_flags = { 0 };
1252 /* the type of pass we are currently doing */
1253 enum stubless_phase phase;
1254 /* header for procedure string */
1255 const NDR_PROC_HEADER *pProcHeader;
1256 const NDR_PROC_PARTIAL_OIF_HEADER *pOIFHeader = NULL;
1257 /* location to put retval into */
1258 LONG_PTR *retval_ptr = NULL;
1259 /* correlation cache */
1260 ULONG_PTR NdrCorrCache[256];
1261 unsigned short BindingHandleOffset = (USHORT)-1;
1262
1263 TRACE("pThis %p, pChannel %p, pRpcMsg %p, pdwStubPhase %p\n", pThis, pChannel, pRpcMsg, pdwStubPhase);
1264
1265 if (pThis)
1266 pServerInfo = CStdStubBuffer_GetServerInfo(pThis);
1267 else
1268 pServerInfo = ((RPC_SERVER_INTERFACE *)pRpcMsg->RpcInterfaceInformation)->InterpreterInfo;
1269
1270 pStubDesc = pServerInfo->pStubDesc;
1271 pFormat = pServerInfo->ProcString + pServerInfo->FmtStringOffset[pRpcMsg->ProcNum];
1272 pProcHeader = (const NDR_PROC_HEADER *)&pFormat[0];
1273
1274 if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
1275 NdrStubInitialize(pRpcMsg, &stubMsg, pStubDesc, pChannel);
1276 else
1277 NdrServerInitializeNew(pRpcMsg, &stubMsg, pStubDesc);
1278
1279 /* create the full pointer translation tables, if requested */
1280 if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
1282
1283 if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
1284 {
1285 const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)pFormat;
1286 pRpcMsg->RpcFlags = header_rpc->rpc_flags;
1287 stack_size = header_rpc->stack_size;
1288 pFormat += sizeof(NDR_PROC_HEADER_RPC);
1289 }
1290 else
1291 {
1292 stack_size = pProcHeader->stack_size;
1293 pFormat += sizeof(NDR_PROC_HEADER);
1294 }
1295
1296 /* use alternate memory allocation routines */
1297 if (pProcHeader->Oi_flags & Oi_RPCSS_ALLOC_USED)
1298#if 0
1299 NdrRpcSsEnableAllocate(&stubMsg);
1300#else
1301 FIXME("Set RPCSS memory allocation routines\n");
1302#endif
1303
1304 TRACE("version 0x%lx, Oi_flags %02x, stack size %x, format %p\n",
1305 pStubDesc->Version, pProcHeader->Oi_flags, stack_size, pFormat);
1306
1307 args = calloc(1, stack_size);
1308 stubMsg.StackTop = args; /* used by conformance of top-level objects */
1309
1310 /* binding */
1311 switch (pProcHeader->handle_type)
1312 {
1313 /* explicit binding: parse additional section */
1314 case 0:
1315 switch (*pFormat) /* handle_type */
1316 {
1317 case FC_BIND_PRIMITIVE: /* explicit primitive */
1318 {
1319 BindingHandleOffset = ((NDR_EHD_PRIMITIVE*)pFormat)->offset;
1320 const NDR_EHD_PRIMITIVE *pDesc = (const NDR_EHD_PRIMITIVE *)pFormat;
1321 if (pDesc->flag)
1322 **(handle_t **)ARG_FROM_OFFSET(stubMsg.StackTop, pDesc->offset) = pRpcMsg->Handle;
1323 else
1324 *(handle_t *)ARG_FROM_OFFSET(stubMsg.StackTop, pDesc->offset) = pRpcMsg->Handle;
1325 pFormat += sizeof(NDR_EHD_PRIMITIVE);
1326 break;
1327 }
1328 case FC_BIND_GENERIC: /* explicit generic */
1329 BindingHandleOffset = ((NDR_EHD_GENERIC*)pFormat)->offset;
1330 pFormat += sizeof(NDR_EHD_GENERIC);
1331 break;
1332 case FC_BIND_CONTEXT: /* explicit context */
1333 BindingHandleOffset = ((NDR_EHD_CONTEXT*)pFormat)->offset;
1334 pFormat += sizeof(NDR_EHD_CONTEXT);
1335 break;
1336 default:
1337 ERR("bad explicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
1339 }
1340 break;
1341 case FC_BIND_GENERIC: /* implicit generic */
1342 case FC_BIND_PRIMITIVE: /* implicit primitive */
1343 case FC_CALLBACK_HANDLE: /* implicit callback */
1344 case FC_AUTO_HANDLE: /* implicit auto handle */
1345 break;
1346 default:
1347 ERR("bad implicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
1349 }
1350
1351 /* add the implicit This pointer as the first arg to the function if we
1352 * are calling an object method */
1353 if (pThis)
1354 *(void **)args = ((CStdStubBuffer *)pThis)->pvServerObject;
1355
1356 /* add the binding handle to the stack if we are using explicit binding handles */
1357 if (BindingHandleOffset != (USHORT)-1)
1358 *(RPC_BINDING_HANDLE*)&(args[BindingHandleOffset]) = pRpcMsg->Handle;
1359
1360 if (is_oicf_stubdesc(pStubDesc))
1361 {
1362 pOIFHeader = (const NDR_PROC_PARTIAL_OIF_HEADER *)pFormat;
1363 Oif_flags = pOIFHeader->Oi2Flags;
1364 number_of_params = pOIFHeader->number_of_params;
1365
1366 pFormat += sizeof(NDR_PROC_PARTIAL_OIF_HEADER);
1367
1368 TRACE("Oif_flags = %s\n", debugstr_INTERPRETER_OPT_FLAGS(Oif_flags) );
1369
1370 if (Oif_flags.HasExtensions)
1371 {
1372 const NDR_PROC_HEADER_EXTS *extensions = (const NDR_PROC_HEADER_EXTS *)pFormat;
1373 ext_flags = extensions->Flags2;
1374 pFormat += extensions->Size;
1375 }
1376
1377 if (Oif_flags.HasPipes)
1378 {
1379 FIXME("pipes not supported yet\n");
1380 RpcRaiseException(RPC_X_WRONG_STUB_VERSION); /* FIXME: remove when implemented */
1381 /* init pipes package */
1382 /* NdrPipesInitialize(...) */
1383 }
1384 if (ext_flags.HasNewCorrDesc)
1385 {
1386 /* initialize extra correlation package */
1387 NdrCorrelationInitialize(&stubMsg, NdrCorrCache, sizeof(NdrCorrCache), 0);
1388 if (ext_flags.Unused & 0x2) /* has range on conformance */
1389 stubMsg.CorrDespIncrement = 12;
1390 }
1391 }
1392 else
1393 {
1394 pFormat = convert_old_args( &stubMsg, pFormat, stack_size,
1395 pProcHeader->Oi_flags & Oi_OBJECT_PROC,
1396 /* reuse the correlation cache, it's not needed for v1 format */
1397 NdrCorrCache, sizeof(NdrCorrCache), &number_of_params );
1398 }
1399
1400 /* convert strings, floating point values and endianness into our
1401 * preferred format */
1402 if ((pRpcMsg->DataRepresentation & 0x0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION)
1403 NdrConvert(&stubMsg, pFormat);
1404
1405 for (phase = STUBLESS_UNMARSHAL; phase <= STUBLESS_FREE; phase++)
1406 {
1407 TRACE("phase = %d\n", phase);
1408 switch (phase)
1409 {
1411 /* call the server function */
1412 if (pServerInfo->ThunkTable && pServerInfo->ThunkTable[pRpcMsg->ProcNum])
1413 pServerInfo->ThunkTable[pRpcMsg->ProcNum](&stubMsg);
1414 else
1415 {
1418
1419 if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
1420 {
1421 SERVER_ROUTINE *vtbl = *(SERVER_ROUTINE **)((CStdStubBuffer *)pThis)->pvServerObject;
1422 func = vtbl[pRpcMsg->ProcNum];
1423 }
1424 else
1425 func = pServerInfo->DispatchTable[pRpcMsg->ProcNum];
1426
1427 retval = call_server_func(func, args, stack_size, pOIFHeader);
1428
1429 if (retval_ptr)
1430 {
1431 TRACE("stub implementation returned 0x%Ix\n", retval);
1432 *retval_ptr = retval;
1433 }
1434 else
1435 TRACE("void stub implementation\n");
1436 }
1437
1438 stubMsg.Buffer = NULL;
1439 stubMsg.BufferLength = 0;
1440
1441 break;
1442 case STUBLESS_GETBUFFER:
1443 if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
1444 NdrStubGetBuffer(pThis, pChannel, &stubMsg);
1445 else
1446 {
1448
1449 pRpcMsg->BufferLength = stubMsg.BufferLength;
1450 /* allocate buffer for [out] and [ret] params */
1451 Status = I_RpcGetBuffer(pRpcMsg);
1452 if (Status)
1454 stubMsg.Buffer = pRpcMsg->Buffer;
1455 }
1456 break;
1457 case STUBLESS_UNMARSHAL:
1458 case STUBLESS_INITOUT:
1459 case STUBLESS_CALCSIZE:
1460 case STUBLESS_MARSHAL:
1461 case STUBLESS_MUSTFREE:
1462 case STUBLESS_FREE:
1463 retval_ptr = stub_do_args(&stubMsg, pFormat, phase, number_of_params);
1464 break;
1465 default:
1466 ERR("shouldn't reach here. phase %d\n", phase);
1467 break;
1468 }
1469 }
1470
1471 pRpcMsg->BufferLength = (unsigned int)(stubMsg.Buffer - (unsigned char *)pRpcMsg->Buffer);
1472
1473 if (ext_flags.HasNewCorrDesc)
1474 {
1475 /* free extra correlation package */
1476 NdrCorrelationFree(&stubMsg);
1477 }
1478
1479 if (Oif_flags.HasPipes)
1480 {
1481 /* NdrPipesDone(...) */
1482 }
1483
1484 /* free the full pointer translation tables */
1485 if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
1487
1488 /* free server function stack */
1489 free(args);
1490
1491 return S_OK;
1492}
const MIDL_SERVER_INFO * CStdStubBuffer_GetServerInfo(IRpcStubBuffer *iface)
Definition: cstub.c:411
void WINAPI NdrStubGetBuffer(LPRPCSTUBBUFFER iface, LPRPCCHANNELBUFFER pRpcChannelBuffer, PMIDL_STUB_MESSAGE pStubMsg)
Definition: cstub.c:451
void WINAPI NdrStubInitialize(PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDescriptor, LPRPCCHANNELBUFFER pRpcChannelBuffer)
Definition: cstub.c:435
void WINAPI NdrCorrelationFree(PMIDL_STUB_MESSAGE pStubMsg)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLenum func
Definition: glext.h:6028
#define S_OK
Definition: intsafe.h:52
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
void WINAPI NdrFullPointerXlatFree(PFULL_PTR_XLAT_TABLES pXlatTables)
#define ARG_FROM_OFFSET(args, offset)
Definition: ndr_stubless.c:277
stubless_phase
Definition: ndr_stubless.h:247
@ STUBLESS_GETBUFFER
Definition: ndr_stubless.h:252
@ STUBLESS_MARSHAL
Definition: ndr_stubless.h:253
@ STUBLESS_CALCSIZE
Definition: ndr_stubless.h:251
@ STUBLESS_CALLSERVER
Definition: ndr_stubless.h:250
@ STUBLESS_MUSTFREE
Definition: ndr_stubless.h:254
@ STUBLESS_FREE
Definition: ndr_stubless.h:255
LONG(__RPC_API * SERVER_ROUTINE)(void)
Definition: rpcndr.h:444
unsigned short offset
Definition: ndr_stubless.h:170
unsigned char flag
Definition: ndr_stubless.h:167
unsigned int rpc_flags
Definition: ndr_stubless.h:91
uint32_t ULONG_PTR
Definition: typedefs.h:65
int retval
Definition: wcstombs.cpp:91

Referenced by CreateStubFromTypeInfo(), CStdStubBuffer_Invoke(), NdrServerCall2(), and NdrStubCall().

◆ NdrUserMarshalSimpleTypeConvert()

RPCRTAPI unsigned char *RPC_ENTRY NdrUserMarshalSimpleTypeConvert ( ULONG pFlags,
unsigned char pBuffer,
unsigned char  FormatChar 
)

◆ RpcSmDestroyClientContext()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcSmDestroyClientContext ( void **  ContextHandle)

Definition at line 124 of file ndr_contexthandle.c.

125{
127 struct context_handle_entry *che = NULL;
128
129 TRACE("(%p)\n", ContextHandle);
130
132 che = get_context_entry(*ContextHandle);
133 *ContextHandle = NULL;
134 if (che)
135 {
137 list_remove(&che->entry);
138 }
139
141
142 if (che)
143 {
144 RpcBindingFree(&che->handle);
145 free(che);
146 }
147
148 return status;
149}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:769
struct list entry

Referenced by RpcSsDestroyClientContext().

◆ RpcSsDestroyClientContext()

RPCRTAPI void RPC_ENTRY RpcSsDestroyClientContext ( void **  ContextHandle)

Definition at line 154 of file ndr_contexthandle.c.

155{
157 if (status != RPC_S_OK)
159}
RPC_STATUS WINAPI RpcSmDestroyClientContext(void **ContextHandle)