ReactOS  0.4.12-dev-409-g9f418243
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  tagNDR_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 tagNDR_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:27
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 \
Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
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
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: msvc.h:34

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

typedef unsigned char 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

typedef const unsigned char* 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

typedef unsigned char* 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:395
GLfloat GLfloat p
Definition: glext.h:8902
#define HeapFree(x, y, z)
Definition: compat.h:394

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

1834 {
1836  LONG_PTR ret;
1837 
1839  ret = ndr_async_client_call( desc, format, va_arg( args, void ** ));
1840  __ms_va_end( args );
1841  return *(CLIENT_CALL_RETURN *)&ret;
1842 }
static const char __ms_va_list
Definition: printf.c:70
Definition: match.c:390
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
const struct builtin_class_descr * desc
Definition: regcontrol.c:48
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:443
#define __ms_va_start(list, arg)
Definition: windef.h:442
#define args
Definition: format.c:66

◆ NdrAsyncServerCall()

RPCRTAPI void RPC_ENTRY NdrAsyncServerCall ( PRPC_MESSAGE  pRpcMsg)

Definition at line 1854 of file ndr_stubless.c.

1855 {
1856  FIXME("unimplemented, %p\n", pRpcMsg);
1857 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ NdrAsyncStubCall()

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

Definition at line 1846 of file ndr_stubless.c.

1849 {
1850  FIXME("unimplemented, expect crash!\n");
1851  return 0;
1852 }
#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 6326 of file ndr_marshall.c.

6329 {
6330  FIXME("stub\n");
6331 }
#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 6346 of file ndr_marshall.c.

6349 {
6350  FIXME("stub\n");
6351 }
#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 6303 of file ndr_marshall.c.

6306 {
6307  FIXME("stub\n");
6308  return NULL;
6309 }
#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 6314 of file ndr_marshall.c.

6318 {
6319  FIXME("stub\n");
6320  return NULL;
6321 }
#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 78 of file ndr_contexthandle.c.

79 {
80  struct context_handle_entry *che;
82 
83  TRACE("%p\n", CContext);
84 
86  che = get_context_entry(CContext);
87  if (che)
88  handle = che->handle;
90 
91  if (!handle)
92  {
93  ERR("invalid handle %p\n", CContext);
95  }
96  return handle;
97 }
#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:189
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 99 of file ndr_contexthandle.c.

100 {
101  struct context_handle_entry *che;
102 
103  TRACE("%p %p\n", CContext, pBuff);
104 
105  if (CContext)
106  {
108  che = get_context_entry(CContext);
109  memcpy(pBuff, &che->wire_data, sizeof (ndr_context_handle));
111  }
112  else
113  {
114  ndr_context_handle *wire_data = pBuff;
115  wire_data->attributes = 0;
117  }
118 }
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 208 of file ndr_contexthandle.c.

211 {
213 
214  TRACE("*%p=(%p) %p %p %08x\n",
215  CContext, *CContext, hBinding, pBuff, DataRepresentation);
216 
218  status = ndr_update_context_handle(CContext, hBinding, pBuff);
220  if (status)
222 }
handle_t hBinding
Definition: ctx_c.c:54
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
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 4629 of file ndr_marshall.c.

4632 {
4633  FIXME("(%p,%p,%p): stub\n", pStubMsg, pFormat, ArgAddr);
4634 }
#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 982 of file ndr_stubless.c.

983 {
985  LONG_PTR ret;
986 
988  ret = ndr_client_call( desc, format, va_arg( args, void ** ), NULL );
989  __ms_va_end( args );
990  return *(CLIENT_CALL_RETURN *)&ret;
991 }
static const char __ms_va_list
Definition: printf.c:70
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:605
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
const struct builtin_class_descr * desc
Definition: regcontrol.c:48
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:443
#define __ms_va_start(list, arg)
Definition: windef.h:442
#define args
Definition: format.c:66

◆ NdrClientContextMarshall()

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

Definition at line 7023 of file ndr_marshall.c.

7026 {
7027  TRACE("(%p, %p, %d)\n", pStubMsg, ContextHandle, fCheck);
7028 
7029  align_pointer_clear(&pStubMsg->Buffer, 4);
7030 
7031  if (pStubMsg->Buffer + cbNDRContext > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)
7032  {
7033  ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n",
7034  pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength);
7036  }
7037 
7038  /* FIXME: what does fCheck do? */
7039  NDRCContextMarshall(ContextHandle,
7040  pStubMsg->Buffer);
7041 
7042  pStubMsg->Buffer += cbNDRContext;
7043 }
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
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:106
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 7048 of file ndr_marshall.c.

7051 {
7052  TRACE("(%p, %p, %p)\n", pStubMsg, pContextHandle, BindHandle);
7053 
7054  align_pointer(&pStubMsg->Buffer, 4);
7055 
7056  if (pStubMsg->Buffer + cbNDRContext > pStubMsg->BufferEnd)
7058 
7059  NDRCContextUnmarshall(pContextHandle,
7060  BindHandle,
7061  pStubMsg->Buffer,
7062  pStubMsg->RpcMsg->DataRepresentation);
7063 
7064  pStubMsg->Buffer += cbNDRContext;
7065 }
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
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:100
#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(), m_CtxClose(), m_CtxHello(), m_CtxOpen(), m_CtxOpen2(), ndr_async_client_call(), ndr_client_call(), NdrProxyInitialize(), test_client_init(), test_conf_complex_array(), test_conf_complex_struct(), test_conformant_array(), test_conformant_string(), test_ndr_allocate(), test_ndr_buffer(), test_ndr_simple_type(), test_NdrMapCommAndFaultStatus(), test_nonconformant_string(), test_nontrivial_pointer_types(), test_pointer_marshal(), and test_simple_struct_marshal().

◆ NdrContextHandleInitialize()

RPCRTAPI NDR_SCONTEXT RPC_ENTRY NdrContextHandleInitialize ( PMIDL_STUB_MESSAGE  pStubMsg,
PFORMAT_STRING  pFormat 
)

Definition at line 7119 of file ndr_marshall.c.

7121 {
7122  RPC_SYNTAX_IDENTIFIER *if_id = NULL;
7124 
7125  TRACE("(%p, %p)\n", pStubMsg, pFormat);
7126 
7127  if (pFormat[1] & NDR_CONTEXT_HANDLE_SERIALIZE)
7129  if (pFormat[1] & NDR_CONTEXT_HANDLE_NO_SERIALIZE)
7131  if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
7132  {
7133  RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
7134  if_id = &sif->InterfaceId;
7135  }
7136 
7137  return NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle, NULL,
7138  pStubMsg->RpcMsg->DataRepresentation, if_id,
7139  flags);
7140 }
#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
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_CONTEXT_HANDLE_SERIALIZE
Definition: ndrtypes.h:182
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
#define NDR_CONTEXT_HANDLE_NO_SERIALIZE
Definition: rpcfc.h:202
#define NDR_STRICT_CONTEXT_HANDLE
Definition: ndrtypes.h:180
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
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 7112 of file ndr_marshall.c.

7115 {
7116  FIXME("(%p, %p, %p): stub\n", pStubMsg, pMemory, pFormat);
7117 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ NdrConvert()

RPCRTAPI void RPC_ENTRY NdrConvert ( PMIDL_STUB_MESSAGE  pStubMsg,
PFORMAT_STRING  pFormat 
)

Definition at line 4639 of file ndr_marshall.c.

4640 {
4641  FIXME("(pStubMsg == ^%p, pFormat == ^%p): stub.\n", pStubMsg, pFormat);
4642  /* FIXME: since this stub doesn't do any converting, the proper behavior
4643  is to raise an exception */
4644 }
#define FIXME(fmt,...)
Definition: debug.h:110

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

◆ NdrConvert2()

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

Definition at line 4649 of file ndr_marshall.c.

4650 {
4651  FIXME("(pStubMsg == ^%p, pFormat == ^%p, NumberParams == %d): stub.\n",
4652  pStubMsg, pFormat, NumberParams);
4653  /* FIXME: since this stub doesn't do any converting, the proper behavior
4654  is to raise an exception */
4655 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ NdrCorrelationFree()

RPCRTAPI void RPC_ENTRY NdrCorrelationFree ( PMIDL_STUB_MESSAGE  pStubMsg)

Definition at line 7265 of file ndr_marshall.c.

7266 {
7267  FIXME("(%p): stub\n", pStubMsg);
7268 }
#define FIXME(fmt,...)
Definition: debug.h:110

Referenced by ndr_client_call(), NdrpCompleteAsyncClientCall(), and NdrStubCall2().

◆ NdrCorrelationInitialize()

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

Definition at line 7227 of file ndr_marshall.c.

7228 {
7229  FIXME("(%p, %p, %d, 0x%x): semi-stub\n", pStubMsg, pMemory, CacheSize, Flags);
7230 
7231  if (pStubMsg->CorrDespIncrement == 0)
7232  pStubMsg->CorrDespIncrement = 2; /* size of the normal (non-range) /robust payload */
7233 
7234  pStubMsg->fHasNewCorrDesc = TRUE;
7235 }
#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 ndr_async_client_call(), ndr_client_call(), NdrStubCall2(), and test_NdrCorrelationInitialize().

◆ NdrCorrelationPass()

RPCRTAPI void RPC_ENTRY NdrCorrelationPass ( PMIDL_STUB_MESSAGE  pStubMsg)

Definition at line 7248 of file ndr_marshall.c.

7249 {
7250  FIXME("(%p): stub\n", pStubMsg);
7251 }
#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:1695
#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(), 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:2258
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
struct _FULL_PTR_XLAT_TABLES::@3071 PointerToRefId
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int ULONG
Definition: retypes.h:1
struct _FULL_PTR_XLAT_TABLES::@3070 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:2258
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
struct _FULL_PTR_XLAT_TABLES::@3071 PointerToRefId
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
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::@3070 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:2258
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
struct _FULL_PTR_XLAT_TABLES::@3071 PointerToRefId
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
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::@3070 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::@3070 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_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
struct _FULL_PTR_XLAT_TABLES::@3071 PointerToRefId
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394
struct _FULL_PTR_XLAT_TABLES::@3070 RefIdToPointer

Referenced by ndr_client_call(), NdrMesProcEncodeDecode(), NdrpCompleteAsyncClientCall(), 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::@3071 PointerToRefId
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
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::@3070 RefIdToPointer

Referenced by ndr_async_client_call(), ndr_client_call(), 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:189
unsigned char * Buffer
Definition: rpcndr.h:203
RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg)
Definition: rpc_message.c:1637
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(), m_CtxClose(), m_CtxHello(), m_CtxOpen(), m_CtxOpen2(), ndr_async_client_call(), ndr_client_call(), and test_ndr_buffer().

◆ NdrGetDcomProtocolVersion()

RPCRTAPI RPC_STATUS RPC_ENTRY NdrGetDcomProtocolVersion ( PMIDL_STUB_MESSAGE  pStubMsg,
RPC_VERSION pVersion 
)

◆ NdrGetUserMarshalInfo()

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

Definition at line 4579 of file ndr_marshall.c.

4580 {
4582 
4583  TRACE("(%p,%u,%p)\n", flags, level, umi);
4584 
4585  if (level != 1)
4586  return RPC_S_INVALID_ARG;
4587 
4588  memset(&umi->u1.Level1, 0, sizeof(umi->u1.Level1));
4589  umi->InformationLevel = level;
4590 
4591  if (umcb->Signature != USER_MARSHAL_CB_SIGNATURE)
4592  return RPC_S_INVALID_ARG;
4593 
4594  umi->u1.Level1.pfnAllocate = umcb->pStubMsg->pfnAllocate;
4595  umi->u1.Level1.pfnFree = umcb->pStubMsg->pfnFree;
4596  umi->u1.Level1.pRpcChannelBuffer = umcb->pStubMsg->pRpcChannelBuffer;
4597 
4598  switch (umcb->CBType)
4599  {
4602  {
4603  RPC_MESSAGE *msg = umcb->pStubMsg->RpcMsg;
4604  unsigned char *buffer_start = msg->Buffer;
4605  unsigned char *buffer_end =
4606  (unsigned char *)msg->Buffer + msg->BufferLength;
4607 
4608  if (umcb->pStubMsg->Buffer < buffer_start ||
4609  umcb->pStubMsg->Buffer > buffer_end)
4610  return RPC_X_INVALID_BUFFER;
4611 
4612  umi->u1.Level1.Buffer = umcb->pStubMsg->Buffer;
4613  umi->u1.Level1.BufferSize = buffer_end - umcb->pStubMsg->Buffer;
4614  break;
4615  }
4617  case USER_MARSHAL_CB_FREE:
4618  break;
4619  default:
4620  WARN("unrecognised CBType %d\n", umcb->CBType);
4621  }
4622 
4623  return RPC_S_OK;
4624 }
#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
UINT msg
Definition: msvc.h:92
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:717
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
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

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

◆ NdrOleAllocate()

RPCRTAPI void* RPC_ENTRY NdrOleAllocate ( SIZE_T  Size)

Definition at line 417 of file ndr_ole.c.

418 {
419  if (!LoadCOM()) return NULL;
420  return COM_MemAlloc(Size);
421 }
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 my_alloc().

◆ NdrOleFree()

RPCRTAPI void RPC_ENTRY NdrOleFree ( void NodeToFree)

Definition at line 426 of file ndr_ole.c.

427 {
428  if (!LoadCOM()) return;
429  COM_MemFree(NodeToFree);
430 }
static HMODULE LoadCOM(void)
Definition: ndr_ole.c:58

Referenced by 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 6434 of file ndr_marshall.c.

6439 {
6440  const NDR_RANGE *pRange = (const NDR_RANGE *)pFormat;
6441  unsigned char base_type;
6442 
6443  TRACE("pStubMsg: %p, ppMemory: %p, type: 0x%02x, fMustAlloc: %s\n", pStubMsg, ppMemory, *pFormat, fMustAlloc ? "true" : "false");
6444 
6445  if (pRange->type != RPC_FC_RANGE)
6446  {
6447  ERR("invalid format type %x\n", pRange->type);
6449  return NULL;
6450  }
6451  base_type = pRange->flags_type & 0xf;
6452 
6453  TRACE("base_type = 0x%02x, low_value = %d, high_value = %d\n",
6454  base_type, pRange->low_value, pRange->high_value);
6455 
6456 #define RANGE_UNMARSHALL(mem_type, wire_type, format_spec) \
6457  do \
6458  { \
6459  align_pointer(&pStubMsg->Buffer, sizeof(wire_type)); \
6460  if (!fMustAlloc && !*ppMemory) \
6461  fMustAlloc = TRUE; \
6462  if (fMustAlloc) \
6463  *ppMemory = NdrAllocate(pStubMsg, sizeof(mem_type)); \
6464  if (pStubMsg->Buffer + sizeof(wire_type) > pStubMsg->BufferEnd) \
6465  { \
6466  ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n", \
6467  pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength); \
6468  RpcRaiseException(RPC_X_BAD_STUB_DATA); \
6469  } \
6470  if ((*(wire_type *)pStubMsg->Buffer < (mem_type)pRange->low_value) || \
6471  (*(wire_type *)pStubMsg->Buffer > (mem_type)pRange->high_value)) \
6472  { \
6473  ERR("value exceeded bounds: " format_spec ", low: " format_spec ", high: " format_spec "\n", \
6474  *(wire_type *)pStubMsg->Buffer, (mem_type)pRange->low_value, \
6475  (mem_type)pRange->high_value); \
6476  RpcRaiseException(RPC_S_INVALID_BOUND); \
6477  return NULL; \
6478  } \
6479  TRACE("*ppMemory: %p\n", *ppMemory); \
6480  **(mem_type **)ppMemory = *(wire_type *)pStubMsg->Buffer; \
6481  pStubMsg->Buffer += sizeof(wire_type); \
6482  } while (0)
6483 
6484  switch(base_type)
6485  {
6486  case RPC_FC_CHAR:
6487  case RPC_FC_SMALL:
6488  RANGE_UNMARSHALL(UCHAR, UCHAR, "%d");
6489  TRACE("value: 0x%02x\n", **ppMemory);
6490  break;
6491  case RPC_FC_BYTE:
6492  case RPC_FC_USMALL:
6493  RANGE_UNMARSHALL(CHAR, CHAR, "%u");
6494  TRACE("value: 0x%02x\n", **ppMemory);
6495  break;
6496  case RPC_FC_WCHAR: /* FIXME: valid? */
6497  case RPC_FC_USHORT:
6498  RANGE_UNMARSHALL(USHORT, USHORT, "%u");
6499  TRACE("value: 0x%04x\n", **(USHORT **)ppMemory);
6500  break;
6501  case RPC_FC_SHORT:
6502  RANGE_UNMARSHALL(SHORT, SHORT, "%d");
6503  TRACE("value: 0x%04x\n", **(USHORT **)ppMemory);
6504  break;
6505  case RPC_FC_LONG:
6506  case RPC_FC_ENUM32:
6507  RANGE_UNMARSHALL(LONG, LONG, "%d");
6508  TRACE("value: 0x%08x\n", **(ULONG **)ppMemory);
6509  break;
6510  case RPC_FC_ULONG:
6511  RANGE_UNMARSHALL(ULONG, ULONG, "%u");
6512  TRACE("value: 0x%08x\n", **(ULONG **)ppMemory);
6513  break;
6514  case RPC_FC_ENUM16:
6515  RANGE_UNMARSHALL(UINT, USHORT, "%u");
6516  TRACE("value: 0x%08x\n", **(UINT **)ppMemory);
6517  break;
6518  case RPC_FC_FLOAT:
6519  case RPC_FC_DOUBLE:
6520  case RPC_FC_HYPER:
6521  default:
6522  ERR("invalid range base type: 0x%02x\n", base_type);
6524  }
6525 
6526  return NULL;
6527 }
ULONG high_value
char CHAR
Definition: xmlstorage.h:175
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
#define RPC_FC_USHORT
Definition: rpcfc.h:16
#define RANGE_UNMARSHALL(mem_type, wire_type, format_spec)
#define RPC_FC_CHAR
Definition: rpcfc.h:11
long LONG
Definition: pedump.c:60
#define RPC_FC_ENUM16
Definition: rpcfc.h:22
short SHORT
Definition: pedump.c:59
#define RPC_FC_SMALL
Definition: rpcfc.h:12
#define RPC_FC_ULONG
Definition: rpcfc.h:18
smooth NULL
Definition: ftsmooth.c:416
#define RPC_FC_HYPER
Definition: rpcfc.h:20
#define TRACE(s)
Definition: solgame.cpp:4
#define RPC_FC_USMALL
Definition: rpcfc.h:13
unsigned int UINT
Definition: ndis.h:50
#define RPC_FC_WCHAR
Definition: rpcfc.h:14
#define RPC_FC_DOUBLE
Definition: rpcfc.h:21
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned char flags_type
#define RPC_FC_FLOAT
Definition: rpcfc.h:19
#define RPC_S_INTERNAL_ERROR
Definition: winerror.h:1074
#define ERR(fmt,...)
Definition: debug.h:109
#define RPC_FC_BYTE
Definition: rpcfc.h:10
#define RPC_FC_SHORT
Definition: rpcfc.h:15
unsigned short USHORT
Definition: pedump.c:61
unsigned char type
ULONG low_value
unsigned int ULONG
Definition: retypes.h:1
#define RPC_FC_ENUM32
Definition: rpcfc.h:23
#define RPC_FC_LONG
Definition: rpcfc.h:17
#define RPC_FC_RANGE
Definition: rpcfc.h:148

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

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

Referenced by ndr_async_client_call(), and ndr_client_call().

◆ NdrRpcSsDefaultAllocate()

RPCRTAPI void* RPC_ENTRY NdrRpcSsDefaultAllocate ( SIZE_T  Size)

◆ NdrRpcSsDefaultFree()

RPCRTAPI void RPC_ENTRY NdrRpcSsDefaultFree ( void NodeToFree)

◆ NdrRpcSsDisableAllocate()

RPCRTAPI void RPC_ENTRY NdrRpcSsDisableAllocate ( PMIDL_STUB_MESSAGE  pMessage)

◆ NdrRpcSsEnableAllocate()

RPCRTAPI void RPC_ENTRY NdrRpcSsEnableAllocate ( PMIDL_STUB_MESSAGE  pMessage)

Referenced by NdrStubCall2().

◆ NDRSContextMarshall()

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

Definition at line 227 of file ndr_contexthandle.c.

230 {
231  TRACE("(%p %p %p)\n", SContext, pBuff, userRunDownIn);
233  userRunDownIn, NULL, RPC_CONTEXT_HANDLE_DEFAULT_FLAGS);
234 }
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:1746
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 252 of file ndr_contexthandle.c.

257 {
258  RpcBinding *binding = hBinding;
260  ndr_context_handle *ndr = pBuff;
261 
262  TRACE("(%p %p %p %p %p %u)\n",
263  hBinding, SContext, pBuff, userRunDownIn, CtxGuard, Flags);
264 
265  if (!binding->server || !binding->Assoc)
267 
269  FIXME("unimplemented flags: 0x%x\n", Flags & RPC_CONTEXT_HANDLE_FLAGS);
270 
271  if (SContext->userContext)
272  {
273  status = RpcServerAssoc_UpdateContextHandle(binding->Assoc, SContext, CtxGuard, userRunDownIn);
274  if (status != RPC_S_OK)
276  ndr->attributes = 0;
277  RpcContextHandle_GetUuid(SContext, &ndr->uuid);
278 
280  RpcServerAssoc_ReleaseContextHandle(binding->Assoc, SContext, TRUE);
281  }
282  else
283  {
284  if (!RpcContextHandle_IsGuardCorrect(SContext, CtxGuard))
286  memset(ndr, 0, sizeof(*ndr));
287 
289  /* Note: release the context handle twice in this case to release
290  * one ref being kept around for the data and one ref for the
291  * unmarshall/marshall sequence */
292  if (!RpcServerAssoc_ReleaseContextHandle(binding->Assoc, SContext, TRUE))
293  return; /* this is to cope with the case of the data not being valid
294  * before and so not having a further reference */
295  RpcServerAssoc_ReleaseContextHandle(binding->Assoc, SContext, FALSE);
296  }
297 }
void RpcContextHandle_GetUuid(NDR_SCONTEXT SContext, UUID *uuid)
Definition: rpc_assoc.c:525
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:189
#define RPC_CONTEXT_HANDLE_FLAGS
Definition: rpcdcep.h:57
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:499
#define FIXME(fmt,...)
Definition: debug.h:110
#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:995
unsigned int RpcServerAssoc_ReleaseContextHandle(RpcAssoc *assoc, NDR_SCONTEXT SContext, BOOL release_lock)
Definition: rpc_assoc.c:547
#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:465
#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 239 of file ndr_contexthandle.c.

243 {
244  TRACE("(%p %p %p %p)\n", hBinding, SContext, pBuff, userRunDownIn);
245  NDRSContextMarshall2(hBinding, SContext, pBuff, userRunDownIn, NULL,
247 }
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 302 of file ndr_contexthandle.c.

304 {
305  TRACE("(%p %08x)\n", pBuff, DataRepresentation);
307  DataRepresentation, NULL,
309 }
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:1746
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 326 of file ndr_contexthandle.c.

330 {
331  RpcBinding *binding = hBinding;
332  NDR_SCONTEXT SContext;
334  const ndr_context_handle *context_ndr = pBuff;
335 
336  TRACE("(%p %p %08x %p %u)\n",
337  hBinding, pBuff, DataRepresentation, CtxGuard, Flags);
338 
339  if (!binding->server || !binding->Assoc)
341 
343  FIXME("unimplemented flags: 0x%x\n", Flags & RPC_CONTEXT_HANDLE_FLAGS);
344 
345  if (!pBuff || (!context_ndr->attributes &&
346  UuidIsNil((UUID *)&context_ndr->uuid, &status)))
348  &SContext);
349  else
350  {
351  if (context_ndr->attributes)
352  {
353  ERR("non-null attributes 0x%x\n", context_ndr->attributes);
355  }
356  else
358  &context_ndr->uuid,
359  CtxGuard, Flags,
360  &SContext);
361  }
362 
363  if (status != RPC_S_OK)
365 
367  return SContext;
368 }
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:189
RPC_STATUS RpcServerAssoc_AllocateContextHandle(RpcAssoc *assoc, void *CtxGuard, NDR_SCONTEXT *SContext)
Definition: rpc_assoc.c:440
#define RPC_CONTEXT_HANDLE_FLAGS
Definition: rpcdcep.h:57
void RPCRT4_PushThreadContextHandle(NDR_SCONTEXT SContext) DECLSPEC_HIDDEN
Definition: rpcrt4_main.c:980
int WINAPI UuidIsNil(UUID *Uuid, RPC_STATUS *Status)
Definition: rpcrt4_main.c:269
long RPC_STATUS
Definition: rpc.h:52
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define FIXME(fmt,...)
Definition: debug.h:110
#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:471
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 314 of file ndr_contexthandle.c.

317 {
318  TRACE("(%p %p %08x)\n", hBinding, pBuff, DataRepresentation);
319  return NDRSContextUnmarshall2(hBinding, pBuff, DataRepresentation, NULL,
321 }
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:189
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:1904
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(), m_CtxClose(), m_CtxHello(), m_CtxOpen(), m_CtxOpen2(), and ndr_client_call().

◆ NdrServerCall()

RPCRTAPI void RPC_ENTRY NdrServerCall ( PRPC_MESSAGE  pRpcMsg)

Definition at line 1513 of file ndr_stubless.c.

1514 {
1515  DWORD phase;
1516  NdrStubCall( NULL, NULL, msg, &phase );
1517 }
UINT msg
Definition: msvc.h:92
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95
LONG WINAPI NdrStubCall(struct IRpcStubBuffer *This, struct IRpcChannelBuffer *channel, PRPC_MESSAGE msg, DWORD *phase)

◆ NdrServerCall2()

RPCRTAPI void RPC_ENTRY NdrServerCall2 ( PRPC_MESSAGE  pRpcMsg)

Definition at line 1495 of file ndr_stubless.c.

1496 {
1497  DWORD dwPhase;
1498  NdrStubCall2(NULL, NULL, pRpcMsg, &dwPhase);
1499 }
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 7067 of file ndr_marshall.c.

7070 {
7071  TRACE("(%p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine);
7072 
7073  align_pointer(&pStubMsg->Buffer, 4);
7074 
7075  if (pStubMsg->Buffer + cbNDRContext > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)
7076  {
7077  ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n",
7078  pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength);
7080  }
7081 
7082  NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle,
7083  pStubMsg->Buffer, RundownRoutine, NULL,
7085  pStubMsg->Buffer += cbNDRContext;
7086 }
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
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:100
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 7142 of file ndr_marshall.c.

7146 {
7147  RPC_SYNTAX_IDENTIFIER *if_id = NULL;
7149 
7150  TRACE("(%p, %p, %p, %p)\n", pStubMsg, ContextHandle, RundownRoutine, pFormat);
7151 
7152  align_pointer(&pStubMsg->Buffer, 4);
7153 
7154  if (pStubMsg->Buffer + cbNDRContext > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)
7155  {
7156  ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n",
7157  pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength);
7159  }
7160 
7161  if (pFormat[1] & NDR_CONTEXT_HANDLE_SERIALIZE)
7163  if (pFormat[1] & NDR_CONTEXT_HANDLE_NO_SERIALIZE)
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  NDRSContextMarshall2(pStubMsg->RpcMsg->Handle, ContextHandle,
7172  pStubMsg->Buffer, RundownRoutine, if_id, flags);
7173  pStubMsg->Buffer += cbNDRContext;
7174 }
#define RPC_CONTEXT_HANDLE_SERIALIZE
Definition: rpcdcep.h:58
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
unsigned char * Buffer
Definition: rpcndr.h:203
const struct _MIDL_STUB_DESC * StubDesc
Definition: rpcndr.h:230
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
static void align_pointer(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:100
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 NDR_CONTEXT_HANDLE_SERIALIZE
Definition: ndrtypes.h:182
#define cbNDRContext
Definition: rpcndr.h:151
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
ULONG BufferLength
Definition: rpcndr.h:207
#define NDR_CONTEXT_HANDLE_NO_SERIALIZE
Definition: rpcfc.h:202
#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 NDR_STRICT_CONTEXT_HANDLE
Definition: ndrtypes.h:180
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1090
unsigned int ULONG
Definition: retypes.h:1
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 7176 of file ndr_marshall.c.

7178 {
7179  NDR_SCONTEXT ContextHandle;
7180  RPC_SYNTAX_IDENTIFIER *if_id = NULL;
7182 
7183  TRACE("(%p, %p)\n", pStubMsg, pFormat);
7184 
7185  align_pointer(&pStubMsg->Buffer, 4);
7186 
7187  if (pStubMsg->Buffer + cbNDRContext > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)
7188  {
7189  ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n",
7190  pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength);
7192  }
7193 
7194  if (pFormat[1] & NDR_CONTEXT_HANDLE_SERIALIZE)
7196  if (pFormat[1] & NDR_CONTEXT_HANDLE_NO_SERIALIZE)
7198  if (pFormat[1] & NDR_STRICT_CONTEXT_HANDLE)
7199  {
7200  RPC_SERVER_INTERFACE *sif = pStubMsg->StubDesc->RpcInterfaceInformation;
7201  if_id = &sif->InterfaceId;
7202  }
7203 
7204  ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle,
7205  pStubMsg->Buffer,
7206  pStubMsg->RpcMsg->DataRepresentation,
7207  if_id, flags);
7208  pStubMsg->Buffer += cbNDRContext;
7209 
7210  return ContextHandle;
7211 }
#define RPC_CONTEXT_HANDLE_SERIALIZE
Definition: rpcdcep.h:58
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
unsigned char * Buffer
Definition: rpcndr.h:203
const struct _MIDL_STUB_DESC * StubDesc
Definition: rpcndr.h:230
PRPC_MESSAGE RpcMsg
Definition: rpcndr.h:202
static void align_pointer(unsigned char **ptr, unsigned int align)
Definition: ndr_marshall.c:100
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 NDR_CONTEXT_HANDLE_SERIALIZE
Definition: ndrtypes.h:182
#define cbNDRContext
Definition: rpcndr.h:151
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
ULONG BufferLength
Definition: rpcndr.h:207
#define NDR_CONTEXT_HANDLE_NO_SERIALIZE
Definition: rpcfc.h:202
#define ERR(fmt,...)
Definition: debug.h:109
#define NDR_STRICT_CONTEXT_HANDLE
Definition: ndrtypes.h:180
#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
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 7088 of file ndr_marshall.c.

7089 {
7090  NDR_SCONTEXT ContextHandle;
7091 
7092  TRACE("(%p)\n", pStubMsg);
7093 
7094  align_pointer(&pStubMsg->Buffer, 4);
7095 
7096  if (pStubMsg->Buffer + cbNDRContext > (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength)
7097  {
7098  ERR("buffer overflow - Buffer = %p, BufferEnd = %p\n",
7099  pStubMsg->Buffer, (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength);
7101  }
7102 
7103  ContextHandle = NDRSContextUnmarshall2(pStubMsg->RpcMsg->Handle,
7104  pStubMsg->Buffer,
7105  pStubMsg->RpcMsg->DataRepresentation,
7107  pStubMsg->Buffer += cbNDRContext;
7108 
7109  return ContextHandle;
7110 }
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
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:100
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(), 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 1625 of file ndr_marshall.c.

1627 {
1628  NdrBaseTypeMarshall(pStubMsg, pMemory, &FormatChar);
1629 }
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 1640 of file ndr_marshall.c.

1642 {
1643 #define BASE_TYPE_UNMARSHALL(type) \
1644  align_pointer(&pStubMsg->Buffer, sizeof(type)); \
1645  TRACE("pMemory: %p\n", pMemory); \
1646  *(type *)pMemory = *(type *)pStubMsg->Buffer; \
1647  pStubMsg->Buffer += sizeof(type);
1648 
1649  switch(FormatChar)
1650  {
1651  case RPC_FC_BYTE:
1652  case RPC_FC_CHAR:
1653  case RPC_FC_SMALL:
1654  case RPC_FC_USMALL:
1656  TRACE("value: 0x%02x\n", *pMemory);
1657  break;
1658  case RPC_FC_WCHAR:
1659  case RPC_FC_SHORT:
1660  case RPC_FC_USHORT:
1662  TRACE("value: 0x%04x\n", *(USHORT *)pMemory);
1663  break;
1664  case RPC_FC_LONG:
1665  case RPC_FC_ULONG:
1666  case RPC_FC_ERROR_STATUS_T:
1667  case RPC_FC_ENUM32:
1669  TRACE("value: 0x%08x\n", *(ULONG *)pMemory);
1670  break;
1671  case RPC_FC_FLOAT:
1672  BASE_TYPE_UNMARSHALL(float);
1673  TRACE("value: %f\n", *(float *)pMemory);
1674  break;
1675  case RPC_FC_DOUBLE:
1676  BASE_TYPE_UNMARSHALL(double);
1677  TRACE("value: %f\n", *(double *)pMemory);
1678  break;
1679  case RPC_FC_HYPER:
1681  TRACE("value: %s\n", wine_dbgstr_longlong(*(ULONGLONG *)pMemory));
1682  break;
1683  case RPC_FC_ENUM16:
1684  align_pointer(&pStubMsg->Buffer, sizeof(USHORT));
1685  TRACE("pMemory: %p\n", pMemory);
1686  /* 16-bits on the wire, but int in memory */
1687  *(UINT *)pMemory = *(USHORT *)pStubMsg->Buffer;
1688  pStubMsg->Buffer += sizeof(USHORT);
1689  TRACE("value: 0x%08x\n", *(UINT *)pMemory);
1690  break;
1691  case RPC_FC_INT3264:
1692  align_pointer(&pStubMsg->Buffer, sizeof(INT));
1693  /* 32-bits on the wire, but int_ptr in memory */
1694  *(INT_PTR *)pMemory = *(INT *)pStubMsg->Buffer;
1695  pStubMsg->Buffer += sizeof(INT);
1696  TRACE("value: 0x%08lx\n", *(INT_PTR *)pMemory);
1697  break;
1698  case RPC_FC_UINT3264:
1699  align_pointer(&pStubMsg->Buffer, sizeof(UINT));
1700  /* 32-bits on the wire, but int_ptr in memory */
1701  *(UINT_PTR *)pMemory = *(UINT *)pStubMsg->Buffer;
1702  pStubMsg->Buffer += sizeof(UINT);
1703  TRACE("value: 0x%08lx\n", *(UINT_PTR *)pMemory);
1704  break;
1705  case RPC_FC_IGNORE:
1706  break;
1707  default:
1708  FIXME("Unhandled base type: 0x%02x\n", FormatChar);
1709  }
1710 #undef BASE_TYPE_UNMARSHALL
1711 }
unsigned char * Buffer
Definition: rpcndr.h:203
#define RPC_FC_USHORT
Definition: rpcfc.h:16
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:100
#define RPC_FC_CHAR
Definition: rpcfc.h:11
#define RPC_FC_ENUM16
Definition: rpcfc.h:22
#define FIXME(fmt,...)
Definition: debug.h:110
#define RPC_FC_SMALL
Definition: rpcfc.h:12
#define RPC_FC_ULONG
Definition: rpcfc.h:18
#define RPC_FC_HYPER
Definition: rpcfc.h:20
#define RPC_FC_INT3264
Definition: rpcfc.h:150
#define TRACE(s)
Definition: solgame.cpp:4
#define RPC_FC_USMALL
Definition: rpcfc.h:13
uint64_t ULONGLONG
Definition: typedefs.h:65
unsigned int UINT
Definition: ndis.h:50
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
#define RPC_FC_WCHAR
Definition: rpcfc.h:14
#define RPC_FC_DOUBLE
Definition: rpcfc.h:21
unsigned char UCHAR
Definition: xmlstorage.h:181
#define RPC_FC_FLOAT
Definition: rpcfc.h:19
#define RPC_FC_BYTE
Definition: rpcfc.h:10
#define RPC_FC_SHORT
Definition: rpcfc.h:15
unsigned short USHORT
Definition: pedump.c:61
#define INT
Definition: msvc.h:26
#define RPC_FC_IGNORE
Definition: rpcfc.h:24
unsigned int ULONG
Definition: retypes.h:1
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
#define RPC_FC_UINT3264
Definition: rpcfc.h:151
#define BASE_TYPE_UNMARSHALL(type)
#define RPC_FC_ENUM32
Definition: rpcfc.h:23
#define UINT
Definition: msvc.h:27
#define RPC_FC_ERROR_STATUS_T
Definition: rpcfc.h:25
#define RPC_FC_LONG
Definition: rpcfc.h:17

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

1506 {
1507  return NdrStubCall2( This, channel, msg, phase );
1508 }
LONG WINAPI NdrStubCall2(struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg, DWORD *pdwStubPhase)
UINT msg
Definition: msvc.h:92

Referenced by NdrServerCall().

◆ NdrStubCall2()

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

Definition at line 1237 of file ndr_stubless.c.

1242 {
1243  const MIDL_SERVER_INFO *pServerInfo;
1244  const MIDL_STUB_DESC *pStubDesc;
1245  PFORMAT_STRING pFormat;
1246  MIDL_STUB_MESSAGE stubMsg;
1247  /* pointer to start of stack to pass into stub implementation */
1248  unsigned char * args;
1249  /* size of stack */
1250  unsigned short stack_size;
1251  /* number of parameters. optional for client to give it to us */
1252  unsigned int number_of_params;
1253  /* cache of Oif_flags from v2 procedure header */
1254  INTERPRETER_OPT_FLAGS Oif_flags = { 0 };
1255  /* cache of extension flags from NDR_PROC_HEADER_EXTS */
1256  INTERPRETER_OPT_FLAGS2 ext_flags = { 0 };
1257  /* the type of pass we are currently doing */
1258  enum stubless_phase phase;
1259  /* header for procedure string */
1260  const NDR_PROC_HEADER *pProcHeader;
1261  /* location to put retval into */
1262  LONG_PTR *retval_ptr = NULL;
1263  /* correlation cache */
1264  ULONG_PTR NdrCorrCache[256];
1265 
1266  TRACE("pThis %p, pChannel %p, pRpcMsg %p, pdwStubPhase %p\n", pThis, pChannel, pRpcMsg, pdwStubPhase);
1267 
1268  if (pThis)
1269  pServerInfo = CStdStubBuffer_GetServerInfo(pThis);
1270  else
1271  pServerInfo = ((RPC_SERVER_INTERFACE *)pRpcMsg->RpcInterfaceInformation)->InterpreterInfo;
1272 
1273  pStubDesc = pServerInfo->pStubDesc;
1274  pFormat = pServerInfo->ProcString + pServerInfo->FmtStringOffset[pRpcMsg->ProcNum];
1275  pProcHeader = (const NDR_PROC_HEADER *)&pFormat[0];
1276 
1277  TRACE("NDR Version: 0x%x\n", pStubDesc->Version);
1278 
1279  if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCFLAGS)
1280  {
1281  const NDR_PROC_HEADER_RPC *header_rpc = (const NDR_PROC_HEADER_RPC *)&pFormat[0];
1282  stack_size = header_rpc->stack_size;
1283  pFormat += sizeof(NDR_PROC_HEADER_RPC);
1284 
1285  }
1286  else
1287  {
1288  stack_size = pProcHeader->stack_size;
1289  pFormat += sizeof(NDR_PROC_HEADER);
1290  }
1291 
1292  TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags);
1293 
1294  /* binding */
1295  switch (pProcHeader->handle_type)
1296  {
1297  /* explicit binding: parse additional section */
1298  case RPC_FC_BIND_EXPLICIT:
1299  switch (*pFormat) /* handle_type */
1300  {
1301  case RPC_FC_BIND_PRIMITIVE: /* explicit primitive */
1302  pFormat += sizeof(NDR_EHD_PRIMITIVE);
1303  break;
1304  case RPC_FC_BIND_GENERIC: /* explicit generic */
1305  pFormat += sizeof(NDR_EHD_GENERIC);
1306  break;
1307  case RPC_FC_BIND_CONTEXT: /* explicit context */
1308  pFormat += sizeof(NDR_EHD_CONTEXT);
1309  break;
1310  default:
1311  ERR("bad explicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
1313  }
1314  break;
1315  case RPC_FC_BIND_GENERIC: /* implicit generic */
1316  case RPC_FC_BIND_PRIMITIVE: /* implicit primitive */
1317  case RPC_FC_CALLBACK_HANDLE: /* implicit callback */
1318  case RPC_FC_AUTO_HANDLE: /* implicit auto handle */
1319  break;
1320  default:
1321  ERR("bad implicit binding handle type (0x%02x)\n", pProcHeader->handle_type);
1323  }
1324 
1325  if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT)
1326  NdrStubInitialize(pRpcMsg, &stubMsg, pStubDesc, pChannel);
1327  else
1328  NdrServerInitializeNew(pRpcMsg, &stubMsg, pStubDesc);
1329 
1330  /* create the full pointer translation tables, if requested */
1331  if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_FULLPTR)
1333 
1334  /* store the RPC flags away */
1335  if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCFLAGS)
1336  pRpcMsg->RpcFlags = ((const NDR_PROC_HEADER_RPC *)pProcHeader)->rpc_flags;
1337 
1338  /* use alternate memory allocation routines */
1339  if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_RPCSSALLOC)
1340 #if 0
1341  NdrRpcSsEnableAllocate(&stubMsg);
1342 #else
1343  FIXME("Set RPCSS memory allocation routines\n");
1344 #endif
1345 
1346  TRACE("allocating memory for stack of size %x\n", stack_size);
1347 
1348  args = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, stack_size);
1349  stubMsg.StackTop = args; /* used by conformance of top-level objects */
1350 
1351  /* add the implicit This pointer as the first arg to the function if we
1352  * are calling an object method */
1353  if (pThis)
1354  *(void **)args = ((CStdStubBuffer *)pThis)->pvServerObject;
1355 
1356  if (is_oicf_stubdesc(pStubDesc))
1357  {
1358  const NDR_PROC_PARTIAL_OIF_HEADER *pOIFHeader = (const NDR_PROC_PARTIAL_OIF_HEADER *)pFormat;
1359 
1360  Oif_flags = pOIFHeader->Oi2Flags;
1361  number_of_params = pOIFHeader->number_of_params;
1362 
1363  pFormat += sizeof(NDR_PROC_PARTIAL_OIF_HEADER);
1364 
1365  TRACE("Oif_flags = %s\n", debugstr_INTERPRETER_OPT_FLAGS(Oif_flags) );
1366 
1367  if (Oif_flags.HasExtensions)
1368  {
1369  const NDR_PROC_HEADER_EXTS *pExtensions = (const NDR_PROC_HEADER_EXTS *)pFormat;
1370  ext_flags = pExtensions->Flags2;
1371  pFormat += pExtensions->Size;
1372  }
1373 
1374  if (Oif_flags.HasPipes)
1375  {
1376  FIXME("pipes not supported yet\n");
1377  RpcRaiseException(RPC_X_WRONG_STUB_VERSION); /* FIXME: remove when implemented */
1378  /* init pipes package */
1379  /* NdrPipesInitialize(...) */
1380  }
1381  if (ext_flags.HasNewCorrDesc)
1382  {
1383  /* initialize extra correlation package */
1384  NdrCorrelationInitialize(&stubMsg, NdrCorrCache, sizeof(NdrCorrCache), 0);
1385  if (ext_flags.Unused & 0x2) /* has range on conformance */
1386  stubMsg.CorrDespIncrement = 12;
1387  }
1388  }
1389  else
1390  {
1391  pFormat = convert_old_args( &stubMsg, pFormat, stack_size,
1392  pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT,
1393  /* reuse the correlation cache, it's not needed for v1 format */
1394  NdrCorrCache, sizeof(NdrCorrCache), &number_of_params );
1395  }
1396 
1397  /* convert strings, floating point values and endianness into our
1398  * preferred format */
1399  if ((pRpcMsg->DataRepresentation & 0x0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION)
1400  NdrConvert(&stubMsg, pFormat);
1401 
1402  for (phase = STUBLESS_UNMARSHAL; phase <= STUBLESS_FREE; phase++)
1403  {
1404  TRACE("phase = %d\n", phase);
1405  switch (phase)
1406  {
1407  case STUBLESS_CALLSERVER:
1408  /* call the server function */
1409  if (pServerInfo->ThunkTable && pServerInfo->ThunkTable[pRpcMsg->ProcNum])
1410  pServerInfo->ThunkTable[pRpcMsg->ProcNum](&stubMsg);
1411  else
1412  {
1414  LONG_PTR retval;
1415 
1416  if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT)
1417  {
1418  SERVER_ROUTINE *vtbl = *(SERVER_ROUTINE **)((CStdStubBuffer *)pThis)->pvServerObject;
1419  func = vtbl[pRpcMsg->ProcNum];
1420  }
1421  else
1422  func = pServerInfo->DispatchTable[pRpcMsg->ProcNum];
1423 
1424  /* FIXME: what happens with return values that don't fit into a single register on x86? */
1425  retval = call_server_func(func, args, stack_size);
1426 
1427  if (retval_ptr)
1428  {
1429  TRACE("stub implementation returned 0x%lx\n", retval);
1430  *retval_ptr = retval;
1431  }
1432  else
1433  TRACE("void stub implementation\n");
1434  }
1435 
1436  stubMsg.Buffer = NULL;
1437  stubMsg.BufferLength = 0;
1438 
1439  break;
1440  case STUBLESS_GETBUFFER:
1441  if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT)
1442  NdrStubGetBuffer(pThis, pChannel, &stubMsg);
1443  else
1444  {
1446 
1447  pRpcMsg->BufferLength = stubMsg.BufferLength;
1448  /* allocate buffer for [out] and [ret] params */
1449  Status = I_RpcGetBuffer(pRpcMsg);
1450  if (Status)
1452  stubMsg.Buffer = pRpcMsg->Buffer;
1453  }
1454  break;
1455  case STUBLESS_UNMARSHAL:
1456  case STUBLESS_INITOUT:
1457  case STUBLESS_CALCSIZE:
1458  case STUBLESS_MARSHAL:
1459  case STUBLESS_MUSTFREE:
1460  case STUBLESS_FREE:
1461  retval_ptr = stub_do_args(&stubMsg, pFormat, phase, number_of_params);
1462  break;
1463  default:
1464  ERR("shouldn't reach here. phase %d\n", phase);
1465  break;
1466  }
1467  }
1468 
1469  pRpcMsg->BufferLength = (unsigned int)(stubMsg.Buffer - (unsigned char *)pRpcMsg->Buffer);
1470 
1471  if (ext_flags.HasNewCorrDesc)
1472  {
1473  /* free extra correlation package */
1474  NdrCorrelationFree(&stubMsg);
1475  }
1476 
1477  if (Oif_flags.HasPipes)
1478  {
1479  /* NdrPipesDone(...) */
1480  }
1481 
1482  /* free the full pointer translation tables */
1483  if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_FULLPTR)
1485 
1486  /* free server function stack */
1487  HeapFree(GetProcessHeap(), 0, args);
1488 
1489  return S_OK;
1490 }
GLenum func
Definition: glext.h:6028
unsigned short stack_size
Definition: ndr_stubless.h:93
void * RpcInterfaceInformation
Definition: rpcdcep.h:44
#define RPC_FC_PROC_OIF_OBJECT
Definition: rpcfc.h:167
struct _NDR_EHD_GENERIC NDR_EHD_GENERIC
const MIDL_SERVER_INFO * CStdStubBuffer_GetServerInfo(IRpcStubBuffer *iface) DECLSPEC_HIDDEN
Definition: cstub.c:596
void WINAPI NdrFullPointerXlatFree(PFULL_PTR_XLAT_TABLES pXlatTables)
#define RPC_FC_BIND_PRIMITIVE
Definition: rpcfc.h:84
INTERPRETER_OPT_FLAGS2 Flags2
Definition: ndrtypes.h:99
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
const SERVER_ROUTINE * DispatchTable
Definition: rpcndr.h:422
unsigned char *WINAPI NdrServerInitializeNew(PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc)
unsigned char * Buffer
Definition: rpcndr.h:203
#define RPC_FC_PROC_OIF_FULLPTR
Definition: rpcfc.h:165
#define RPC_FC_BIND_CONTEXT
Definition: rpcfc.h:81
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
RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg)
Definition: rpc_message.c:1637
void WINAPI NdrConvert(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
Definition: match.c:390
uint32_t ULONG_PTR
Definition: typedefs.h:63
#define RPC_FC_BIND_EXPLICIT
Definition: rpcfc.h:160
unsigned int BufferLength
Definition: rpcdcep.h:41
long RPC_STATUS
Definition: rpc.h:52
void * Buffer
Definition: rpcdcep.h:40
PFORMAT_STRING ProcString
Definition: rpcndr.h:423
#define FIXME(fmt,...)
Definition: debug.h:110
INTERPRETER_OPT_FLAGS Oi2Flags
Definition: ndr_stubless.h:109
unsigned int ProcNum
Definition: rpcdcep.h:42
void WINAPI NdrStubInitialize(PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDescriptor, LPRPCCHANNELBUFFER pRpcChannelBuffer)
Definition: cstub.c:619
smooth NULL
Definition: ftsmooth.c:416
void WINAPI NdrCorrelationInitialize(PMIDL_STUB_MESSAGE pStubMsg, void *pMemory, ULONG CacheSize, ULONG Flags)
stubless_phase
Definition: ndr_stubless.h:231
void WINAPI NdrStubGetBuffer(LPRPCSTUBBUFFER iface, LPRPCCHANNELBUFFER pRpcChannelBuffer, PMIDL_STUB_MESSAGE pStubMsg)
Definition: cstub.c:635
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:534
struct _NDR_EHD_CONTEXT NDR_EHD_CONTEXT
#define TRACE(s)
Definition: solgame.cpp:4
#define RPC_FC_BIND_GENERIC
Definition: rpcfc.h:83
#define GetProcessHeap()
Definition: compat.h:395
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
#define RPC_FC_PROC_OIF_RPCFLAGS
Definition: rpcfc.h:168
const unsigned char * PFORMAT_STRING
Definition: rpcndr.h:176
ULONG RpcFlags
Definition: rpcdcep.h:48
struct _NDR_PROC_PARTIAL_OIF_HEADER NDR_PROC_PARTIAL_OIF_HEADER
unsigned char HasNewCorrDesc
Definition: ndrtypes.h:76
ULONG BufferLength
Definition: rpcndr.h:207
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
LONG(__RPC_API * SERVER_ROUTINE)()
Definition: rpcndr.h:416
Status
Definition: gdiplustypes.h:24
#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)
#define S_OK
Definition: intsafe.h:59
static const char * debugstr_INTERPRETER_OPT_FLAGS(INTERPRETER_OPT_FLAGS Oi2Flags)
Definition: ndr_stubless.c:256
#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 RPC_FC_PROC_OIF_RPCSSALLOC
Definition: rpcfc.h:166
#define RPC_X_WRONG_STUB_VERSION
Definition: winerror.h:1136
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
void WINAPI NdrCorrelationFree(PMIDL_STUB_MESSAGE pStubMsg)
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3706
unsigned char CorrDespIncrement
Definition: rpcndr.h:218
struct _NDR_EHD_PRIMITIVE NDR_EHD_PRIMITIVE
#define RPC_FC_AUTO_HANDLE
Definition: rpcfc.h:85
#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)
#define RPC_FC_CALLBACK_HANDLE
Definition: rpcfc.h:86
unsigned char HasExtensions
Definition: ndrtypes.h:68
ULONG DataRepresentation
Definition: rpcdcep.h:39
#define args
Definition: format.c:66
#define HeapFree(x, y, z)
Definition: compat.h:394
static BOOL is_oicf_stubdesc(const PMIDL_STUB_DESC pStubDesc)
Definition: ndr_stubless.c:53
unsigned char Size
Definition: ndrtypes.h:97
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:29

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

◆ NdrUserMarshalSimpleTypeConvert()

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

◆ RpcSmDestroyClientContext()

RPCRTAPI RPC_STATUS RPC_ENTRY RpcSmDestroyClientContext ( void **  ContextHandle)

Definition at line 123 of file ndr_contexthandle.c.

124 {
126  struct context_handle_entry *che = NULL;
127 
128  TRACE("(%p)\n", ContextHandle);
129 
131  che = get_context_entry(*ContextHandle);
132  *ContextHandle = NULL;
133  if (che)
134  {
135  status = RPC_S_OK;
136  list_remove(&che->entry);
137  }
138 
140 
141  if (che)
142  {
143  RpcBindingFree(&che->handle);
144  HeapFree(GetProcessHeap(), 0, che);
145  }
146 
147  return status;
148 }
#define RPC_X_SS_CONTEXT_MISMATCH
Definition: rpcnterr.h:39
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:784
static CRITICAL_SECTION ndr_context_cs
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
long RPC_STATUS
Definition: rpc.h:52
smooth NULL
Definition: ftsmooth.c:416
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
static struct context_handle_entry * get_context_entry(NDR_CCONTEXT CContext)
struct list entry
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
static SERVICE_STATUS status
Definition: service.c:31
#define HeapFree(x, y, z)
Definition: compat.h:394
#define RPC_S_OK
Definition: rpcnterr.h:22
RPC_BINDING_HANDLE handle
Definition: ps.c:97

Referenced by RpcSsDestroyClientContext().

◆ RpcSsDestroyClientContext()

RPCRTAPI void RPC_ENTRY RpcSsDestroyClientContext ( void **  ContextHandle)

Definition at line 153 of file ndr_contexthandle.c.

154 {
156  if (status != RPC_S_OK)
158 }
void DECLSPEC_NORETURN WINAPI RpcRaiseException(RPC_STATUS exception)
Definition: rpcrt4_main.c:189
long RPC_STATUS
Definition: rpc.h:52
#define RPC_S_OK
Definition: rpcnterr.h:22
RPC_STATUS WINAPI RpcSmDestroyClientContext(void **ContextHandle)
Definition: ps.c:97