ReactOS 0.4.15-dev-7788-g1ad9096
rpcndr.h File Reference
#include <basetsd.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  _MIDL_STUB_DESC
 
struct  _MIDL_FORMAT_STRING
 
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   0x000f
 
#define __NDR_INT_REP_MASK   0x00f0
 
#define __NDR_FLOAT_REP_MASK   0xff00
 
#define __NDR_IEEE_FLOAT   0x0000
 
#define __NDR_VAX_FLOAT   0x0100
 
#define __NDR_IBM_FLOAT   0x0300
 
#define __NDR_ASCII_CHAR   0x0000
 
#define __NDR_EBCDIC_CHAR   0x0001
 
#define __NDR_LITTLE_ENDIAN   0x0010
 
#define __NDR_BIG_ENDIAN   0x0000
 
#define __NDR_LOCAL_DATA_REPRESENTATION    (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_LITTLE_ENDIAN)
 
#define __NDR_LOCAL_ENDIAN    (__NDR_LOCAL_DATA_REPRESENTATION & __NDR_INT_REP_MASK)
 
#define NDR_CHAR_REP_MASK   ((ULONG) __NDR_CHAR_REP_MASK)
 
#define NDR_INT_REP_MASK   ((ULONG) __NDR_INT_REP_MASK)
 
#define NDR_FLOAT_REP_MASK   ((ULONG) __NDR_FLOAT_REP_MASK)
 
#define NDR_IEEE_FLOAT   ((ULONG) __NDR_IEEE_FLOAT)
 
#define NDR_VAX_FLOAT   ((ULONG) __NDR_VAX_FLOAT)
 
#define NDR_IBM_FLOAT   ((ULONG) __NDR_IBM_FLOAT)
 
#define NDR_ASCII_CHAR   ((ULONG) __NDR_ASCII_CHAR)
 
#define NDR_EBCDIC_CHAR   ((ULONG) __NDR_EBCDIC_CHAR)
 
#define NDR_LITTLE_ENDIAN   ((ULONG) __NDR_LITTLE_ENDIAN)
 
#define NDR_BIG_ENDIAN   ((ULONG) __NDR_BIG_ENDIAN)
 
#define NDR_LOCAL_DATA_REPRESENTATION   ((ULONG) __NDR_LOCAL_DATA_REPRESENTATION)
 
#define NDR_LOCAL_ENDIAN   ((ULONG) __NDR_LOCAL_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 __RPC_CALLEE   WINAPI
 
#define RPC_VAR_ENTRY   __cdecl
 
#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_UUID(x)
 
#define MIDL_INTERFACE(x)   struct
 
#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 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 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_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) ()
 
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 ULONG error_status_t
 
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  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_allocate (SIZE_T)
 
void __RPC_USER MIDL_user_free (void *)
 
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 NdrClientCall2 (PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat,...)
 
CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrClientCall (PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat,...)
 
CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrAsyncClientCall (PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat,...)
 
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)
 
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 NdrOleAllocate (SIZE_T Size) __WINE_ALLOC_SIZE(1)
 
RPCRTAPI void RPC_ENTRY NdrOleFree (void *NodeToFree)
 
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)
 
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 NdrRpcSmClientAllocate (SIZE_T Size) __WINE_ALLOC_SIZE(1)
 
RPCRTAPI void RPC_ENTRY NdrRpcSmClientFree (void *NodeToFree)
 
RPCRTAPI void *RPC_ENTRY NdrRpcSsDefaultAllocate (SIZE_T Size) __WINE_ALLOC_SIZE(1)
 
RPCRTAPI void RPC_ENTRY NdrRpcSsDefaultFree (void *NodeToFree)
 
RPCRTAPI RPC_STATUS RPC_ENTRY NdrGetUserMarshalInfo (ULONG *pFlags, ULONG InformationLevel, NDR_USER_MARSHAL_INFO *pMarshalInfo)
 

Macro Definition Documentation

◆ __NDR_ASCII_CHAR

#define __NDR_ASCII_CHAR   0x0000

Definition at line 68 of file rpcndr.h.

◆ __NDR_BIG_ENDIAN

#define __NDR_BIG_ENDIAN   0x0000

Definition at line 72 of file rpcndr.h.

◆ __NDR_CHAR_REP_MASK

#define __NDR_CHAR_REP_MASK   0x000f

Definition at line 60 of file rpcndr.h.

◆ __NDR_EBCDIC_CHAR

#define __NDR_EBCDIC_CHAR   0x0001

Definition at line 69 of file rpcndr.h.

◆ __NDR_FLOAT_REP_MASK

#define __NDR_FLOAT_REP_MASK   0xff00

Definition at line 62 of file rpcndr.h.

◆ __NDR_IBM_FLOAT

#define __NDR_IBM_FLOAT   0x0300

Definition at line 66 of file rpcndr.h.

◆ __NDR_IEEE_FLOAT

#define __NDR_IEEE_FLOAT   0x0000

Definition at line 64 of file rpcndr.h.

◆ __NDR_INT_REP_MASK

#define __NDR_INT_REP_MASK   0x00f0

Definition at line 61 of file rpcndr.h.

◆ __NDR_LITTLE_ENDIAN

#define __NDR_LITTLE_ENDIAN   0x0010

Definition at line 71 of file rpcndr.h.

◆ __NDR_LOCAL_DATA_REPRESENTATION

#define __NDR_LOCAL_DATA_REPRESENTATION    (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_LITTLE_ENDIAN)

Definition at line 79 of file rpcndr.h.

◆ __NDR_LOCAL_ENDIAN

Definition at line 83 of file rpcndr.h.

◆ __NDR_VAX_FLOAT

#define __NDR_VAX_FLOAT   0x0100

Definition at line 65 of file rpcndr.h.

◆ __RPC_CALLEE

#define __RPC_CALLEE   WINAPI

Definition at line 121 of file rpcndr.h.

◆ __RPCNDR_H_VERSION__

#define __RPCNDR_H_VERSION__   ( 500 )

Definition at line 20 of file rpcndr.h.

◆ cbNDRContext

#define cbNDRContext   20

Definition at line 151 of file rpcndr.h.

◆ CONST_VTBL

#define CONST_VTBL

Definition at line 42 of file rpcndr.h.

◆ DECLSPEC_UUID

#define DECLSPEC_UUID (   x)

Definition at line 161 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 52 of file rpcndr.h.

◆ GET_USER_DATA_REP

#define GET_USER_DATA_REP (   f)    HIWORD(f)

Definition at line 343 of file rpcndr.h.

◆ MIDL_ascii_strcpy

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

Definition at line 126 of file rpcndr.h.

◆ MIDL_ascii_strlen

#define MIDL_ascii_strlen (   s)    strlen(s)

Definition at line 125 of file rpcndr.h.

◆ MIDL_INTERFACE

#define MIDL_INTERFACE (   x)    struct

Definition at line 165 of file rpcndr.h.

◆ MIDL_memset

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

Definition at line 127 of file rpcndr.h.

◆ midl_user_allocate

#define midl_user_allocate   MIDL_user_allocate

Definition at line 129 of file rpcndr.h.

◆ midl_user_free

#define midl_user_free   MIDL_user_free

Definition at line 128 of file rpcndr.h.

◆ NDR_ASCII_CHAR

#define NDR_ASCII_CHAR   ((ULONG) __NDR_ASCII_CHAR)

Definition at line 103 of file rpcndr.h.

◆ NDR_BIG_ENDIAN

#define NDR_BIG_ENDIAN   ((ULONG) __NDR_BIG_ENDIAN)

Definition at line 106 of file rpcndr.h.

◆ NDR_CHAR_REP_MASK

#define NDR_CHAR_REP_MASK   ((ULONG) __NDR_CHAR_REP_MASK)

Definition at line 97 of file rpcndr.h.

◆ NDR_EBCDIC_CHAR

#define NDR_EBCDIC_CHAR   ((ULONG) __NDR_EBCDIC_CHAR)

Definition at line 104 of file rpcndr.h.

◆ NDR_FLOAT_REP_MASK

#define NDR_FLOAT_REP_MASK   ((ULONG) __NDR_FLOAT_REP_MASK)

Definition at line 99 of file rpcndr.h.

◆ NDR_IBM_FLOAT

#define NDR_IBM_FLOAT   ((ULONG) __NDR_IBM_FLOAT)

Definition at line 102 of file rpcndr.h.

◆ NDR_IEEE_FLOAT

#define NDR_IEEE_FLOAT   ((ULONG) __NDR_IEEE_FLOAT)

Definition at line 100 of file rpcndr.h.

◆ NDR_INT_REP_MASK

#define NDR_INT_REP_MASK   ((ULONG) __NDR_INT_REP_MASK)

Definition at line 98 of file rpcndr.h.

◆ NDR_LITTLE_ENDIAN

#define NDR_LITTLE_ENDIAN   ((ULONG) __NDR_LITTLE_ENDIAN)

Definition at line 105 of file rpcndr.h.

◆ NDR_LOCAL_DATA_REPRESENTATION

#define NDR_LOCAL_DATA_REPRESENTATION   ((ULONG) __NDR_LOCAL_DATA_REPRESENTATION)

Definition at line 107 of file rpcndr.h.

◆ NDR_LOCAL_ENDIAN

#define NDR_LOCAL_ENDIAN   ((ULONG) __NDR_LOCAL_ENDIAN)

Definition at line 108 of file rpcndr.h.

◆ NDR_SHAREABLE

#define NDR_SHAREABLE   static

Definition at line 123 of file rpcndr.h.

◆ NDR_VAX_FLOAT

#define NDR_VAX_FLOAT   ((ULONG) __NDR_VAX_FLOAT)

Definition at line 101 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 135 of file rpcndr.h.

◆ NdrFcShort

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

Definition at line 134 of file rpcndr.h.

◆ NDRSContextValue

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

Definition at line 150 of file rpcndr.h.

◆ RPC_BAD_STUB_DATA_EXCEPTION_FILTER

#define RPC_BAD_STUB_DATA_EXCEPTION_FILTER
Value:
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
#define STATUS_DATATYPE_MISALIGNMENT
Definition: ntstatus.h:183
#define RpcExceptionCode()
Definition: rpc.h:132
#define RPC_S_INVALID_BOUND
Definition: winerror.h:1043
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090

Definition at line 138 of file rpcndr.h.

◆ RPC_VAR_ENTRY

#define RPC_VAR_ENTRY   __cdecl

Definition at line 122 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:176
#define RPCRTAPI
Definition: rpc.h:82
static CONST DWORD MemorySize[]
Definition: svga.c:32
uint32_t ULONG
Definition: typedefs.h:59

Definition at line 607 of file rpcndr.h.

◆ small

#define small   char

Definition at line 115 of file rpcndr.h.

◆ TARGET_IS_NT351_OR_WIN95_OR_LATER

#define TARGET_IS_NT351_OR_WIN95_OR_LATER   1

Definition at line 113 of file rpcndr.h.

◆ TARGET_IS_NT40_OR_LATER

#define TARGET_IS_NT40_OR_LATER   1

Definition at line 112 of file rpcndr.h.

◆ TARGET_IS_NT50_OR_LATER

#define TARGET_IS_NT50_OR_LATER   1

Definition at line 111 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:607
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815

Definition at line 617 of file rpcndr.h.

◆ USER_CALL_AUX_MASK

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

Definition at line 342 of file rpcndr.h.

◆ USER_CALL_CTXT_MASK

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

Definition at line 341 of file rpcndr.h.

◆ USER_CALL_IS_ASYNC

#define USER_CALL_IS_ASYNC   0x0100

Definition at line 345 of file rpcndr.h.

◆ USER_CALL_NEW_CORRELATION_DESC

#define USER_CALL_NEW_CORRELATION_DESC   0x0200

Definition at line 346 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 318 of file rpcndr.h.

◆ USER_MARSHAL_FC_BYTE

#define USER_MARSHAL_FC_BYTE   1

Definition at line 656 of file rpcndr.h.

◆ USER_MARSHAL_FC_CHAR

#define USER_MARSHAL_FC_CHAR   2

Definition at line 657 of file rpcndr.h.

◆ USER_MARSHAL_FC_DOUBLE

#define USER_MARSHAL_FC_DOUBLE   12

Definition at line 667 of file rpcndr.h.

◆ USER_MARSHAL_FC_FLOAT

#define USER_MARSHAL_FC_FLOAT   10

Definition at line 665 of file rpcndr.h.

◆ USER_MARSHAL_FC_HYPER

#define USER_MARSHAL_FC_HYPER   11

Definition at line 666 of file rpcndr.h.

◆ USER_MARSHAL_FC_LONG

#define USER_MARSHAL_FC_LONG   8

Definition at line 663 of file rpcndr.h.

◆ USER_MARSHAL_FC_SHORT

#define USER_MARSHAL_FC_SHORT   6

Definition at line 661 of file rpcndr.h.

◆ USER_MARSHAL_FC_SMALL

#define USER_MARSHAL_FC_SMALL   3

Definition at line 658 of file rpcndr.h.

◆ USER_MARSHAL_FC_ULONG

#define USER_MARSHAL_FC_ULONG   9

Definition at line 664 of file rpcndr.h.

◆ USER_MARSHAL_FC_USHORT

#define USER_MARSHAL_FC_USHORT   7

Definition at line 662 of file rpcndr.h.

◆ USER_MARSHAL_FC_USMALL

#define USER_MARSHAL_FC_USMALL   4

Definition at line 659 of file rpcndr.h.

◆ USER_MARSHAL_FC_WCHAR

#define USER_MARSHAL_FC_WCHAR   5

Definition at line 660 of file rpcndr.h.

Typedef Documentation

◆ boolean

Definition at line 119 of file rpcndr.h.

◆ byte

typedef unsigned char byte

Definition at line 116 of file rpcndr.h.

◆ CLIENT_CALL_RETURN

◆ COMM_FAULT_OFFSETS

◆ error_status_t

Definition at line 494 of file rpcndr.h.

◆ EXPR_EVAL

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

Definition at line 175 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 277 of file rpcndr.h.

◆ GENERIC_BINDING_ROUTINE_PAIR

◆ GENERIC_UNBIND_ROUTINE

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

Definition at line 278 of file rpcndr.h.

◆ hyper

typedef INT64 hyper

Definition at line 117 of file rpcndr.h.

◆ MALLOC_FREE_STRUCT

◆ MIDL_FORMAT_STRING

◆ MIDL_SERVER_INFO

◆ MIDL_STUB_DESC

◆ MIDL_STUB_MESSAGE

◆ MIDL_STUBLESS_PROXY_INFO

◆ MIDL_SYNTAX_INFO

◆ MIDL_uhyper

Definition at line 118 of file rpcndr.h.

◆ NDR_CCONTEXT

typedef void* NDR_CCONTEXT

Definition at line 495 of file rpcndr.h.

◆ NDR_NOTIFY2_ROUTINE

typedef void(__RPC_USER * NDR_NOTIFY2_ROUTINE) (boolean flag)

Definition at line 155 of file rpcndr.h.

◆ NDR_NOTIFY_ROUTINE

typedef void(__RPC_USER * NDR_NOTIFY_ROUTINE) (void)

Definition at line 154 of file rpcndr.h.

◆ NDR_RUNDOWN

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

Definition at line 153 of file rpcndr.h.

◆ NDR_SCONTEXT

◆ NDR_USER_MARSHAL_INFO

◆ NDR_USER_MARSHAL_INFO_LEVEL1

◆ PARRAY_INFO

◆ PFORMAT_STRING

Definition at line 176 of file rpcndr.h.

◆ PFULL_PTR_TO_REFID_ELEMENT

◆ PFULL_PTR_XLAT_TABLES

◆ PGENERIC_BINDING_INFO

◆ PGENERIC_BINDING_ROUTINE_PAIR

◆ PMIDL_SERVER_INFO

◆ PMIDL_STUB_DESC

Definition at line 387 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 197 of file rpcndr.h.

◆ PNDR_CORRELATION_INFO

typedef struct _NDR_CORRELATION_INFO* PNDR_CORRELATION_INFO

Definition at line 198 of file rpcndr.h.

◆ PNDR_PIPE_DESC

typedef struct _NDR_PIPE_DESC* PNDR_PIPE_DESC

Definition at line 195 of file rpcndr.h.

◆ PNDR_PIPE_MESSAGE

typedef struct _NDR_PIPE_MESSAGE* PNDR_PIPE_MESSAGE

Definition at line 196 of file rpcndr.h.

◆ PSCONTEXT_QUEUE

◆ PXMIT_ROUTINE_QUINTUPLE

◆ RPC_BUFPTR

Definition at line 173 of file rpcndr.h.

◆ RPC_LENGTH

typedef ULONG RPC_LENGTH

Definition at line 174 of file rpcndr.h.

◆ SCONTEXT_QUEUE

◆ SERVER_ROUTINE

typedef LONG(__RPC_API * SERVER_ROUTINE) ()

Definition at line 416 of file rpcndr.h.

◆ STUB_THUNK

typedef void(__RPC_API * STUB_THUNK) (PMIDL_STUB_MESSAGE)

Definition at line 411 of file rpcndr.h.

◆ USER_MARSHAL_CB

◆ USER_MARSHAL_FREEING_ROUTINE

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

Definition at line 307 of file rpcndr.h.

◆ USER_MARSHAL_MARSHALLING_ROUTINE

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

Definition at line 305 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 304 of file rpcndr.h.

◆ USER_MARSHAL_UNMARSHALLING_ROUTINE

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

Definition at line 306 of file rpcndr.h.

◆ XMIT_HELPER_ROUTINE

typedef void(__RPC_USER * XMIT_HELPER_ROUTINE) (PMIDL_STUB_MESSAGE)

Definition at line 294 of file rpcndr.h.

◆ XMIT_ROUTINE_QUINTUPLE

Enumeration Type Documentation

◆ PROXY_PHASE

Enumerator
PROXY_CALCSIZE 
PROXY_GETBUFFER 
PROXY_MARSHAL 
PROXY_SENDRECEIVE 
PROXY_UNMARSHAL 

Definition at line 454 of file rpcndr.h.

454 {
PROXY_PHASE
Definition: rpcndr.h:454
@ PROXY_CALCSIZE
Definition: rpcndr.h:455
@ PROXY_GETBUFFER
Definition: rpcndr.h:456
@ PROXY_UNMARSHAL
Definition: rpcndr.h:459
@ PROXY_MARSHAL
Definition: rpcndr.h:457
@ PROXY_SENDRECEIVE
Definition: rpcndr.h:458

◆ STUB_PHASE

Enumerator
STUB_UNMARSHAL 
STUB_CALL_SERVER 
STUB_MARSHAL 
STUB_CALL_SERVER_NO_HRESULT 

Definition at line 447 of file rpcndr.h.

447 {
452} STUB_PHASE;
STUB_PHASE
Definition: rpcndr.h:447
@ STUB_MARSHAL
Definition: rpcndr.h:450
@ STUB_CALL_SERVER
Definition: rpcndr.h:449
@ STUB_CALL_SERVER_NO_HRESULT
Definition: rpcndr.h:451
@ STUB_UNMARSHAL
Definition: rpcndr.h:448

◆ 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 322 of file rpcndr.h.

323{
USER_MARSHAL_CB_TYPE
Definition: rpcndr.h:323
@ USER_MARSHAL_CB_BUFFER_SIZE
Definition: rpcndr.h:324
@ USER_MARSHAL_CB_UNMARSHALL
Definition: rpcndr.h:326
@ USER_MARSHAL_CB_FREE
Definition: rpcndr.h:327
@ USER_MARSHAL_CB_MARSHALL
Definition: rpcndr.h:325

◆ XLAT_SIDE

Enumerator
XLAT_SERVER 
XLAT_CLIENT 

Definition at line 462 of file rpcndr.h.

462 {
463 XLAT_SERVER = 1,
465} XLAT_SIDE;
XLAT_SIDE
Definition: rpcndr.h:462
@ XLAT_CLIENT
Definition: rpcndr.h:464
@ XLAT_SERVER
Definition: rpcndr.h:463

Function Documentation

◆ MIDL_user_allocate()

◆ 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 DsAddressToSiteNamesExW(), DsAddressToSiteNamesW(), DsGetDcSiteCoverageW(), free_pyramid_doub_carr(), IrotEnumRunning(), IrotRevoke(), LsaEnumerateAccountRights(), LsaEnumerateAccounts(), LsaEnumerateAccountsWithUserRight(), LsaEnumeratePrivileges(), LsaEnumerateTrustedDomains(), LsaEnumerateTrustedDomainsEx(), LsaGetRemoteUserName(), LsaGetUserName(), LsaLookupNames(), LsaLookupNames2(), LsaLookupPrivilegeDisplayName(), LsaLookupPrivilegeName(), LsaLookupSids(), LsapAddAuthorityToDomainsList(), LsapAddDomainToDomainsList(), LsapLookupAccountRightName(), LsapLookupFullyQualifiedWellKnownNames(), LsapLookupIsolatedNames(), LsapLookupNames(), LsapLookupSids(), LsapSplitNames(), LsaQueryDomainInformationPolicy(), LsaQueryInformationPolicy(), LsaQueryInfoTrustedDomain(), LsarAddPrivilegesToAccount(), LsarEnumerateAccountRights(), LsarEnumeratePrivilegesAccount(), LsarLookupNames(), LsarLookupNames2(), LsarLookupSids(), LsarpEnumeratePrivileges(), LsarpLookupPrivilegeDisplayName(), LsarpLookupPrivilegeName(), LsarQueryAccountDomain(), LsarQueryAuditEvents(), LsarQueryAuditFull(), LsarQueryAuditLog(), LsarQueryDefaultQuota(), LsarQueryDnsDomain(), LsarQueryModification(), LsarQueryPrimaryDomain(), LsarQuerySecurityObject(), LsarQueryServerRole(), LsarRemovePrivilegesFromAccount(), LsarSetAuditFull(), LsaSetSecurityObject(), pointer_tests(), rot_entry_delete(), SamGetGroupsForUser(), SamGetMembersInGroup(), SamIFree_SAMPR_ALIAS_INFO_BUFFER(), SamIFree_SAMPR_DISPLAY_INFO_BUFFER(), SamIFree_SAMPR_DOMAIN_INFO_BUFFER(), SamIFree_SAMPR_ENUMERATION_BUFFER(), SamIFree_SAMPR_GET_GROUPS_BUFFER(), SamIFree_SAMPR_GET_MEMBERS_BUFFER(), SamIFree_SAMPR_GROUP_INFO_BUFFER(), SamIFree_SAMPR_PSID_ARRAY(), SamIFree_SAMPR_RETURNED_USTRING_ARRAY(), SamIFree_SAMPR_SR_SECURITY_DESCRIPTOR(), SamIFree_SAMPR_ULONG_ARRAY(), SamIFree_SAMPR_USER_INFO_BUFFER(), SamIFreeVoid(), SamrQuerySecurityObject(), SamSetSecurityObject(), and ScmGetServiceNameFromTag().

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

Definition at line 1930 of file ndr_stubless.c.

1931{
1933 LONG_PTR ret;
1934
1936 ret = ndr_async_client_call( desc, format, va_arg( args, void ** ));
1937 __ms_va_end( args );
1938 return *(CLIENT_CALL_RETURN *)&ret;
1939}
#define va_arg(ap, T)
Definition: acmsvcex.h:89
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
static const WCHAR desc[]
Definition: protectdata.c:36
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
LONG_PTR CDECL DECLSPEC_HIDDEN ndr_async_client_call(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, void **stack_top)
#define args
Definition: format.c:66
Definition: match.c:390
int ret
#define __ms_va_list
Definition: windef.h:456
#define __ms_va_end(list)
Definition: windef.h:458
#define __ms_va_start(list, arg)
Definition: windef.h:457

◆ NdrAsyncServerCall()

RPCRTAPI void RPC_ENTRY NdrAsyncServerCall ( PRPC_MESSAGE  pRpcMsg)

Definition at line 1951 of file ndr_stubless.c.

1952{
1953 const MIDL_SERVER_INFO *pServerInfo;
1954 const MIDL_STUB_DESC *pStubDesc;
1955 PFORMAT_STRING pFormat;
1956 /* pointer to start of stack to pass into stub implementation */
1957 unsigned char *args;
1958 /* header for procedure string */
1959 const NDR_PROC_HEADER *pProcHeader;
1961 PRPC_ASYNC_STATE pAsync;
1963
1964 TRACE("%p\n", pRpcMsg);
1965
1966 pServerInfo = ((RPC_SERVER_INTERFACE *)pRpcMsg->RpcInterfaceInformation)->InterpreterInfo;
1967
1968 pStubDesc = pServerInfo->pStubDesc;
1969 pFormat = pServerInfo->ProcString + pServerInfo->FmtStringOffset[pRpcMsg->ProcNum];
1970 pProcHeader = (const NDR_PROC_HEADER *)&pFormat[0];
1971
1972 TRACE("NDR Version: 0x%x\n", pStubDesc->Version);
1973
1977
1979 *(PRPC_MESSAGE)(async_call_data->pStubMsg + 1) = *pRpcMsg;
1980
1982 {
1983 const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0];
1984 async_call_data->stack_size = header_rpc->stack_size;
1985 pFormat += sizeof(NDR_PROC_HEADER_RPC);
1986 }
1987 else
1988 {
1990 pFormat += sizeof(NDR_PROC_HEADER);
1991 }
1992
1993 TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags);
1994
1995 /* binding */
1996 switch (pProcHeader->handle_type)
1997 {
1998 /* explicit binding: parse additional section */
1999 case 0:
2000 switch (*pFormat) /* handle_type */
2001 {
2002 case FC_BIND_PRIMITIVE: /* explicit primitive */
2003 pFormat += sizeof(NDR_EHD_PRIMITIVE);
2004 break;
2005 case FC_BIND_GENERIC: /* explicit generic */
2006 pFormat += sizeof(NDR_EHD_GENERIC);
2007 break;
2008 case FC_BIND_CONTEXT: /* explicit context */
2009 pFormat += sizeof(NDR_EHD_CONTEXT);
2010 break;
2011 default:
2012 ERR("bad explicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
2014 }
2015 break;
2016 case FC_BIND_GENERIC: /* implicit generic */
2017 case FC_BIND_PRIMITIVE: /* implicit primitive */
2018 case FC_CALLBACK_HANDLE: /* implicit callback */
2019 case FC_AUTO_HANDLE: /* implicit auto handle */
2020 break;
2021 default:
2022 ERR("bad implicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
2024 }
2025
2027 {
2028 ERR("objects not supported\n");
2031 }
2032
2033 NdrServerInitializeNew(pRpcMsg, async_call_data->pStubMsg, pStubDesc);
2034
2035 /* create the full pointer translation tables, if requested */
2038
2039 /* use alternate memory allocation routines */
2041#if 0
2042 NdrRpcSsEnableAllocate(&stubMsg);
2043#else
2044 FIXME("Set RPCSS memory allocation routines\n");
2045#endif
2046
2047 TRACE("allocating memory for stack of size %x\n", async_call_data->stack_size);
2048
2050 async_call_data->pStubMsg->StackTop = args; /* used by conformance of top-level objects */
2051
2052 pAsync = I_RpcAllocate(sizeof(*pAsync));
2053 if (!pAsync) RpcRaiseException(RPC_X_NO_MEMORY);
2054
2055 status = RpcAsyncInitializeHandle(pAsync, sizeof(*pAsync));
2056 if (status != RPC_S_OK)
2058
2059 pAsync->StubInfo = async_call_data;
2060 TRACE("pAsync %p, pAsync->StubInfo %p, pFormat %p\n", pAsync, pAsync->StubInfo, async_call_data->pHandleFormat);
2061
2062 /* add the implicit pAsync pointer as the first arg to the function */
2063 *(void **)args = pAsync;
2064
2065 if (is_oicf_stubdesc(pStubDesc))
2066 {
2067 const NDR_PROC_PARTIAL_OIF_HEADER *pOIFHeader = (const NDR_PROC_PARTIAL_OIF_HEADER *)pFormat;
2068 /* cache of Oif_flags from v2 procedure header */
2069 INTERPRETER_OPT_FLAGS Oif_flags;
2070 /* cache of extension flags from NDR_PROC_HEADER_EXTS */
2071 INTERPRETER_OPT_FLAGS2 ext_flags = { 0 };
2072
2073 Oif_flags = pOIFHeader->Oi2Flags;
2075
2076 pFormat += sizeof(NDR_PROC_PARTIAL_OIF_HEADER);
2077
2078 TRACE("Oif_flags = %s\n", debugstr_INTERPRETER_OPT_FLAGS(Oif_flags) );
2079
2080 if (Oif_flags.HasExtensions)
2081 {
2082 const NDR_PROC_HEADER_EXTS *pExtensions = (const NDR_PROC_HEADER_EXTS *)pFormat;
2083 ext_flags = pExtensions->Flags2;
2084 pFormat += pExtensions->Size;
2085 }
2086
2087 if (Oif_flags.HasPipes)
2088 {
2089 FIXME("pipes not supported yet\n");
2090 RpcRaiseException(RPC_X_WRONG_STUB_VERSION); /* FIXME: remove when implemented */
2091 /* init pipes package */
2092 /* NdrPipesInitialize(...) */
2093 }
2094 if (ext_flags.HasNewCorrDesc)
2095 {
2096 /* initialize extra correlation package */
2098 if (ext_flags.Unused & 0x2) /* has range on conformance */
2100 }
2101 }
2102 else
2103 {
2106 /* reuse the correlation cache, it's not needed for v1 format */
2108 }
2109
2110 /* convert strings, floating point values and endianness into our
2111 * preferred format */
2112 if ((pRpcMsg->DataRepresentation & 0x0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION)
2114
2115 async_call_data->pHandleFormat = pFormat;
2116
2117 /* 1. UNMARSHAL */
2118 TRACE("UNMARSHAL\n");
2120
2121 /* 2. INITOUT */
2122 TRACE("INITOUT\n");
2124
2125 /* 3. CALLSERVER */
2126 TRACE("CALLSERVER\n");
2127 if (pServerInfo->ThunkTable && pServerInfo->ThunkTable[pRpcMsg->ProcNum])
2128 pServerInfo->ThunkTable[pRpcMsg->ProcNum](async_call_data->pStubMsg);
2129 else
2131}
#define FIXME(fmt,...)
Definition: debug.h:111
#define ERR(fmt,...)
Definition: debug.h:110
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
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
static const char * debugstr_INTERPRETER_OPT_FLAGS(INTERPRETER_OPT_FLAGS Oi2Flags)
Definition: ndr_stubless.c:255
static LONG_PTR * stub_do_args(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat, enum stubless_phase phase, unsigned short number_of_params)
LONG_PTR __cdecl call_server_func(SERVER_ROUTINE func, unsigned char *args, unsigned short stack_size)
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:590
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
struct _RPC_MESSAGE * PRPC_MESSAGE
#define NDR_LOCAL_DATA_REPRESENTATION
Definition: rpcndr.h:107
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:724
void *WINAPI I_RpcAllocate(unsigned int Size)
Definition: rpcrt4_main.c:716
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:188
long RPC_STATUS
Definition: rpc.h:52
#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:424
const STUB_THUNK * ThunkTable
Definition: rpcndr.h:425
const SERVER_ROUTINE * DispatchTable
Definition: rpcndr.h:422
PMIDL_STUB_DESC pStubDesc
Definition: rpcndr.h:421
PFORMAT_STRING ProcString
Definition: rpcndr.h:423
ULONG Version
Definition: rpcndr.h:376
unsigned char * StackTop
Definition: rpcndr.h:226
unsigned char CorrDespIncrement
Definition: rpcndr.h:218
struct _FULL_PTR_XLAT_TABLES * FullPtrXlatTables
Definition: rpcndr.h:231
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:150
unsigned int ProcNum
Definition: rpcdcep.h:42
void * RpcInterfaceInformation
Definition: rpcdcep.h:44
ULONG DataRepresentation
Definition: rpcdcep.h:39
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:1136

◆ NdrAsyncStubCall()

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

Definition at line 1943 of file ndr_stubless.c.

1946{
1947 FIXME("unimplemented, expect crash!\n");
1948 return 0;
1949}

◆ NdrByteCountPointerBufferSize()

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

Definition at line 6355 of file ndr_marshall.c.

6358{
6359 FIXME("stub\n");
6360}

◆ NdrByteCountPointerFree()

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

Definition at line 6375 of file ndr_marshall.c.

6378{
6379 FIXME("stub\n");
6380}

◆ NdrByteCountPointerMarshall()

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

Definition at line 6332 of file ndr_marshall.c.

6335{
6336 FIXME("stub\n");
6337 return NULL;
6338}
#define NULL
Definition: types.h:112

◆ NdrByteCountPointerUnmarshall()

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

Definition at line 6343 of file ndr_marshall.c.

6347{
6348 FIXME("stub\n");
6349 return NULL;
6350}

◆ NDRCContextBinding()

RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY NDRCContextBinding ( NDR_CCONTEXT  CContext)

Definition at line 76 of file ndr_contexthandle.c.

77{
78 struct context_handle_entry *che;
80
81 TRACE("%p\n", CContext);
82
84 che = get_context_entry(CContext);
85 if (che)
86 handle = che->handle;
88
89 if (!handle)
90 {
91 ERR("invalid handle %p\n", CContext);
93 }
94 return handle;
95}
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 97 of file ndr_contexthandle.c.

98{
99 struct context_handle_entry *che;
100
101 TRACE("%p %p\n", CContext, pBuff);
102
103 if (CContext)
104 {
106 che = get_context_entry(CContext);
107 memcpy(pBuff, &che->wire_data, sizeof (ndr_context_handle));
109 }
110 else
111 {
115 }
116}
#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 206 of file ndr_contexthandle.c.

209{
211
212 TRACE("*%p=(%p) %p %p %08x\n",
213 CContext, *CContext, hBinding, pBuff, DataRepresentation);
214
216 status = ndr_update_context_handle(CContext, hBinding, pBuff);
218 if (status)
220}
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 4661 of file ndr_marshall.c.

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

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,
  ... 
)

Definition at line 1022 of file ndr_stubless.c.

1023{
1025 LONG_PTR ret;
1026
1028 ret = ndr_client_call( desc, format, va_arg( args, void ** ), NULL );
1029 __ms_va_end( args );
1030 return *(CLIENT_CALL_RETURN *)&ret;
1031}
LONG_PTR CDECL DECLSPEC_HIDDEN ndr_client_call(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, void **stack_top, void **fpu_stack)
Definition: ndr_stubless.c:850

◆ NdrClientContextMarshall()

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

Definition at line 7057 of file ndr_marshall.c.

7060{
7061 TRACE("(%p, %p, %d)\n", pStubMsg, ContextHandle, fCheck);
7062
7063 align_pointer_clear(&pStubMsg->Buffer, 4);
7064
7065 if (pStubMsg->Buffer + cbNDRContext > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)
7066 {
7067 ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n",
7068 pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength);
7070 }
7071
7072 /* FIXME: what does fCheck do? */
7073 NDRCContextMarshall(ContextHandle,
7074 pStubMsg->Buffer);
7075
7076 pStubMsg->Buffer += cbNDRContext;
7077}
static void align_pointer_clear(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:103
void WINAPI NDRCContextMarshall(NDR_CCONTEXT CContext, void *pBuff)
#define cbNDRContext
Definition: rpcndr.h:151
unsigned char * Buffer
Definition: rpcndr.h:203
ULONG BufferLength
Definition: rpcndr.h:207
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
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 7082 of file ndr_marshall.c.

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

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->fInOnlyParam = 0;
82 pStubMsg->fHasReturn = 0;
83 pStubMsg->fHasExtensions = 0;
84 pStubMsg->fHasNewCorrDesc = 0;
85 pStubMsg->fIsIn = 0;
86 pStubMsg->fIsOut = 0;
87 pStubMsg->fIsOicf = 0;
88 pStubMsg->fBufferValid = 0;
89 pStubMsg->fHasMemoryValidateCallback = 0;
90 pStubMsg->fInFree = 0;
91 pStubMsg->fNeedMCCP = 0;
92 pStubMsg->fUnused = 0;
93 pStubMsg->dwDestContext = MSHCTX_DIFFERENTMACHINE;
94 pStubMsg->pvDestContext = NULL;
95 pStubMsg->pRpcChannelBuffer = NULL;
96 pStubMsg->pArrayInfo = NULL;
97 pStubMsg->dwStubPhase = 0;
98 /* FIXME: LowStackMark */
99 pStubMsg->pAsyncMsg = NULL;
100 pStubMsg->pCorrInfo = NULL;
101 pStubMsg->pCorrMemory = NULL;
102 pStubMsg->pMemoryList = NULL;
103}
#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:362
unsigned int fIsOicf
Definition: rpcndr.h:242
ULONG PointerLength
Definition: rpcndr.h:233
PNDR_CORRELATION_INFO pCorrInfo
Definition: rpcndr.h:262
unsigned int fIsIn
Definition: rpcndr.h:240
unsigned int fBufferValid
Definition: rpcndr.h:243
unsigned int fDontCallFreeInst
Definition: rpcndr.h:235
struct NDR_POINTER_QUEUE_STATE * pPointerQueueState
Definition: rpcndr.h:215
void * pvDestContext
Definition: rpcndr.h:250
DWORD dwStubPhase
Definition: rpcndr.h:259
unsigned int fNeedMCCP
Definition: rpcndr.h:246
ULONG FullPtrRefId
Definition: rpcndr.h:232
struct IRpcChannelBuffer * pRpcChannelBuffer
Definition: rpcndr.h:253
void * pMemoryList
Definition: rpcndr.h:264
PNDR_ASYNC_MESSAGE pAsyncMsg
Definition: rpcndr.h:261
unsigned int fHasReturn
Definition: rpcndr.h:237
unsigned int fHasExtensions
Definition: rpcndr.h:238
unsigned int fInFree
Definition: rpcndr.h:245
PARRAY_INFO pArrayInfo
Definition: rpcndr.h:254
int IgnoreEmbeddedPointers
Definition: rpcndr.h:216
unsigned int fInOnlyParam
Definition: rpcndr.h:236
DWORD dwDestContext
Definition: rpcndr.h:249
unsigned int fHasMemoryValidateCallback
Definition: rpcndr.h:244
unsigned char * pCorrMemory
Definition: rpcndr.h:263
unsigned char uFlags
Definition: rpcndr.h:219
const struct _MIDL_STUB_DESC * StubDesc
Definition: rpcndr.h:230
unsigned char IsClient
Definition: rpcndr.h:210
unsigned char * BufferStart
Definition: rpcndr.h:204
unsigned int fHasNewCorrDesc
Definition: rpcndr.h:239
struct NDR_ALLOC_ALL_NODES_CONTEXT * pAllocAllNodesContext
Definition: rpcndr.h:214
unsigned char * PointerBufferMark
Definition: rpcndr.h:217
unsigned short UniquePtrCount
Definition: rpcndr.h:220
unsigned int fIsOut
Definition: rpcndr.h:241
unsigned int fInDontFree
Definition: rpcndr.h:234
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(), do_ndr_client_call(), m_CtxClose(), m_CtxHello(), m_CtxOpen(), m_CtxOpen2(), 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 7153 of file ndr_marshall.c.

7155{
7156 RPC_SYNTAX_IDENTIFIER *if_id = NULL;
7158
7159 TRACE("(%p, %p)\n", pStubMsg, pFormat);
7160
7161 if (pFormat[1] & NDR_CONTEXT_HANDLE_SERIALIZE)
7163 if (pFormat[1] & NDR_CONTEXT_HANDLE_NOSERIALIZE)
7165 if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
7166 {
7167 RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
7168 if_id = &sif->InterfaceId;
7169 }
7170
7171 return NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle, NULL,
7172 pStubMsg->RpcMsg->DataRepresentation, if_id,
7173 flags);
7174}
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 7146 of file ndr_marshall.c.

7149{
7150 FIXME("(%p, %p, %p): stub\n", pStubMsg, pMemory, pFormat);
7151}

◆ NdrConvert()

RPCRTAPI void RPC_ENTRY NdrConvert ( PMIDL_STUB_MESSAGE  pStubMsg,
PFORMAT_STRING  pFormat 
)

Definition at line 4671 of file ndr_marshall.c.

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

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

◆ NdrConvert2()

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

Definition at line 4681 of file ndr_marshall.c.

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

◆ NdrCorrelationFree()

RPCRTAPI void RPC_ENTRY NdrCorrelationFree ( PMIDL_STUB_MESSAGE  pStubMsg)

Definition at line 7302 of file ndr_marshall.c.

7303{
7304 static int once;
7305
7306 if (!once++)
7307 FIXME("(%p): stub\n", pStubMsg);
7308}

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 7261 of file ndr_marshall.c.

7262{
7263 static int once;
7264
7265 if (!once++)
7266 FIXME("(%p, %p, %d, 0x%x): semi-stub\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}
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

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

◆ NdrCorrelationPass()

RPCRTAPI void RPC_ENTRY NdrCorrelationPass ( PMIDL_STUB_MESSAGE  pStubMsg)

Definition at line 7285 of file ndr_marshall.c.

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

◆ 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 184 of file ndr_clientserver.c.

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

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 214 of file ndr_fullpointer.c.

215{
216 ULONG Hash = 0;
217 unsigned int i;
218 PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
219 ULONG RefId = 0;
220
221 TRACE("(%p, %p)\n", pXlatTables, Pointer);
222
223 if (!Pointer)
224 return 1;
225
226 /* simple hashing algorithm, don't know whether it matches native */
227 for (i = 0; i < sizeof(Pointer); i++)
228 Hash = (Hash * 3) ^ ((unsigned char *)&Pointer)[i];
229
230 XlatTableEntry = pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask];
231 for (; XlatTableEntry; XlatTableEntry = XlatTableEntry->Next)
232 if (Pointer == XlatTableEntry->Pointer)
233 {
234 if (XlatTableEntry->State & 0x20)
235 return 0;
236 XlatTableEntry->State |= 0x20;
237 RefId = XlatTableEntry->RefId;
238 break;
239 }
240
241 if (!XlatTableEntry)
242 return 0;
243
244 if (pXlatTables->RefIdToPointer.NumberOfEntries > RefId)
245 {
246 pXlatTables->RefIdToPointer.StateTable[RefId] |= 0x20;
247 return 1;
248 }
249
250 return 0;
251}
static int Hash(const char *)
Definition: reader.c:2257
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:468
unsigned char State
Definition: rpcndr.h:471
struct _FULL_PTR_XLAT_TABLES::@3221 PointerToRefId
struct _FULL_PTR_XLAT_TABLES::@3220 RefIdToPointer

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 188 of file ndr_fullpointer.c.

190{
191 ULONG Hash = 0;
192 unsigned int i;
193 PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
194
195 TRACE("(%p, 0x%x, %p)\n", pXlatTables, RefId, pPointer);
196
197 /* simple hashing algorithm, don't know whether it matches native */
198 for (i = 0; i < sizeof(pPointer); i++)
199 Hash = (Hash * 3) ^ ((unsigned char *)&pPointer)[i];
200
201 XlatTableEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(*XlatTableEntry));
202 XlatTableEntry->Next = pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask];
203 XlatTableEntry->Pointer = pPointer;
204 XlatTableEntry->RefId = RefId;
205 XlatTableEntry->State = 0;
206 pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask] = XlatTableEntry;
207
208 /* insert pointer into mapping table */
209 expand_pointer_table_if_necessary(pXlatTables, RefId);
210 if (pXlatTables->RefIdToPointer.NumberOfEntries > RefId)
211 pXlatTables->RefIdToPointer.XlatTable[XlatTableEntry->RefId] = pPointer;
212}
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 109 of file ndr_fullpointer.c.

112{
113 ULONG Hash = 0;
114 unsigned int i;
115 PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
116
117 TRACE("(%p, %p, %d, %p)\n", pXlatTables, pPointer, QueryType, pRefId);
118
119 if (!pPointer)
120 {
121 *pRefId = 0;
122 return 1;
123 }
124
125 /* simple hashing algorithm, don't know whether it matches native */
126 for (i = 0; i < sizeof(pPointer); i++)
127 Hash = (Hash * 3) ^ ((unsigned char *)&pPointer)[i];
128
129 XlatTableEntry = pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask];
130 for (; XlatTableEntry; XlatTableEntry = XlatTableEntry->Next)
131 if (pPointer == XlatTableEntry->Pointer)
132 {
133 *pRefId = XlatTableEntry->RefId;
134 if (XlatTableEntry->State & QueryType)
135 return 1;
136 XlatTableEntry->State |= QueryType;
137 return 0;
138 }
139
140 XlatTableEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(*XlatTableEntry));
141 XlatTableEntry->Next = pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask];
142 XlatTableEntry->Pointer = pPointer;
143 XlatTableEntry->RefId = *pRefId = pXlatTables->NextRefId++;
144 XlatTableEntry->State = QueryType;
145 pXlatTables->PointerToRefId.XlatTable[Hash & pXlatTables->PointerToRefId.HashMask] = XlatTableEntry;
146
147 /* insert pointer into mapping table */
148 expand_pointer_table_if_necessary(pXlatTables, XlatTableEntry->RefId);
149 if (pXlatTables->RefIdToPointer.NumberOfEntries > XlatTableEntry->RefId)
150 {
151 pXlatTables->RefIdToPointer.XlatTable[XlatTableEntry->RefId] = pPointer;
152 pXlatTables->RefIdToPointer.StateTable[XlatTableEntry->RefId] = QueryType;
153 }
154
155 return 0;
156}
_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 158 of file ndr_fullpointer.c.

161{
162 TRACE("(%p, 0x%x, %d, %p)\n", pXlatTables, RefId, QueryType, ppPointer);
163
164 if (!RefId)
165 return 1;
166
167 expand_pointer_table_if_necessary(pXlatTables, RefId);
168
169 pXlatTables->NextRefId = max(RefId + 1, pXlatTables->NextRefId);
170
171 if (pXlatTables->RefIdToPointer.NumberOfEntries > RefId)
172 {
173 *ppPointer = pXlatTables->RefIdToPointer.XlatTable[RefId];
174 if (QueryType)
175 {
176 if (pXlatTables->RefIdToPointer.StateTable[RefId] & QueryType)
177 return 1;
178 pXlatTables->RefIdToPointer.StateTable[RefId] |= QueryType;
179 return 0;
180 }
181 else
182 return 0;
183 }
184 *ppPointer = NULL;
185 return 0;
186}
#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 64 of file ndr_fullpointer.c.

65{
66 ULONG i;
67
68 TRACE("(%p)\n", pXlatTables);
69
70 /* free the entries in the table */
71 for (i = 0; i < pXlatTables->PointerToRefId.NumberOfBuckets; i++)
72 {
73 PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry;
74 for (XlatTableEntry = pXlatTables->PointerToRefId.XlatTable[i];
75 XlatTableEntry; )
76 {
77 PFULL_PTR_TO_REFID_ELEMENT Next = XlatTableEntry->Next;
78 HeapFree(GetProcessHeap(), 0, XlatTableEntry);
79 XlatTableEntry = Next;
80 }
81 }
82
83 HeapFree(GetProcessHeap(), 0, pXlatTables->RefIdToPointer.XlatTable);
84 HeapFree(GetProcessHeap(), 0, pXlatTables->RefIdToPointer.StateTable);
85 HeapFree(GetProcessHeap(), 0, pXlatTables->PointerToRefId.XlatTable);
86
87 HeapFree(GetProcessHeap(), 0, pXlatTables);
88}

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 32 of file ndr_fullpointer.c.

34{
35 ULONG NumberOfBuckets;
36 PFULL_PTR_XLAT_TABLES pXlatTables = HeapAlloc(GetProcessHeap(), 0, sizeof(*pXlatTables));
37
38 TRACE("(%d, %d)\n", NumberOfPointers, XlatSide);
39
40 if (!NumberOfPointers) NumberOfPointers = 512;
41 NumberOfBuckets = ((NumberOfPointers + 3) & ~3) - 1;
42
43 pXlatTables->RefIdToPointer.XlatTable =
45 sizeof(void *) * NumberOfPointers);
46 pXlatTables->RefIdToPointer.StateTable =
48 sizeof(unsigned char) * NumberOfPointers);
49 pXlatTables->RefIdToPointer.NumberOfEntries = NumberOfPointers;
50
51 TRACE("NumberOfBuckets = %d\n", NumberOfBuckets);
52 pXlatTables->PointerToRefId.XlatTable =
54 sizeof(PFULL_PTR_TO_REFID_ELEMENT) * NumberOfBuckets);
55 pXlatTables->PointerToRefId.NumberOfBuckets = NumberOfBuckets;
56 pXlatTables->PointerToRefId.HashMask = NumberOfBuckets - 1;
57
58 pXlatTables->NextRefId = 1;
59 pXlatTables->XlatSide = XlatSide;
60
61 return pXlatTables;
62}
XLAT_SIDE XlatSide
Definition: rpcndr.h:489

Referenced by do_ndr_async_client_call(), do_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 163 of file ndr_clientserver.c.

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

Referenced by CtxClose(), CtxHello(), CtxOpen(), do_ndr_async_client_call(), do_ndr_client_call(), m_CtxClose(), m_CtxHello(), m_CtxOpen(), m_CtxOpen2(), 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 4611 of file ndr_marshall.c.

4612{
4614
4615 TRACE("(%p,%u,%p)\n", flags, level, umi);
4616
4617 if (level != 1)
4618 return RPC_S_INVALID_ARG;
4619
4620 memset(&umi->u1.Level1, 0, sizeof(umi->u1.Level1));
4621 umi->InformationLevel = level;
4622
4624 return RPC_S_INVALID_ARG;
4625
4626 umi->u1.Level1.pfnAllocate = umcb->pStubMsg->pfnAllocate;
4627 umi->u1.Level1.pfnFree = umcb->pStubMsg->pfnFree;
4628 umi->u1.Level1.pRpcChannelBuffer = umcb->pStubMsg->pRpcChannelBuffer;
4629
4630 switch (umcb->CBType)
4631 {
4634 {
4635 RPC_MESSAGE *msg = umcb->pStubMsg->RpcMsg;
4636 unsigned char *buffer_start = msg->Buffer;
4637 unsigned char *buffer_end =
4638 (unsigned char *)msg->Buffer + msg->BufferLength;
4639
4640 if (umcb->pStubMsg->Buffer < buffer_start ||
4641 umcb->pStubMsg->Buffer > buffer_end)
4642 return RPC_X_INVALID_BUFFER;
4643
4644 umi->u1.Level1.Buffer = umcb->pStubMsg->Buffer;
4645 umi->u1.Level1.BufferSize = buffer_end - umcb->pStubMsg->Buffer;
4646 break;
4647 }
4650 break;
4651 default:
4652 WARN("unrecognised CBType %d\n", umcb->CBType);
4653 }
4654
4655 return RPC_S_OK;
4656}
#define msg(x)
Definition: auth_time.c:54
#define WARN(fmt,...)
Definition: debug.h:112
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:318
#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:336
ULONG Signature
Definition: rpcndr.h:335
PMIDL_STUB_MESSAGE pStubMsg
Definition: rpcndr.h:333
#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 231 of file ndr_clientserver.c.

235{
236 TRACE("(%p, %p, %p, %d)\n", pStubMsg, pCommStatus, pFaultStatus, Status);
237
238 switch (Status)
239 {
242 case RPC_S_UNKNOWN_IF:
252 *pCommStatus = Status;
253 *pFaultStatus = 0;
254 break;
255 default:
256 *pCommStatus = 0;
257 *pFaultStatus = Status;
258 }
259
260 return RPC_S_OK;
261}
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
Status
Definition: gdiplustypes.h:25
#define RPC_S_SERVER_TOO_BUSY
Definition: winerror.h:1034
#define RPC_S_CALL_FAILED_DNE
Definition: winerror.h:1038
#define EPT_S_NOT_REGISTERED
Definition: winerror.h:1061
#define RPC_S_UNSUPPORTED_TRANS_SYN
Definition: winerror.h:1040
#define RPC_S_UNSUPPORTED_TYPE
Definition: winerror.h:1041
#define RPC_S_UNKNOWN_IF
Definition: winerror.h:1028
#define RPC_S_PROTOCOL_ERROR
Definition: winerror.h:1039
#define RPC_S_SERVER_UNAVAILABLE
Definition: winerror.h:1033
#define RPC_S_INVALID_BINDING
Definition: winerror.h:1013
#define RPC_S_COMM_FAILURE
Definition: winerror.h:1127
#define RPC_S_PROCNUM_OUT_OF_RANGE
Definition: winerror.h:1053

Referenced by ndr_client_call(), 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 do_ndr_client_call().

◆ NdrOleAllocate()

RPCRTAPI void *RPC_ENTRY NdrOleAllocate ( SIZE_T  Size)

Definition at line 423 of file ndr_ole.c.

424{
425 if (!LoadCOM()) return NULL;
426 return COM_MemAlloc(Size);
427}
static HMODULE LoadCOM(void)
Definition: ndr_ole.c:58
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

Referenced by init_stub_desc(), and my_alloc().

◆ NdrOleFree()

RPCRTAPI void RPC_ENTRY NdrOleFree ( void NodeToFree)

Definition at line 432 of file ndr_ole.c.

433{
434 if (!LoadCOM()) return;
435 COM_MemFree(NodeToFree);
436}

Referenced by init_stub_desc(), my_free(), and test_nonconformant_string().

◆ NdrRangeUnmarshall()

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

Definition at line 6463 of file ndr_marshall.c.

6468{
6469 const NDR_RANGE *pRange = (const NDR_RANGE *)pFormat;
6470 unsigned char base_type;
6471
6472 TRACE("pStubMsg: %p, ppMemory: %p, type: 0x%02x, fMustAlloc: %s\n", pStubMsg, ppMemory, *pFormat, fMustAlloc ? "true" : "false");
6473
6474 if (pRange->type != FC_RANGE)
6475 {
6476 ERR("invalid format type %x\n", pRange->type);
6478 return NULL;
6479 }
6480 base_type = pRange->flags_type & 0xf;
6481
6482 TRACE("base_type = 0x%02x, low_value = %d, high_value = %d\n",
6483 base_type, pRange->low_value, pRange->high_value);
6484
6485#define RANGE_UNMARSHALL(mem_type, wire_type, format_spec) \
6486 do \
6487 { \
6488 align_pointer(&pStubMsg->Buffer, sizeof(wire_type)); \
6489 if (!fMustAlloc && !*ppMemory) \
6490 fMustAlloc = TRUE; \
6491 if (fMustAlloc) \
6492 *ppMemory = NdrAllocate(pStubMsg, sizeof(mem_type)); \
6493 if (pStubMsg->Buffer + sizeof(wire_type) > pStubMsg->BufferEnd) \
6494 { \
6495 ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n", \
6496 pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength); \
6497 RpcRaiseException(RPC_X_BAD_STUB_DATA); \
6498 } \
6499 if ((*(wire_type *)pStubMsg->Buffer < (mem_type)pRange->low_value) || \
6500 (*(wire_type *)pStubMsg->Buffer > (mem_type)pRange->high_value)) \
6501 { \
6502 ERR("value exceeded bounds: " format_spec ", low: " format_spec ", high: " format_spec "\n", \
6503 *(wire_type *)pStubMsg->Buffer, (mem_type)pRange->low_value, \
6504 (mem_type)pRange->high_value); \
6505 RpcRaiseException(RPC_S_INVALID_BOUND); \
6506 return NULL; \
6507 } \
6508 TRACE("*ppMemory: %p\n", *ppMemory); \
6509 **(mem_type **)ppMemory = *(wire_type *)pStubMsg->Buffer; \
6510 pStubMsg->Buffer += sizeof(wire_type); \
6511 } while (0)
6512
6513 switch(base_type)
6514 {
6515 case FC_CHAR:
6516 case FC_SMALL:
6518 TRACE("value: 0x%02x\n", **ppMemory);
6519 break;
6520 case FC_BYTE:
6521 case FC_USMALL:
6522 RANGE_UNMARSHALL(CHAR, CHAR, "%u");
6523 TRACE("value: 0x%02x\n", **ppMemory);
6524 break;
6525 case FC_WCHAR: /* FIXME: valid? */
6526 case FC_USHORT:
6528 TRACE("value: 0x%04x\n", **(USHORT **)ppMemory);
6529 break;
6530 case FC_SHORT:
6532 TRACE("value: 0x%04x\n", **(USHORT **)ppMemory);
6533 break;
6534 case FC_LONG:
6535 case FC_ENUM32:
6536 RANGE_UNMARSHALL(LONG, LONG, "%d");
6537 TRACE("value: 0x%08x\n", **(ULONG **)ppMemory);
6538 break;
6539 case FC_ULONG:
6541 TRACE("value: 0x%08x\n", **(ULONG **)ppMemory);
6542 break;
6543 case FC_ENUM16:
6545 TRACE("value: 0x%08x\n", **(UINT **)ppMemory);
6546 break;
6547 case FC_FLOAT:
6548 case FC_DOUBLE:
6549 case FC_HYPER:
6550 default:
6551 ERR("invalid range base type: 0x%02x\n", base_type);
6553 }
6554
6555 return NULL;
6556}
#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:1074
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 226 of file ndr_stubless.c.

227{
228#if 0 /* these functions are not defined yet */
229 pMessage->pfnAllocate = NdrRpcSmClientAllocate;
230 pMessage->pfnFree = NdrRpcSmClientFree;
231#endif
232}
RPCRTAPI void RPC_ENTRY NdrRpcSmClientFree(void *NodeToFree)
RPCRTAPI void *RPC_ENTRY NdrRpcSmClientAllocate(SIZE_T Size) __WINE_ALLOC_SIZE(1)

Referenced by do_ndr_async_client_call(), and do_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 225 of file ndr_contexthandle.c.

228{
229 TRACE("(%p %p %p)\n", SContext, pBuff, userRunDownIn);
231 userRunDownIn, NULL, RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
232}
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 250 of file ndr_contexthandle.c.

255{
256 RpcBinding *binding = hBinding;
258 ndr_context_handle *ndr = pBuff;
259
260 TRACE("(%p %p %p %p %p %u)\n",
261 hBinding, SContext, pBuff, userRunDownIn, CtxGuard, Flags);
262
263 if (!binding->server || !binding->Assoc)
265
266 if (SContext->userContext)
267 {
268 status = RpcServerAssoc_UpdateContextHandle(binding->Assoc, SContext, CtxGuard, userRunDownIn);
269 if (status != RPC_S_OK)
271 ndr->attributes = 0;
272 RpcContextHandle_GetUuid(SContext, &ndr->uuid);
273
276 }
277 else
278 {
279 if (!RpcContextHandle_IsGuardCorrect(SContext, CtxGuard))
281 memset(ndr, 0, sizeof(*ndr));
282
284 /* Note: release the context handle twice in this case to release
285 * one ref being kept around for the data and one ref for the
286 * unmarshall/marshall sequence */
287 if (!RpcServerAssoc_ReleaseContextHandle(binding->Assoc, SContext, TRUE))
288 return; /* this is to cope with the case of the data not being valid
289 * before and so not having a further reference */
291 }
292}
void RpcContextHandle_GetUuid(NDR_SCONTEXT SContext, UUID *uuid)
Definition: rpc_assoc.c:541
RPC_STATUS RpcServerAssoc_UpdateContextHandle(RpcAssoc *assoc, NDR_SCONTEXT SContext, void *CtxGuard, NDR_RUNDOWN rundown_routine)
Definition: rpc_assoc.c:515
BOOL RpcContextHandle_IsGuardCorrect(NDR_SCONTEXT SContext, void *CtxGuard)
Definition: rpc_assoc.c:481
unsigned int RpcServerAssoc_ReleaseContextHandle(RpcAssoc *assoc, NDR_SCONTEXT SContext, BOOL release_lock)
Definition: rpc_assoc.c:563
void RPCRT4_RemoveThreadContextHandle(NDR_SCONTEXT SContext) DECLSPEC_HIDDEN
Definition: rpcrt4_main.c:995
struct _RpcAssoc * Assoc
Definition: rpc_binding.h:137

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 237 of file ndr_contexthandle.c.

241{
242 TRACE("(%p %p %p %p)\n", hBinding, SContext, pBuff, userRunDownIn);
243 NDRSContextMarshall2(hBinding, SContext, pBuff, userRunDownIn, NULL,
245}

◆ NDRSContextUnmarshall()

RPCRTAPI NDR_SCONTEXT RPC_ENTRY NDRSContextUnmarshall ( void pBuff,
ULONG  DataRepresentation 
)

Definition at line 297 of file ndr_contexthandle.c.

299{
300 TRACE("(%p %08x)\n", pBuff, DataRepresentation);
302 DataRepresentation, NULL,
304}

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 321 of file ndr_contexthandle.c.

325{
326 RpcBinding *binding = hBinding;
327 NDR_SCONTEXT SContext;
329 const ndr_context_handle *context_ndr = pBuff;
330
331 TRACE("(%p %p %08x %p %u)\n",
332 hBinding, pBuff, DataRepresentation, CtxGuard, Flags);
333
334 if (!binding->server || !binding->Assoc)
336
337 if (!pBuff || (!context_ndr->attributes &&
338 UuidIsNil((UUID *)&context_ndr->uuid, &status)))
340 &SContext);
341 else
342 {
343 if (context_ndr->attributes)
344 {
345 ERR("non-null attributes 0x%x\n", context_ndr->attributes);
347 }
348 else
350 &context_ndr->uuid,
351 CtxGuard, Flags,
352 &SContext);
353 }
354
355 if (status != RPC_S_OK)
357
359 return SContext;
360}
RPC_STATUS RpcServerAssoc_FindContextHandle(RpcAssoc *assoc, const UUID *uuid, void *CtxGuard, ULONG Flags, NDR_SCONTEXT *SContext)
Definition: rpc_assoc.c:487
RPC_STATUS RpcServerAssoc_AllocateContextHandle(RpcAssoc *assoc, void *CtxGuard, NDR_SCONTEXT *SContext)
Definition: rpc_assoc.c:456
void RPCRT4_PushThreadContextHandle(NDR_SCONTEXT SContext) DECLSPEC_HIDDEN
Definition: rpcrt4_main.c:980
int WINAPI UuidIsNil(UUID *Uuid, RPC_STATUS *Status)
Definition: rpcrt4_main.c:268

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 309 of file ndr_contexthandle.c.

312{
313 TRACE("(%p %p %08x)\n", hBinding, pBuff, DataRepresentation);
314 return NDRSContextUnmarshall2(hBinding, pBuff, DataRepresentation, NULL,
316}

◆ NdrSendReceive()

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

Definition at line 197 of file ndr_clientserver.c.

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

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

◆ NdrServerCall()

RPCRTAPI void RPC_ENTRY NdrServerCall ( PRPC_MESSAGE  pRpcMsg)

Definition at line 1589 of file ndr_stubless.c.

1590{
1591 DWORD phase;
1592 NdrStubCall( NULL, NULL, msg, &phase );
1593}
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 1571 of file ndr_stubless.c.

1572{
1573 DWORD dwPhase;
1574 NdrStubCall2(NULL, NULL, pRpcMsg, &dwPhase);
1575}
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 1598 of file ndr_stubless.c.

1599{
1600 FIXME("%p stub\n", msg);
1601}

◆ NdrServerContextMarshall()

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

Definition at line 7101 of file ndr_marshall.c.

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

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 7176 of file ndr_marshall.c.

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

Referenced by NdrContextHandleMarshall().

◆ NdrServerContextNewUnmarshall()

RPCRTAPI NDR_SCONTEXT RPC_ENTRY NdrServerContextNewUnmarshall ( PMIDL_STUB_MESSAGE  pStubMsg,
PFORMAT_STRING  pFormat 
)

Definition at line 7210 of file ndr_marshall.c.

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

Referenced by NdrContextHandleUnmarshall().

◆ NdrServerContextUnmarshall()

RPCRTAPI NDR_SCONTEXT RPC_ENTRY NdrServerContextUnmarshall ( PMIDL_STUB_MESSAGE  pStubMsg)

Definition at line 7122 of file ndr_marshall.c.

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

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 108 of file ndr_clientserver.c.

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

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 1652 of file ndr_marshall.c.

1654{
1655 NdrBaseTypeMarshall(pStubMsg, pMemory, &FormatChar);
1656}
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 1667 of file ndr_marshall.c.

1669{
1670#define BASE_TYPE_UNMARSHALL(type) \
1671 align_pointer(&pStubMsg->Buffer, sizeof(type)); \
1672 TRACE("pMemory: %p\n", pMemory); \
1673 *(type *)pMemory = *(type *)pStubMsg->Buffer; \
1674 pStubMsg->Buffer += sizeof(type);
1675
1676 switch(FormatChar)
1677 {
1678 case FC_BYTE:
1679 case FC_CHAR:
1680 case FC_SMALL:
1681 case FC_USMALL:
1683 TRACE("value: 0x%02x\n", *pMemory);
1684 break;
1685 case FC_WCHAR:
1686 case FC_SHORT:
1687 case FC_USHORT:
1689 TRACE("value: 0x%04x\n", *(USHORT *)pMemory);
1690 break;
1691 case FC_LONG:
1692 case FC_ULONG:
1693 case FC_ERROR_STATUS_T:
1694 case FC_ENUM32:
1696 TRACE("value: 0x%08x\n", *(ULONG *)pMemory);
1697 break;
1698 case FC_FLOAT:
1699 BASE_TYPE_UNMARSHALL(float);
1700 TRACE("value: %f\n", *(float *)pMemory);
1701 break;
1702 case FC_DOUBLE:
1703 BASE_TYPE_UNMARSHALL(double);
1704 TRACE("value: %f\n", *(double *)pMemory);
1705 break;
1706 case FC_HYPER:
1708 TRACE("value: %s\n", wine_dbgstr_longlong(*(ULONGLONG *)pMemory));
1709 break;
1710 case FC_ENUM16:
1711 align_pointer(&pStubMsg->Buffer, sizeof(USHORT));
1712 TRACE("pMemory: %p\n", pMemory);
1713 /* 16-bits on the wire, but int in memory */
1714 *(UINT *)pMemory = *(USHORT *)pStubMsg->Buffer;
1715 pStubMsg->Buffer += sizeof(USHORT);
1716 TRACE("value: 0x%08x\n", *(UINT *)pMemory);
1717 break;
1718 case FC_INT3264:
1719 align_pointer(&pStubMsg->Buffer, sizeof(INT));
1720 /* 32-bits on the wire, but int_ptr in memory */
1721 *(INT_PTR *)pMemory = *(INT *)pStubMsg->Buffer;
1722 pStubMsg->Buffer += sizeof(INT);
1723 TRACE("value: 0x%08lx\n", *(INT_PTR *)pMemory);
1724 break;
1725 case FC_UINT3264:
1726 align_pointer(&pStubMsg->Buffer, sizeof(UINT));
1727 /* 32-bits on the wire, but int_ptr in memory */
1728 *(UINT_PTR *)pMemory = *(UINT *)pStubMsg->Buffer;
1729 pStubMsg->Buffer += sizeof(UINT);
1730 TRACE("value: 0x%08lx\n", *(UINT_PTR *)pMemory);
1731 break;
1732 case FC_IGNORE:
1733 break;
1734 default:
1735 FIXME("Unhandled base type: 0x%02x\n", FormatChar);
1736 }
1737#undef BASE_TYPE_UNMARSHALL
1738}
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 1580 of file ndr_stubless.c.

1582{
1583 return NdrStubCall2( This, channel, msg, phase );
1584}

Referenced by NdrServerCall().

◆ NdrStubCall2()

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

Definition at line 1305 of file ndr_stubless.c.

1310{
1311 const MIDL_SERVER_INFO *pServerInfo;
1312 const MIDL_STUB_DESC *pStubDesc;
1313 PFORMAT_STRING pFormat;
1314 MIDL_STUB_MESSAGE stubMsg;
1315 /* pointer to start of stack to pass into stub implementation */
1316 unsigned char * args;
1317 /* size of stack */
1318 unsigned short stack_size;
1319 /* number of parameters. optional for client to give it to us */
1320 unsigned int number_of_params;
1321 /* cache of Oif_flags from v2 procedure header */
1322 INTERPRETER_OPT_FLAGS Oif_flags = { 0 };
1323 /* cache of extension flags from NDR_PROC_HEADER_EXTS */
1324 INTERPRETER_OPT_FLAGS2 ext_flags = { 0 };
1325 /* the type of pass we are currently doing */
1326 enum stubless_phase phase;
1327 /* header for procedure string */
1328 const NDR_PROC_HEADER *pProcHeader;
1329 /* location to put retval into */
1330 LONG_PTR *retval_ptr = NULL;
1331 /* correlation cache */
1332 ULONG_PTR NdrCorrCache[256];
1333 unsigned short BindingHandleOffset = (USHORT)-1;
1334
1335 TRACE("pThis %p, pChannel %p, pRpcMsg %p, pdwStubPhase %p\n", pThis, pChannel, pRpcMsg, pdwStubPhase);
1336
1337 if (pThis)
1338 pServerInfo = CStdStubBuffer_GetServerInfo(pThis);
1339 else
1340 pServerInfo = ((RPC_SERVER_INTERFACE *)pRpcMsg->RpcInterfaceInformation)->InterpreterInfo;
1341
1342 pStubDesc = pServerInfo->pStubDesc;
1343 pFormat = pServerInfo->ProcString + pServerInfo->FmtStringOffset[pRpcMsg->ProcNum];
1344 pProcHeader = (const NDR_PROC_HEADER *)&pFormat[0];
1345
1346 TRACE("NDR Version: 0x%x\n", pStubDesc->Version);
1347
1348 if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
1349 {
1350 const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0];
1351 stack_size = header_rpc->stack_size;
1352 pFormat += sizeof(NDR_PROC_HEADER_RPC);
1353
1354 }
1355 else
1356 {
1357 stack_size = pProcHeader->stack_size;
1358 pFormat += sizeof(NDR_PROC_HEADER);
1359 }
1360
1361 TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags);
1362
1363 /* binding */
1364 switch (pProcHeader->handle_type)
1365 {
1366 /* explicit binding: parse additional section */
1367 case 0:
1368 switch (*pFormat) /* handle_type */
1369 {
1370 case FC_BIND_PRIMITIVE: /* explicit primitive */
1371 BindingHandleOffset = ((NDR_EHD_PRIMITIVE*)pFormat)->offset;
1372 pFormat += sizeof(NDR_EHD_PRIMITIVE);
1373 break;
1374 case FC_BIND_GENERIC: /* explicit generic */
1375 BindingHandleOffset = ((NDR_EHD_GENERIC*)pFormat)->offset;
1376 pFormat += sizeof(NDR_EHD_GENERIC);
1377 break;
1378 case FC_BIND_CONTEXT: /* explicit context */
1379 BindingHandleOffset = ((NDR_EHD_CONTEXT*)pFormat)->offset;
1380 pFormat += sizeof(NDR_EHD_CONTEXT);
1381 break;
1382 default:
1383 ERR("bad explicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
1385 }
1386 break;
1387 case FC_BIND_GENERIC: /* implicit generic */
1388 case FC_BIND_PRIMITIVE: /* implicit primitive */
1389 case FC_CALLBACK_HANDLE: /* implicit callback */
1390 case FC_AUTO_HANDLE: /* implicit auto handle */
1391 break;
1392 default:
1393 ERR("bad implicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
1395 }
1396
1397 if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
1398 NdrStubInitialize(pRpcMsg, &stubMsg, pStubDesc, pChannel);
1399 else
1400 NdrServerInitializeNew(pRpcMsg, &stubMsg, pStubDesc);
1401
1402 /* create the full pointer translation tables, if requested */
1403 if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
1405
1406 /* store the RPC flags away */
1407 if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
1408 pRpcMsg->RpcFlags = ((const NDR_PROC_HEADER_RPC *)pProcHeader)->rpc_flags;
1409
1410 /* use alternate memory allocation routines */
1411 if (pProcHeader->Oi_flags & Oi_RPCSS_ALLOC_USED)
1412#if 0
1413 NdrRpcSsEnableAllocate(&stubMsg);
1414#else
1415 FIXME("Set RPCSS memory allocation routines\n");
1416#endif
1417
1418 TRACE("allocating memory for stack of size %x\n", stack_size);
1419
1421 stubMsg.StackTop = args; /* used by conformance of top-level objects */
1422
1423 /* add the implicit This pointer as the first arg to the function if we
1424 * are calling an object method */
1425 if (pThis)
1426 *(void **)args = ((CStdStubBuffer *)pThis)->pvServerObject;
1427
1428 /* add the binding handle to the stack if we are using explicit binding handles */
1429 if (BindingHandleOffset != (USHORT)-1)
1430 *(RPC_BINDING_HANDLE*)&(args[BindingHandleOffset]) = pRpcMsg->Handle;
1431
1432 if (is_oicf_stubdesc(pStubDesc))
1433 {
1434 const NDR_PROC_PARTIAL_OIF_HEADER *pOIFHeader = (const NDR_PROC_PARTIAL_OIF_HEADER *)pFormat;
1435
1436 Oif_flags = pOIFHeader->Oi2Flags;
1437 number_of_params = pOIFHeader->number_of_params;
1438
1439 pFormat += sizeof(NDR_PROC_PARTIAL_OIF_HEADER);
1440
1441 TRACE("Oif_flags = %s\n", debugstr_INTERPRETER_OPT_FLAGS(Oif_flags) );
1442
1443 if (Oif_flags.HasExtensions)
1444 {
1445 const NDR_PROC_HEADER_EXTS *pExtensions = (const NDR_PROC_HEADER_EXTS *)pFormat;
1446 ext_flags = pExtensions->Flags2;
1447 pFormat += pExtensions->Size;
1448 }
1449
1450 if (Oif_flags.HasPipes)
1451 {
1452 FIXME("pipes not supported yet\n");
1453 RpcRaiseException(RPC_X_WRONG_STUB_VERSION); /* FIXME: remove when implemented */
1454 /* init pipes package */
1455 /* NdrPipesInitialize(...) */
1456 }
1457 if (ext_flags.HasNewCorrDesc)
1458 {
1459 /* initialize extra correlation package */
1460 NdrCorrelationInitialize(&stubMsg, NdrCorrCache, sizeof(NdrCorrCache), 0);
1461 if (ext_flags.Unused & 0x2) /* has range on conformance */
1462 stubMsg.CorrDespIncrement = 12;
1463 }
1464 }
1465 else
1466 {
1467 pFormat = convert_old_args( &stubMsg, pFormat, stack_size,
1468 pProcHeader->Oi_flags & Oi_OBJECT_PROC,
1469 /* reuse the correlation cache, it's not needed for v1 format */
1470 NdrCorrCache, sizeof(NdrCorrCache), &number_of_params );
1471 }
1472
1473 /* convert strings, floating point values and endianness into our
1474 * preferred format */
1475 if ((pRpcMsg->DataRepresentation & 0x0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION)
1476 NdrConvert(&stubMsg, pFormat);
1477
1478 for (phase = STUBLESS_UNMARSHAL; phase <= STUBLESS_FREE; phase++)
1479 {
1480 TRACE("phase = %d\n", phase);
1481 switch (phase)
1482 {
1484 /* call the server function */
1485 if (pServerInfo->ThunkTable && pServerInfo->ThunkTable[pRpcMsg->ProcNum])
1486 pServerInfo->ThunkTable[pRpcMsg->ProcNum](&stubMsg);
1487 else
1488 {
1490 LONG_PTR retval;
1491
1492 if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
1493 {
1494 SERVER_ROUTINE *vtbl = *(SERVER_ROUTINE **)((CStdStubBuffer *)pThis)->pvServerObject;
1495 func = vtbl[pRpcMsg->ProcNum];
1496 }
1497 else
1498 func = pServerInfo->DispatchTable[pRpcMsg->ProcNum];
1499
1500 /* FIXME: what happens with return values that don't fit into a single register on x86? */
1501 retval = call_server_func(func, args, stack_size);
1502
1503 if (retval_ptr)
1504 {
1505 TRACE("stub implementation returned 0x%lx\n", retval);
1506 *retval_ptr = retval;
1507 }
1508 else
1509 TRACE("void stub implementation\n");
1510 }
1511
1512 stubMsg.Buffer = NULL;
1513 stubMsg.BufferLength = 0;
1514
1515 break;
1516 case STUBLESS_GETBUFFER:
1517 if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
1518 NdrStubGetBuffer(pThis, pChannel, &stubMsg);
1519 else
1520 {
1522
1523 pRpcMsg->BufferLength = stubMsg.BufferLength;
1524 /* allocate buffer for [out] and [ret] params */
1525 Status = I_RpcGetBuffer(pRpcMsg);
1526 if (Status)
1528 stubMsg.Buffer = pRpcMsg->Buffer;
1529 }
1530 break;
1531 case STUBLESS_UNMARSHAL:
1532 case STUBLESS_INITOUT:
1533 case STUBLESS_CALCSIZE:
1534 case STUBLESS_MARSHAL:
1535 case STUBLESS_MUSTFREE:
1536 case STUBLESS_FREE:
1537 retval_ptr = stub_do_args(&stubMsg, pFormat, phase, number_of_params);
1538 break;
1539 default:
1540 ERR("shouldn't reach here. phase %d\n", phase);
1541 break;
1542 }
1543 }
1544
1545 pRpcMsg->BufferLength = (unsigned int)(stubMsg.Buffer - (unsigned char *)pRpcMsg->Buffer);
1546
1547 if (ext_flags.HasNewCorrDesc)
1548 {
1549 /* free extra correlation package */
1550 NdrCorrelationFree(&stubMsg);
1551 }
1552
1553 if (Oif_flags.HasPipes)
1554 {
1555 /* NdrPipesDone(...) */
1556 }
1557
1558 /* free the full pointer translation tables */
1559 if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
1561
1562 /* free server function stack */
1564
1565 return S_OK;
1566}
const MIDL_SERVER_INFO * CStdStubBuffer_GetServerInfo(IRpcStubBuffer *iface) DECLSPEC_HIDDEN
Definition: cstub.c:615
void WINAPI NdrStubGetBuffer(LPRPCSTUBBUFFER iface, LPRPCCHANNELBUFFER pRpcChannelBuffer, PMIDL_STUB_MESSAGE pStubMsg)
Definition: cstub.c:654
void WINAPI NdrStubInitialize(PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDescriptor, LPRPCCHANNELBUFFER pRpcChannelBuffer)
Definition: cstub.c:638
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
void WINAPI NdrFullPointerXlatFree(PFULL_PTR_XLAT_TABLES pXlatTables)
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)()
Definition: rpcndr.h:416
uint32_t ULONG_PTR
Definition: typedefs.h:65

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 121 of file ndr_contexthandle.c.

122{
124 struct context_handle_entry *che = NULL;
125
126 TRACE("(%p)\n", ContextHandle);
127
129 che = get_context_entry(*ContextHandle);
130 *ContextHandle = NULL;
131 if (che)
132 {
134 list_remove(&che->entry);
135 }
136
138
139 if (che)
140 {
141 RpcBindingFree(&che->handle);
142 HeapFree(GetProcessHeap(), 0, che);
143 }
144
145 return status;
146}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:787
struct list entry

Referenced by RpcSsDestroyClientContext().

◆ RpcSsDestroyClientContext()

RPCRTAPI void RPC_ENTRY RpcSsDestroyClientContext ( void **  ContextHandle)

Definition at line 151 of file ndr_contexthandle.c.

152{
154 if (status != RPC_S_OK)
156}
RPC_STATUS WINAPI RpcSmDestroyClientContext(void **ContextHandle)