ReactOS  0.4.14-dev-614-gbfd8a84
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 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 RPC_S_INVALID_BOUND
Definition: winerror.h:1043
#define RpcExceptionCode()
Definition: rpc.h:132
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:228
#define STATUS_DATATYPE_MISALIGNMENT
Definition: ntstatus.h:171
#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 \
MIDL_STUB_MESSAGE * pStubMsg
Definition: ndr_stubless.h:231
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define RPCRTAPI
Definition: rpc.h:82
const unsigned char * PFORMAT_STRING
Definition: rpcndr.h:176
#define BufferSize
Definition: classpnp.h:419
static CONST DWORD MemorySize[]
Definition: svga.c:32
unsigned int ULONG
Definition: retypes.h:1

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
MIDL_STUB_MESSAGE * pStubMsg
Definition: ndr_stubless.h:231
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
const unsigned char * PFORMAT_STRING
Definition: rpcndr.h:176

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 492 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 171 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.

◆ STUB_PHASE

Enumerator
STUB_UNMARSHAL 
STUB_CALL_SERVER 
STUB_MARSHAL 
STUB_CALL_SERVER_NO_HRESULT 

Definition at line 447 of file rpcndr.h.

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

◆ 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

Function Documentation

◆ MIDL_user_allocate()

◆ MIDL_user_free()

void __RPC_USER MIDL_user_free ( void )

Definition at line 376 of file irotp.c.

377 {
378  HeapFree(GetProcessHeap(), 0, p);
379 }
#define GetProcessHeap()
Definition: compat.h:403
GLfloat GLfloat p
Definition: glext.h:8902
#define HeapFree(x, y, z)
Definition: compat.h:402

Referenced by DsAddressToSiteNamesExW(), DsAddressToSiteNamesW(), DsGetDcSiteCoverageW(), free_pyramid_doub_carr(), IrotEnumRunning(), IrotRevoke(), LsaEnumerateAccountRights(), LsaEnumerateAccounts(), LsaEnumerateAccountsWithUserRight(), LsaEnumeratePrivileges(), LsaEnumerateTrustedDomains(), LsaEnumerateTrustedDomainsEx(), LsaGetRemoteUserName(), LsaGetUserName(), LsaLookupNames(), LsaLookupNames2(), LsaLookupPrivilegeDisplayName(), LsaLookupPrivilegeName(), LsaLookupSids(), 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 1918 of file ndr_stubless.c.

1919 {
1921  LONG_PTR ret;
1922 
1924  ret = ndr_async_client_call( desc, format, va_arg( args, void ** ));
1925  __ms_va_end( args );
1926  return *(CLIENT_CALL_RETURN *)&ret;
1927 }
static static const char __ms_va_list
Definition: printf.c:76
Definition: match.c:390
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
static const WCHAR desc[]
Definition: protectdata.c:36
LONG_PTR CDECL DECLSPEC_HIDDEN ndr_async_client_call(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, void **stack_top)
int ret
#define va_arg(ap, T)
Definition: acmsvcex.h:89
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define __ms_va_end(list)
Definition: windef.h:458
#define __ms_va_start(list, arg)
Definition: windef.h:457
#define args
Definition: format.c:66

◆ NdrAsyncServerCall()

RPCRTAPI void RPC_ENTRY NdrAsyncServerCall ( PRPC_MESSAGE  pRpcMsg)

Definition at line 1939 of file ndr_stubless.c.

1940 {
1941  const MIDL_SERVER_INFO *pServerInfo;
1942  const MIDL_STUB_DESC *pStubDesc;
1943  PFORMAT_STRING pFormat;
1944  /* pointer to start of stack to pass into stub implementation */
1945  unsigned char *args;
1946  /* header for procedure string */
1949  PRPC_ASYNC_STATE pAsync;
1951 
1952  TRACE("%p\n", pRpcMsg);
1953 
1954  pServerInfo = ((RPC_SERVER_INTERFACE *)pRpcMsg->RpcInterfaceInformation)->InterpreterInfo;
1955 
1956  pStubDesc = pServerInfo->pStubDesc;
1957  pFormat = pServerInfo->ProcString + pServerInfo->FmtStringOffset[pRpcMsg->ProcNum];
1958  pProcHeader = (const NDR_PROC_HEADER *)&pFormat[0];
1959 
1960  TRACE("NDR Version: 0x%x\n", pStubDesc->Version);
1961 
1965 
1967  *(PRPC_MESSAGE)(async_call_data->pStubMsg + 1) = *pRpcMsg;
1968 
1970  {
1971  const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0];
1972  async_call_data->stack_size = header_rpc->stack_size;
1973  pFormat += sizeof(NDR_PROC_HEADER_RPC);
1974  }
1975  else
1976  {
1978  pFormat += sizeof(NDR_PROC_HEADER);
1979  }
1980 
1981  TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags);
1982 
1983  /* binding */
1984  switch (pProcHeader->handle_type)
1985  {
1986  /* explicit binding: parse additional section */
1987  case 0:
1988  switch (*pFormat) /* handle_type */
1989  {
1990  case FC_BIND_PRIMITIVE: /* explicit primitive */
1991  pFormat += sizeof(NDR_EHD_PRIMITIVE);
1992  break;
1993  case FC_BIND_GENERIC: /* explicit generic */
1994  pFormat += sizeof(NDR_EHD_GENERIC);
1995  break;
1996  case FC_BIND_CONTEXT: /* explicit context */
1997  pFormat += sizeof(NDR_EHD_CONTEXT);
1998  break;
1999  default:
2000  ERR("bad explicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
2002  }
2003  break;
2004  case FC_BIND_GENERIC: /* implicit generic */
2005  case FC_BIND_PRIMITIVE: /* implicit primitive */
2006  case FC_CALLBACK_HANDLE: /* implicit callback */
2007  case FC_AUTO_HANDLE: /* implicit auto handle */
2008  break;
2009  default:
2010  ERR("bad implicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
2012  }
2013 
2015  {
2016  ERR("objects not supported\n");
2019  }
2020 
2021  NdrServerInitializeNew(pRpcMsg, async_call_data->pStubMsg, pStubDesc);
2022 
2023  /* create the full pointer translation tables, if requested */
2026 
2027  /* use alternate memory allocation routines */
2029 #if 0
2030  NdrRpcSsEnableAllocate(&stubMsg);
2031 #else
2032  FIXME("Set RPCSS memory allocation routines\n");
2033 #endif
2034 
2035  TRACE("allocating memory for stack of size %x\n", async_call_data->stack_size);
2036 
2038  async_call_data->pStubMsg->StackTop = args; /* used by conformance of top-level objects */
2039 
2040  pAsync = I_RpcAllocate(sizeof(*pAsync));
2041  if (!pAsync) RpcRaiseException(RPC_X_NO_MEMORY);
2042 
2043  status = RpcAsyncInitializeHandle(pAsync, sizeof(*pAsync));
2044  if (status != RPC_S_OK)
2046 
2047  pAsync->StubInfo = async_call_data;
2048  TRACE("pAsync %p, pAsync->StubInfo %p, pFormat %p\n", pAsync, pAsync->StubInfo, async_call_data->pHandleFormat);
2049 
2050  /* add the implicit pAsync pointer as the first arg to the function */
2051  *(void **)args = pAsync;
2052 
2053  if (is_oicf_stubdesc(pStubDesc))
2054  {
2055  const NDR_PROC_PARTIAL_OIF_HEADER *pOIFHeader = (const NDR_PROC_PARTIAL_OIF_HEADER *)pFormat;
2056  /* cache of Oif_flags from v2 procedure header */
2057  INTERPRETER_OPT_FLAGS Oif_flags;
2058  /* cache of extension flags from NDR_PROC_HEADER_EXTS */
2059  INTERPRETER_OPT_FLAGS2 ext_flags = { 0 };
2060 
2061  Oif_flags = pOIFHeader->Oi2Flags;
2063 
2064  pFormat += sizeof(NDR_PROC_PARTIAL_OIF_HEADER);
2065 
2066  TRACE("Oif_flags = %s\n", debugstr_INTERPRETER_OPT_FLAGS(Oif_flags) );
2067 
2068  if (Oif_flags.HasExtensions)
2069  {
2070  const NDR_PROC_HEADER_EXTS *pExtensions = (const NDR_PROC_HEADER_EXTS *)pFormat;
2071  ext_flags = pExtensions->Flags2;
2072  pFormat += pExtensions->Size;
2073  }
2074 
2075  if (Oif_flags.HasPipes)
2076  {
2077  FIXME("pipes not supported yet\n");
2078  RpcRaiseException(RPC_X_WRONG_STUB_VERSION); /* FIXME: remove when implemented */
2079  /* init pipes package */
2080  /* NdrPipesInitialize(...) */
2081  }
2082  if (ext_flags.HasNewCorrDesc)
2083  {
2084  /* initialize extra correlation package */
2086  if (ext_flags.Unused & 0x2) /* has range on conformance */
2088  }
2089  }
2090  else
2091  {
2094  /* reuse the correlation cache, it's not needed for v1 format */
2096  }
2097 
2098  /* convert strings, floating point values and endianness into our
2099  * preferred format */
2100  if ((pRpcMsg->DataRepresentation & 0x0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION)
2101  NdrConvert(async_call_data->pStubMsg, pFormat);
2102 
2103  async_call_data->pHandleFormat = pFormat;
2104 
2105  /* 1. UNMARSHAL */
2106  TRACE("UNMARSHAL\n");
2108 
2109  /* 2. INITOUT */
2110  TRACE("INITOUT\n");
2112 
2113  /* 3. CALLSERVER */
2114  TRACE("CALLSERVER\n");
2115  if (pServerInfo->ThunkTable && pServerInfo->ThunkTable[pRpcMsg->ProcNum])
2116  pServerInfo->ThunkTable[pRpcMsg->ProcNum](async_call_data->pStubMsg);
2117  else
2119 }
unsigned short stack_size
Definition: ndr_stubless.h:93
void * RpcInterfaceInformation
Definition: rpcdcep.h:44
#define RPC_X_NO_MEMORY
Definition: rpcnterr.h:35
ULONG_PTR NdrCorrCache[256]
Definition: ndr_stubless.h:243
MIDL_STUB_MESSAGE * pStubMsg
Definition: ndr_stubless.h:231
struct _NDR_EHD_GENERIC NDR_EHD_GENERIC
void WINAPI I_RpcFree(void *Object)
Definition: rpcrt4_main.c:722
INTERPRETER_OPT_FLAGS2 Flags2
Definition: ndrtypes.h:99
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
const SERVER_ROUTINE * DispatchTable
Definition: rpcndr.h:422
unsigned char *WINAPI NdrServerInitializeNew(PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc)
const unsigned short * FmtStringOffset
Definition: rpcndr.h:424
struct _FULL_PTR_XLAT_TABLES * FullPtrXlatTables
Definition: rpcndr.h:231
unsigned char Unused
Definition: ndrtypes.h:89
void WINAPI NdrConvert(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
#define Oi_RPCSS_ALLOC_USED
Definition: ndrtypes.h:291
unsigned int number_of_params
Definition: ndr_stubless.h:239
Definition: match.c:390
long RPC_STATUS
Definition: rpc.h:52
RPC_STATUS WINAPI RpcAsyncInitializeHandle(PRPC_ASYNC_STATE pAsync, unsigned int Size)
Definition: rpc_async.c:57
void * StubInfo
Definition: rpcasync.h:150
PFORMAT_STRING ProcString
Definition: rpcndr.h:423
struct _RPC_MESSAGE * PRPC_MESSAGE
#define FIXME(fmt,...)
Definition: debug.h:110
INTERPRETER_OPT_FLAGS Oi2Flags
Definition: ndr_stubless.h:107
unsigned int ProcNum
Definition: rpcdcep.h:42
LONG_PTR * retval_ptr
Definition: ndr_stubless.h:241
void WINAPI NdrCorrelationInitialize(PMIDL_STUB_MESSAGE pStubMsg, void *pMemory, ULONG CacheSize, ULONG Flags)
#define Oi_FULL_PTR_USED
Definition: ndrtypes.h:290
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:586
struct _NDR_EHD_CONTEXT NDR_EHD_CONTEXT
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned char handle_type
Definition: ndr_stubless.h:43
struct _NDR_PROC_HEADER NDR_PROC_HEADER
unsigned char HasPipes
Definition: ndrtypes.h:64
const unsigned char * PFORMAT_STRING
Definition: rpcndr.h:176
unsigned short stack_size
Definition: ndr_stubless.h:237
struct _NDR_PROC_PARTIAL_OIF_HEADER NDR_PROC_PARTIAL_OIF_HEADER
unsigned char HasNewCorrDesc
Definition: ndrtypes.h:76
#define Oi_HAS_RPCFLAGS
Definition: ndrtypes.h:293
const STUB_THUNK * ThunkTable
Definition: rpcndr.h:425
static LONG_PTR * stub_do_args(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat, enum stubless_phase phase, unsigned short number_of_params)
unsigned char Oi_flags
Definition: ndr_stubless.h:64
#define ERR(fmt,...)
Definition: debug.h:109
unsigned short stack_size
Definition: ndr_stubless.h:71
RPCRTAPI void RPC_ENTRY NdrRpcSsEnableAllocate(PMIDL_STUB_MESSAGE pMessage)
static const char * debugstr_INTERPRETER_OPT_FLAGS(INTERPRETER_OPT_FLAGS Oi2Flags)
Definition: ndr_stubless.c:255
#define NDR_LOCAL_DATA_REPRESENTATION
Definition: rpcndr.h:107
PFULL_PTR_XLAT_TABLES WINAPI NdrFullPointerXlatInit(ULONG NumberOfPointers, XLAT_SIDE XlatSide)
struct _NDR_PROC_HEADER_RPC NDR_PROC_HEADER_RPC
unsigned char * StackTop
Definition: rpcndr.h:226
ULONG Version
Definition: rpcndr.h:376
#define Oi_OBJECT_PROC
Definition: ndrtypes.h:292
#define RPC_X_WRONG_STUB_VERSION
Definition: winerror.h:1136
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3706
const NDR_PROC_HEADER * pProcHeader
Definition: ndr_stubless.h:232
unsigned char CorrDespIncrement
Definition: rpcndr.h:218
struct _NDR_EHD_PRIMITIVE NDR_EHD_PRIMITIVE
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090
PMIDL_STUB_DESC pStubDesc
Definition: rpcndr.h:421
LONG_PTR __cdecl call_server_func(SERVER_ROUTINE func, unsigned char *args, unsigned short stack_size)
unsigned char HasExtensions
Definition: ndrtypes.h:68
struct _MIDL_STUB_MESSAGE * PMIDL_STUB_MESSAGE
ULONG DataRepresentation
Definition: rpcdcep.h:39
static SERVICE_STATUS status
Definition: service.c:31
#define args
Definition: format.c:66
void *WINAPI I_RpcAllocate(unsigned int Size)
Definition: rpcrt4_main.c:714
static BOOL is_oicf_stubdesc(const PMIDL_STUB_DESC pStubDesc)
Definition: ndr_stubless.c:50
#define RPC_S_OK
Definition: rpcnterr.h:22
unsigned char Size
Definition: ndrtypes.h:97
PFORMAT_STRING pHandleFormat
Definition: ndr_stubless.h:233
Definition: ps.c:97

◆ NdrAsyncStubCall()

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

Definition at line 1931 of file ndr_stubless.c.

1934 {
1935  FIXME("unimplemented, expect crash!\n");
1936  return 0;
1937 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416

◆ 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 }
#define RPC_X_SS_CONTEXT_MISMATCH
Definition: rpcnterr.h:39
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
static CRITICAL_SECTION ndr_context_cs
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static struct context_handle_entry * get_context_entry(NDR_CCONTEXT CContext)
#define ERR(fmt,...)
Definition: debug.h:109
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
RPC_BINDING_HANDLE handle

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  {
112  ndr_context_handle *wire_data = pBuff;
113  wire_data->attributes = 0;
115  }
116 }
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
static CRITICAL_SECTION ndr_context_cs
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define TRACE(s)
Definition: solgame.cpp:4
static struct context_handle_entry * get_context_entry(NDR_CCONTEXT CContext)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define GUID_NULL
Definition: ks.h:106
ndr_context_handle wire_data
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

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
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
static CRITICAL_SECTION ndr_context_cs
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
long RPC_STATUS
Definition: rpc.h:52
#define TRACE(s)
Definition: solgame.cpp:4
static RPC_STATUS ndr_update_context_handle(NDR_CCONTEXT *CContext, RPC_BINDING_HANDLE hBinding, const ndr_context_handle *chi)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

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 }
#define FIXME(fmt,...)
Definition: debug.h:110

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 1018 of file ndr_stubless.c.

1019 {
1021  LONG_PTR ret;
1022 
1024  ret = ndr_client_call( desc, format, va_arg( args, void ** ), NULL );
1025  __ms_va_end( args );
1026  return *(CLIENT_CALL_RETURN *)&ret;
1027 }
static static const char __ms_va_list
Definition: printf.c:76
Definition: match.c:390
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:846
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
static const WCHAR desc[]
Definition: protectdata.c:36
smooth NULL
Definition: ftsmooth.c:416
int ret
#define va_arg(ap, T)
Definition: acmsvcex.h:89
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define __ms_va_end(list)
Definition: windef.h:458
#define __ms_va_start(list, arg)
Definition: windef.h:457
#define args
Definition: format.c:66

◆ 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 }
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
unsigned char * Buffer
Definition: rpcndr.h:203
void WINAPI NDRCContextMarshall(NDR_CCONTEXT CContext, void *pBuff)
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
void * Buffer
Definition: rpcdcep.h:40
#define cbNDRContext
Definition: rpcndr.h:151
#define TRACE(s)
Definition: solgame.cpp:4
static void align_pointer_clear(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:103
ULONG BufferLength
Definition: rpcndr.h:207
#define ERR(fmt,...)
Definition: debug.h:109
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090

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 }
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
unsigned char * Buffer
Definition: rpcndr.h:203
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
static void align_pointer(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:97
#define cbNDRContext
Definition: rpcndr.h:151
#define TRACE(s)
Definition: solgame.cpp:4
unsigned char * BufferEnd
Definition: rpcndr.h:205
void WINAPI NDRCContextUnmarshall(NDR_CCONTEXT *CContext, RPC_BINDING_HANDLE hBinding, void *pBuff, ULONG DataRepresentation)
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090
ULONG DataRepresentation
Definition: rpcdcep.h:39

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 }
void * RpcInterfaceInformation
Definition: rpcdcep.h:44
void * RpcInterfaceInformation
Definition: rpcndr.h:362
unsigned int fInDontFree
Definition: rpcndr.h:234
#define TRUE
Definition: types.h:120
unsigned char * pCorrMemory
Definition: rpcndr.h:263
const struct _MIDL_STUB_DESC * StubDesc
Definition: rpcndr.h:230
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
unsigned char * PointerBufferMark
Definition: rpcndr.h:217
unsigned short UniquePtrCount
Definition: rpcndr.h:220
PARRAY_INFO pArrayInfo
Definition: rpcndr.h:254
int IgnoreEmbeddedPointers
Definition: rpcndr.h:216
DWORD dwDestContext
Definition: rpcndr.h:249
struct NDR_POINTER_QUEUE_STATE * pPointerQueueState
Definition: rpcndr.h:215
unsigned int ProcNum
Definition: rpcdcep.h:42
smooth NULL
Definition: ftsmooth.c:416
unsigned int fHasNewCorrDesc
Definition: rpcndr.h:239
#define TRACE(s)
Definition: solgame.cpp:4
DWORD dwStubPhase
Definition: rpcndr.h:259
void * pvDestContext
Definition: rpcndr.h:250
ULONG RpcFlags
Definition: rpcdcep.h:48
void * ReservedForRuntime
Definition: rpcdcep.h:45
unsigned char * BufferStart
Definition: rpcndr.h:204
void * pMemoryList
Definition: rpcndr.h:264
ULONG BufferLength
Definition: rpcndr.h:207
unsigned char * BufferEnd
Definition: rpcndr.h:205
unsigned int fBufferValid
Definition: rpcndr.h:243
unsigned int fIsOut
Definition: rpcndr.h:241
unsigned int fNeedMCCP
Definition: rpcndr.h:246
PNDR_ASYNC_MESSAGE pAsyncMsg
Definition: rpcndr.h:261
unsigned int fIsOicf
Definition: rpcndr.h:242
unsigned int fIsIn
Definition: rpcndr.h:240
unsigned int fInFree
Definition: rpcndr.h:245
unsigned int fDontCallFreeInst
Definition: rpcndr.h:235
#define NDR_LOCAL_DATA_REPRESENTATION
Definition: rpcndr.h:107
PNDR_CORRELATION_INFO pCorrInfo
Definition: rpcndr.h:262
unsigned char IsClient
Definition: rpcndr.h:210
struct NDR_ALLOC_ALL_NODES_CONTEXT * pAllocAllNodesContext
Definition: rpcndr.h:214
unsigned char * StackTop
Definition: rpcndr.h:226
unsigned int fHasReturn
Definition: rpcndr.h:237
unsigned int fHasMemoryValidateCallback
Definition: rpcndr.h:244
#define RPC_FLAGS_VALID_BIT
Definition: rpcdcep.h:52
unsigned char CorrDespIncrement
Definition: rpcndr.h:218
unsigned int fInOnlyParam
Definition: rpcndr.h:236
unsigned char uFlags
Definition: rpcndr.h:219
ULONG DataRepresentation
Definition: rpcdcep.h:39
ULONG FullPtrRefId
Definition: rpcndr.h:232
RPC_BINDING_HANDLE Handle
Definition: rpcdcep.h:38
struct IRpcChannelBuffer * pRpcChannelBuffer
Definition: rpcndr.h:253
unsigned int fHasExtensions
Definition: rpcndr.h:238
ULONG PointerLength
Definition: rpcndr.h:233

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 }
#define RPC_CONTEXT_HANDLE_SERIALIZE
Definition: rpcdcep.h:58
const struct _MIDL_STUB_DESC * StubDesc
Definition: rpcndr.h:230
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
#define NDR_CONTEXT_HANDLE_NOSERIALIZE
Definition: ndrtypes.h:286
RPC_SYNTAX_IDENTIFIER InterfaceId
Definition: rpcdcep.h:104
#define RPC_CONTEXT_HANDLE_DONT_SERIALIZE
Definition: rpcdcep.h:59
smooth NULL
Definition: ftsmooth.c:416
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS
Definition: rpcdcep.h:56
#define NDR_STRICT_CONTEXT_HANDLE
Definition: ndrtypes.h:285
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
unsigned int ULONG
Definition: retypes.h:1
NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding, void *pBuff, ULONG DataRepresentation, void *CtxGuard, ULONG Flags)
ULONG DataRepresentation
Definition: rpcdcep.h:39
#define NDR_CONTEXT_HANDLE_SERIALIZE
Definition: ndrtypes.h:287
RPC_BINDING_HANDLE Handle
Definition: rpcdcep.h:38

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 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110

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 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110

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 }
#define TRUE
Definition: types.h:120
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define FIXME(fmt,...)
Definition: debug.h:110
unsigned int fHasNewCorrDesc
Definition: rpcndr.h:239
unsigned char CorrDespIncrement
Definition: rpcndr.h:218

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 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 }
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
RPC_STATUS WINAPI I_RpcFreeBuffer(PRPC_MESSAGE pMsg)
Definition: rpc_message.c:1696
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int fBufferValid
Definition: rpcndr.h:243

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
struct _FULL_PTR_XLAT_TABLES::@3111 PointerToRefId
unsigned char State
Definition: rpcndr.h:471
struct _FULL_PTR_TO_REFID_ELEMENT * Next
Definition: rpcndr.h:468
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
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int ULONG
Definition: retypes.h:1
struct _FULL_PTR_XLAT_TABLES::@3110 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 int Hash(const char *)
Definition: reader.c:2257
struct _FULL_PTR_XLAT_TABLES::@3111 PointerToRefId
unsigned char State
Definition: rpcndr.h:471
struct _FULL_PTR_TO_REFID_ELEMENT * Next
Definition: rpcndr.h:468
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
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned int ULONG
Definition: retypes.h:1
static void expand_pointer_table_if_necessary(PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId)
struct _FULL_PTR_XLAT_TABLES::@3110 RefIdToPointer

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 }
static int Hash(const char *)
Definition: reader.c:2257
struct _FULL_PTR_XLAT_TABLES::@3111 PointerToRefId
unsigned char State
Definition: rpcndr.h:471
struct _FULL_PTR_TO_REFID_ELEMENT * Next
Definition: rpcndr.h:468
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
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
_Must_inspect_result_ _In_ KTMOBJECT_TYPE QueryType
Definition: nttmapi.h:404
unsigned int ULONG
Definition: retypes.h:1
static void expand_pointer_table_if_necessary(PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId)
struct _FULL_PTR_XLAT_TABLES::@3110 RefIdToPointer

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
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
_Must_inspect_result_ _In_ KTMOBJECT_TYPE QueryType
Definition: nttmapi.h:404
static void expand_pointer_table_if_necessary(PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId)
struct _FULL_PTR_XLAT_TABLES::@3110 RefIdToPointer

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 }
struct _FULL_PTR_XLAT_TABLES::@3111 PointerToRefId
struct _FULL_PTR_TO_REFID_ELEMENT * Next
Definition: rpcndr.h:468
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
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
unsigned int ULONG
Definition: retypes.h:1
struct _FULL_PTR_XLAT_TABLES::@3110 RefIdToPointer
#define HeapFree(x, y, z)
Definition: compat.h:402

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 }
struct _FULL_PTR_XLAT_TABLES::@3111 PointerToRefId
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
XLAT_SIDE XlatSide
Definition: rpcndr.h:489
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
unsigned int ULONG
Definition: retypes.h:1
struct _FULL_PTR_XLAT_TABLES::@3110 RefIdToPointer

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 }
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
#define TRUE
Definition: types.h:120
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
unsigned char * Buffer
Definition: rpcndr.h:203
RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg)
Definition: rpc_message.c:1638
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
unsigned int BufferLength
Definition: rpcdcep.h:41
long RPC_STATUS
Definition: rpc.h:52
void * Buffer
Definition: rpcdcep.h:40
#define TRACE(s)
Definition: solgame.cpp:4
ULONG BufferLength
Definition: rpcndr.h:207
unsigned int fBufferValid
Definition: rpcndr.h:243
static SERVICE_STATUS status
Definition: service.c:31
RPC_BINDING_HANDLE Handle
Definition: rpcdcep.h:38
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

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 
4623  if (umcb->Signature != USER_MARSHAL_CB_SIGNATURE)
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  }
4649  case USER_MARSHAL_CB_FREE:
4650  break;
4651  default:
4652  WARN("unrecognised CBType %d\n", umcb->CBType);
4653  }
4654 
4655  return RPC_S_OK;
4656 }
#define buffer_end
Definition: intsym.h:264
GLint level
Definition: gl.h:1546
#define WARN(fmt,...)
Definition: debug.h:111
unsigned char * Buffer
Definition: rpcndr.h:203
#define RPC_S_INVALID_ARG
Definition: rpcnterr.h:23
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
#define RPC_X_INVALID_BUFFER
Definition: rpcnterr.h:40
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
#define TRACE(s)
Definition: solgame.cpp:4
if(!(yy_init))
Definition: macro.lex.yy.c:714
GLbitfield flags
Definition: glext.h:7161
USER_MARSHAL_CB_TYPE CBType
Definition: rpcndr.h:336
#define USER_MARSHAL_CB_SIGNATURE
Definition: rpcndr.h:318
ULONG Signature
Definition: rpcndr.h:335
#define msg(x)
Definition: auth_time.c:54
PMIDL_STUB_MESSAGE pStubMsg
Definition: rpcndr.h:333
#define memset(x, y, z)
Definition: compat.h:39
#define buffer_start
Definition: intsym.h:257
struct IRpcChannelBuffer * pRpcChannelBuffer
Definition: rpcndr.h:253
#define RPC_S_OK
Definition: rpcnterr.h:22

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:
251  case RPC_S_COMM_FAILURE:
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 RPC_S_UNKNOWN_IF
Definition: winerror.h:1028
#define RPC_S_UNSUPPORTED_TRANS_SYN
Definition: winerror.h:1040
#define RPC_S_PROCNUM_OUT_OF_RANGE
Definition: winerror.h:1053
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
#define RPC_S_SERVER_UNAVAILABLE
Definition: winerror.h:1033
#define RPC_S_CALL_FAILED_DNE
Definition: winerror.h:1038
#define RPC_S_INVALID_BINDING
Definition: winerror.h:1013
#define RPC_S_PROTOCOL_ERROR
Definition: winerror.h:1039
#define RPC_S_UNSUPPORTED_TYPE
Definition: winerror.h:1041
#define TRACE(s)
Definition: solgame.cpp:4
#define RPC_S_COMM_FAILURE
Definition: winerror.h:1127
Status
Definition: gdiplustypes.h:24
#define RPC_S_SERVER_TOO_BUSY
Definition: winerror.h:1034
#define EPT_S_NOT_REGISTERED
Definition: winerror.h:1061
#define RPC_S_OK
Definition: rpcnterr.h:22

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 }
smooth NULL
Definition: ftsmooth.c:416
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
static HMODULE LoadCOM(void)
Definition: ndr_ole.c:58

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 }
static HMODULE LoadCOM(void)
Definition: ndr_ole.c:58

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:
6517  RANGE_UNMARSHALL(UCHAR, UCHAR, "%d");
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:
6527  RANGE_UNMARSHALL(USHORT, USHORT, "%u");
6528  TRACE("value: 0x%04x\n", **(USHORT **)ppMemory);
6529  break;
6530  case FC_SHORT:
6531  RANGE_UNMARSHALL(SHORT, SHORT, "%d");
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:
6540  RANGE_UNMARSHALL(ULONG, ULONG, "%u");
6541  TRACE("value: 0x%08x\n", **(ULONG **)ppMemory);
6542  break;
6543  case FC_ENUM16:
6544  RANGE_UNMARSHALL(UINT, USHORT, "%u");
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 }
ULONG high_value
char CHAR
Definition: xmlstorage.h:175
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
#define RANGE_UNMARSHALL(mem_type, wire_type, format_spec)
long LONG
Definition: pedump.c:60
short SHORT
Definition: pedump.c:59
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned char flags_type
#define RPC_S_INTERNAL_ERROR
Definition: winerror.h:1074
#define ERR(fmt,...)
Definition: debug.h:109
unsigned short USHORT
Definition: pedump.c:61
unsigned char type
unsigned int UINT
Definition: ndis.h:50
ULONG low_value
unsigned int ULONG
Definition: retypes.h:1

◆ 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 }
smooth NULL
Definition: ftsmooth.c:416
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS
Definition: rpcdcep.h:56
#define TRACE(s)
Definition: solgame.cpp:4
RPC_BINDING_HANDLE WINAPI I_RpcGetCurrentCallHandle(void)
Definition: rpc_server.c:1743
void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding, NDR_SCONTEXT SContext, void *pBuff, NDR_RUNDOWN userRunDownIn, void *CtxGuard, ULONG Flags)

◆ 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 
275  RpcServerAssoc_ReleaseContextHandle(binding->Assoc, SContext, TRUE);
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 */
290  RpcServerAssoc_ReleaseContextHandle(binding->Assoc, SContext, FALSE);
291  }
292 }
void RpcContextHandle_GetUuid(NDR_SCONTEXT SContext, UUID *uuid)
Definition: rpc_assoc.c:541
struct _RpcAssoc * Assoc
Definition: rpc_binding.h:137
#define RPC_X_SS_CONTEXT_MISMATCH
Definition: rpcnterr.h:39
#define TRUE
Definition: types.h:120
handle_t hBinding
Definition: ctx_c.c:54
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
long RPC_STATUS
Definition: rpc.h:52
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
RPC_STATUS RpcServerAssoc_UpdateContextHandle(RpcAssoc *assoc, NDR_SCONTEXT SContext, void *CtxGuard, NDR_RUNDOWN rundown_routine)
Definition: rpc_assoc.c:515
#define RPC_S_INVALID_BINDING
Definition: winerror.h:1013
#define TRACE(s)
Definition: solgame.cpp:4
void RPCRT4_RemoveThreadContextHandle(NDR_SCONTEXT SContext) DECLSPEC_HIDDEN
Definition: rpcrt4_main.c:993
unsigned int RpcServerAssoc_ReleaseContextHandle(RpcAssoc *assoc, NDR_SCONTEXT SContext, BOOL release_lock)
Definition: rpc_assoc.c:563
#define memset(x, y, z)
Definition: compat.h:39
static SERVICE_STATUS status
Definition: service.c:31
BOOL RpcContextHandle_IsGuardCorrect(NDR_SCONTEXT SContext, void *CtxGuard)
Definition: rpc_assoc.c:481
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

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 }
handle_t hBinding
Definition: ctx_c.c:54
smooth NULL
Definition: ftsmooth.c:416
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS
Definition: rpcdcep.h:56
#define TRACE(s)
Definition: solgame.cpp:4
void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding, NDR_SCONTEXT SContext, void *pBuff, NDR_RUNDOWN userRunDownIn, void *CtxGuard, ULONG Flags)

◆ 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 }
smooth NULL
Definition: ftsmooth.c:416
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS
Definition: rpcdcep.h:56
#define TRACE(s)
Definition: solgame.cpp:4
RPC_BINDING_HANDLE WINAPI I_RpcGetCurrentCallHandle(void)
Definition: rpc_server.c:1743
NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding, void *pBuff, ULONG DataRepresentation, void *CtxGuard, ULONG Flags)

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 }
struct _RpcAssoc * Assoc
Definition: rpc_binding.h:137
#define RPC_X_SS_CONTEXT_MISMATCH
Definition: rpcnterr.h:39
handle_t hBinding
Definition: ctx_c.c:54
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
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:978
int WINAPI UuidIsNil(UUID *Uuid, RPC_STATUS *Status)
Definition: rpcrt4_main.c:266
long RPC_STATUS
Definition: rpc.h:52
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define RPC_S_INVALID_BINDING
Definition: winerror.h:1013
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:109
RPC_STATUS RpcServerAssoc_FindContextHandle(RpcAssoc *assoc, const UUID *uuid, void *CtxGuard, ULONG Flags, NDR_SCONTEXT *SContext)
Definition: rpc_assoc.c:487
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

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 }
handle_t hBinding
Definition: ctx_c.c:54
smooth NULL
Definition: ftsmooth.c:416
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS
Definition: rpcdcep.h:56
#define TRACE(s)
Definition: solgame.cpp:4
NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding, void *pBuff, ULONG DataRepresentation, void *CtxGuard, ULONG Flags)

◆ 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 }
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
unsigned char * Buffer
Definition: rpcndr.h:203
GLuint buffer
Definition: glext.h:5915
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
unsigned int BufferLength
Definition: rpcdcep.h:41
long RPC_STATUS
Definition: rpc.h:52
void * Buffer
Definition: rpcdcep.h:40
RPC_STATUS WINAPI I_RpcSendReceive(PRPC_MESSAGE pMsg)
Definition: rpc_message.c:1918
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned char * BufferStart
Definition: rpcndr.h:204
ULONG BufferLength
Definition: rpcndr.h:207
unsigned char * BufferEnd
Definition: rpcndr.h:205
#define ERR(fmt,...)
Definition: debug.h:109
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

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 1577 of file ndr_stubless.c.

1578 {
1579  DWORD phase;
1580  NdrStubCall( NULL, NULL, msg, &phase );
1581 }
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95
#define msg(x)
Definition: auth_time.c:54
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 1559 of file ndr_stubless.c.

1560 {
1561  DWORD dwPhase;
1562  NdrStubCall2(NULL, NULL, pRpcMsg, &dwPhase);
1563 }
LONG WINAPI NdrStubCall2(struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg, DWORD *pdwStubPhase)
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95

◆ 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 }
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
unsigned char * Buffer
Definition: rpcndr.h:203
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
static void align_pointer(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:97
void * Buffer
Definition: rpcdcep.h:40
smooth NULL
Definition: ftsmooth.c:416
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS
Definition: rpcdcep.h:56
#define cbNDRContext
Definition: rpcndr.h:151
#define TRACE(s)
Definition: solgame.cpp:4
ULONG BufferLength
Definition: rpcndr.h:207
#define ERR(fmt,...)
Definition: debug.h:109
void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding, NDR_SCONTEXT SContext, void *pBuff, NDR_RUNDOWN userRunDownIn, void *CtxGuard, ULONG Flags)
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090
RPC_BINDING_HANDLE Handle
Definition: rpcdcep.h:38

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 }
#define RPC_CONTEXT_HANDLE_SERIALIZE
Definition: rpcdcep.h:58
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
unsigned char * Buffer
Definition: rpcndr.h:203
const struct _MIDL_STUB_DESC * StubDesc
Definition: rpcndr.h:230
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
#define NDR_CONTEXT_HANDLE_NOSERIALIZE
Definition: ndrtypes.h:286
static void align_pointer(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:97
RPC_SYNTAX_IDENTIFIER InterfaceId
Definition: rpcdcep.h:104
void * Buffer
Definition: rpcdcep.h:40
#define RPC_CONTEXT_HANDLE_DONT_SERIALIZE
Definition: rpcdcep.h:59
smooth NULL
Definition: ftsmooth.c:416
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS
Definition: rpcdcep.h:56
#define cbNDRContext
Definition: rpcndr.h:151
#define NDR_STRICT_CONTEXT_HANDLE
Definition: ndrtypes.h:285
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
ULONG BufferLength
Definition: rpcndr.h:207
#define ERR(fmt,...)
Definition: debug.h:109
void WINAPI NDRSContextMarshall2(RPC_BINDING_HANDLE hBinding, NDR_SCONTEXT SContext, void *pBuff, NDR_RUNDOWN userRunDownIn, void *CtxGuard, ULONG Flags)
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090
unsigned int ULONG
Definition: retypes.h:1
#define NDR_CONTEXT_HANDLE_SERIALIZE
Definition: ndrtypes.h:287
RPC_BINDING_HANDLE Handle
Definition: rpcdcep.h:38

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 }
#define RPC_CONTEXT_HANDLE_SERIALIZE
Definition: rpcdcep.h:58
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
unsigned char * Buffer
Definition: rpcndr.h:203
const struct _MIDL_STUB_DESC * StubDesc
Definition: rpcndr.h:230
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
#define NDR_CONTEXT_HANDLE_NOSERIALIZE
Definition: ndrtypes.h:286
static void align_pointer(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:97
RPC_SYNTAX_IDENTIFIER InterfaceId
Definition: rpcdcep.h:104
void * Buffer
Definition: rpcdcep.h:40
#define RPC_CONTEXT_HANDLE_DONT_SERIALIZE
Definition: rpcdcep.h:59
smooth NULL
Definition: ftsmooth.c:416
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS
Definition: rpcdcep.h:56
#define cbNDRContext
Definition: rpcndr.h:151
#define NDR_STRICT_CONTEXT_HANDLE
Definition: ndrtypes.h:285
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
ULONG BufferLength
Definition: rpcndr.h:207
#define ERR(fmt,...)
Definition: debug.h:109
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090
unsigned int ULONG
Definition: retypes.h:1
NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding, void *pBuff, ULONG DataRepresentation, void *CtxGuard, ULONG Flags)
ULONG DataRepresentation
Definition: rpcdcep.h:39
#define NDR_CONTEXT_HANDLE_SERIALIZE
Definition: ndrtypes.h:287
RPC_BINDING_HANDLE Handle
Definition: rpcdcep.h:38

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 }
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:186
unsigned char * Buffer
Definition: rpcndr.h:203
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
static void align_pointer(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:97
void * Buffer
Definition: rpcdcep.h:40
smooth NULL
Definition: ftsmooth.c:416
#define RPC_CONTEXT_HANDLE_DEFAULT_FLAGS
Definition: rpcdcep.h:56
#define cbNDRContext
Definition: rpcndr.h:151
#define TRACE(s)
Definition: solgame.cpp:4
ULONG BufferLength
Definition: rpcndr.h:207
#define ERR(fmt,...)
Definition: debug.h:109
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090
NDR_SCONTEXT WINAPI NDRSContextUnmarshall2(RPC_BINDING_HANDLE hBinding, void *pBuff, ULONG DataRepresentation, void *CtxGuard, ULONG Flags)
ULONG DataRepresentation
Definition: rpcdcep.h:39
RPC_BINDING_HANDLE Handle
Definition: rpcdcep.h:38

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 }
unsigned int fInDontFree
Definition: rpcndr.h:234
unsigned char * Buffer
Definition: rpcndr.h:203
unsigned char * pCorrMemory
Definition: rpcndr.h:263
struct _FULL_PTR_XLAT_TABLES * FullPtrXlatTables
Definition: rpcndr.h:231
const struct _MIDL_STUB_DESC * StubDesc
Definition: rpcndr.h:230
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
unsigned char * PointerBufferMark
Definition: rpcndr.h:217
unsigned int BufferLength
Definition: rpcdcep.h:41
void * Buffer
Definition: rpcdcep.h:40
unsigned short UniquePtrCount
Definition: rpcndr.h:220
PARRAY_INFO pArrayInfo
Definition: rpcndr.h:254
int IgnoreEmbeddedPointers
Definition: rpcndr.h:216
DWORD dwDestContext
Definition: rpcndr.h:249
struct NDR_POINTER_QUEUE_STATE * pPointerQueueState
Definition: rpcndr.h:215
smooth NULL
Definition: ftsmooth.c:416
unsigned int fHasNewCorrDesc
Definition: rpcndr.h:239
#define TRACE(s)
Definition: solgame.cpp:4
DWORD dwStubPhase
Definition: rpcndr.h:259
void * pvDestContext
Definition: rpcndr.h:250
unsigned char * BufferStart
Definition: rpcndr.h:204
void * pMemoryList
Definition: rpcndr.h:264
ULONG BufferLength
Definition: rpcndr.h:207
unsigned char * BufferEnd
Definition: rpcndr.h:205
unsigned int fIsOut
Definition: rpcndr.h:241
unsigned int fNeedMCCP
Definition: rpcndr.h:246
PNDR_ASYNC_MESSAGE pAsyncMsg
Definition: rpcndr.h:261
unsigned int fIsOicf
Definition: rpcndr.h:242
unsigned int fIsIn
Definition: rpcndr.h:240
unsigned int fInFree
Definition: rpcndr.h:245
unsigned int fDontCallFreeInst
Definition: rpcndr.h:235
PNDR_CORRELATION_INFO pCorrInfo
Definition: rpcndr.h:262
unsigned char IsClient
Definition: rpcndr.h:210
struct NDR_ALLOC_ALL_NODES_CONTEXT * pAllocAllNodesContext
Definition: rpcndr.h:214
unsigned char * StackTop
Definition: rpcndr.h:226
unsigned int fHasReturn
Definition: rpcndr.h:237
unsigned int fHasMemoryValidateCallback
Definition: rpcndr.h:244
unsigned char CorrDespIncrement
Definition: rpcndr.h:218
unsigned int fInOnlyParam
Definition: rpcndr.h:236
unsigned char uFlags
Definition: rpcndr.h:219
ULONG FullPtrRefId
Definition: rpcndr.h:232
struct IRpcChannelBuffer * pRpcChannelBuffer
Definition: rpcndr.h:253
unsigned int fHasExtensions
Definition: rpcndr.h:238
ULONG PointerLength
Definition: rpcndr.h:233

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 }
#define INT
Definition: polytest.cpp:20
unsigned char * Buffer
Definition: rpcndr.h:203
int32_t INT_PTR
Definition: typedefs.h:62
int32_t INT
Definition: typedefs.h:56
static void align_pointer(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:97
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
uint64_t ULONGLONG
Definition: typedefs.h:65
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned short USHORT
Definition: pedump.c:61
unsigned int UINT
Definition: ndis.h:50
unsigned int ULONG
Definition: retypes.h:1
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
#define BASE_TYPE_UNMARSHALL(type)

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 1568 of file ndr_stubless.c.

1570 {
1571  return NdrStubCall2( This, channel, msg, phase );
1572 }
LONG WINAPI NdrStubCall2(struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg, DWORD *pdwStubPhase)
#define msg(x)
Definition: auth_time.c:54

Referenced by NdrServerCall().

◆ NdrStubCall2()

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

Definition at line 1301 of file ndr_stubless.c.

1306 {
1307  const MIDL_SERVER_INFO *pServerInfo;
1308  const MIDL_STUB_DESC *pStubDesc;
1309  PFORMAT_STRING pFormat;
1310  MIDL_STUB_MESSAGE stubMsg;
1311  /* pointer to start of stack to pass into stub implementation */
1312  unsigned char * args;
1313  /* size of stack */
1314  unsigned short stack_size;
1315  /* number of parameters. optional for client to give it to us */
1316  unsigned int number_of_params;
1317  /* cache of Oif_flags from v2 procedure header */
1318  INTERPRETER_OPT_FLAGS Oif_flags = { 0 };
1319  /* cache of extension flags from NDR_PROC_HEADER_EXTS */
1320  INTERPRETER_OPT_FLAGS2 ext_flags = { 0 };
1321  /* the type of pass we are currently doing */
1322  enum stubless_phase phase;
1323  /* header for procedure string */
1324  const NDR_PROC_HEADER *pProcHeader;
1325  /* location to put retval into */
1326  LONG_PTR *retval_ptr = NULL;
1327  /* correlation cache */
1328  ULONG_PTR NdrCorrCache[256];
1329 
1330  TRACE("pThis %p, pChannel %p, pRpcMsg %p, pdwStubPhase %p\n", pThis, pChannel, pRpcMsg, pdwStubPhase);
1331 
1332  if (pThis)
1333  pServerInfo = CStdStubBuffer_GetServerInfo(pThis);
1334  else
1335  pServerInfo = ((RPC_SERVER_INTERFACE *)pRpcMsg->RpcInterfaceInformation)->InterpreterInfo;
1336 
1337  pStubDesc = pServerInfo->pStubDesc;
1338  pFormat = pServerInfo->ProcString + pServerInfo->FmtStringOffset[pRpcMsg->ProcNum];
1339  pProcHeader = (const NDR_PROC_HEADER *)&pFormat[0];
1340 
1341  TRACE("NDR Version: 0x%x\n", pStubDesc->Version);
1342 
1343  if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
1344  {
1345  const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0];
1346  stack_size = header_rpc->stack_size;
1347  pFormat += sizeof(NDR_PROC_HEADER_RPC);
1348 
1349  }
1350  else
1351  {
1352  stack_size = pProcHeader->stack_size;
1353  pFormat += sizeof(NDR_PROC_HEADER);
1354  }
1355 
1356  TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags);
1357 
1358  /* binding */
1359  switch (pProcHeader->handle_type)
1360  {
1361  /* explicit binding: parse additional section */
1362  case 0:
1363  switch (*pFormat) /* handle_type */
1364  {
1365  case FC_BIND_PRIMITIVE: /* explicit primitive */
1366  pFormat += sizeof(NDR_EHD_PRIMITIVE);
1367  break;
1368  case FC_BIND_GENERIC: /* explicit generic */
1369  pFormat += sizeof(NDR_EHD_GENERIC);
1370  break;
1371  case FC_BIND_CONTEXT: /* explicit context */
1372  pFormat += sizeof(NDR_EHD_CONTEXT);
1373  break;
1374  default:
1375  ERR("bad explicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
1377  }
1378  break;
1379  case FC_BIND_GENERIC: /* implicit generic */
1380  case FC_BIND_PRIMITIVE: /* implicit primitive */
1381  case FC_CALLBACK_HANDLE: /* implicit callback */
1382  case FC_AUTO_HANDLE: /* implicit auto handle */
1383  break;
1384  default:
1385  ERR("bad implicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
1387  }
1388 
1389  if (pProcHeader->Oi_flags & Oi_OBJECT_PROC)
1390  NdrStubInitialize(pRpcMsg, &stubMsg, pStubDesc, pChannel);
1391  else
1392  NdrServerInitializeNew(pRpcMsg, &stubMsg, pStubDesc);
1393 
1394  /* create the full pointer translation tables, if requested */
1395  if (pProcHeader->Oi_flags & Oi_FULL_PTR_USED)
1397 
1398  /* store the RPC flags away */
1399  if (pProcHeader->Oi_flags & Oi_HAS_RPCFLAGS)
1400  pRpcMsg->RpcFlags = ((const NDR_PROC_HEADER_RPC *)pProcHeader)->rpc_flags;
1401 
1402  /* use alternate memory allocation routines */
1403  if (pProcHeader->Oi_flags & Oi_RPCSS_ALLOC_USED)
1404 #if 0
1405  NdrRpcSsEnableAllocate(&stubMsg);
1406 #else
1407  FIXME("Set RPCSS memory allocation routines\n");
1408 #endif
1409 
1410  TRACE("allocating memory for stack of size %x\n", stack_size);
1411 
1412  args = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, stack_size);
1413  stubMsg.StackTop = args; /* used by conformance of top-level objects */
1414 
1415  /* add the implicit This pointer as the first arg to the function if we
1416  * are calling an object method */
1417  if (pThis)
1418  *(void **)args = ((CStdStubBuffer