Commit bea0b255 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

- Add more RPC format characters.

- Add some NDR functions and structures.
parent c7201ce3
...@@ -308,8 +308,83 @@ typedef enum { ...@@ -308,8 +308,83 @@ typedef enum {
PROXY_UNMARSHAL PROXY_UNMARSHAL
} PROXY_PHASE; } PROXY_PHASE;
typedef enum {
XLAT_SERVER = 1,
XLAT_CLIENT
} XLAT_SIDE;
typedef struct _FULL_PTR_TO_REFID_ELEMENT {
struct _FULL_PTR_TO_REFID_ELEMENT *Next;
void *Pointer;
unsigned long RefId;
unsigned char State;
} FULL_PTR_TO_REFID_ELEMENT, *PFULL_PTR_TO_REFID_ELEMENT;
/* Full pointer translation tables */
typedef struct _FULL_PTR_XLAT_TABLES {
struct {
void **XlatTable;
unsigned char *StateTable;
unsigned long NumberOfEntries;
} RefIdToPointer;
struct {
PFULL_PTR_TO_REFID_ELEMENT *XlatTable;
unsigned long NumberOfBuckets;
unsigned long HashMask;
} PointerToRefId;
unsigned long NextRefId;
XLAT_SIDE XlatSide;
} FULL_PTR_XLAT_TABLES, *PFULL_PTR_XLAT_TABLES;
struct IRpcStubBuffer; struct IRpcStubBuffer;
typedef unsigned long error_status_t;
typedef void * NDR_CCONTEXT;
typedef struct _SCONTEXT_QUEUE {
unsigned long NumberOfObjects;
NDR_SCONTEXT *ArrayOfObjects;
} SCONTEXT_QUEUE, *PSCONTEXT_QUEUE;
RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
NDRCContextBinding( IN NDR_CCONTEXT CContext );
RPCRTAPI void RPC_ENTRY
NDRCContextMarshall( IN NDR_CCONTEXT CContext, OUT void *pBuff );
RPCRTAPI void RPC_ENTRY
NDRCContextUnmarshall( OUT NDR_CCONTEXT *pCContext, IN RPC_BINDING_HANDLE hBinding,
IN void *pBuff, IN unsigned long DataRepresentation );
RPCRTAPI void RPC_ENTRY
NDRSContextMarshall( IN NDR_SCONTEXT CContext, OUT void *pBuff, IN NDR_RUNDOWN userRunDownIn );
RPCRTAPI NDR_SCONTEXT RPC_ENTRY
NDRSContextUnmarshall( IN void *pBuff, IN unsigned long DataRepresentation );
RPCRTAPI void RPC_ENTRY
NDRSContextMarshallEx( IN RPC_BINDING_HANDLE BindingHandle, IN NDR_SCONTEXT CContext,
OUT void *pBuff, IN NDR_RUNDOWN userRunDownIn );
RPCRTAPI void RPC_ENTRY
NDRSContextMarshall2( IN RPC_BINDING_HANDLE BindingHandle, IN NDR_SCONTEXT CContext,
OUT void *pBuff, IN NDR_RUNDOWN userRunDownIn, IN void * CtxGuard,
IN unsigned long Flags );
RPCRTAPI NDR_SCONTEXT RPC_ENTRY
NDRSContextUnmarshallEx( IN RPC_BINDING_HANDLE BindingHandle, IN void *pBuff,
IN unsigned long DataRepresentation );
RPCRTAPI NDR_SCONTEXT RPC_ENTRY
NDRSContextUnmarshall2( IN RPC_BINDING_HANDLE BindingHandle, IN void *pBuff,
IN unsigned long DataRepresentation, IN void *CtxGuard,
IN unsigned long Flags );
RPCRTAPI void RPC_ENTRY
RpcSsDestroyClientContext( IN void **ContextHandle );
RPCRTAPI void RPC_ENTRY RPCRTAPI void RPC_ENTRY
NdrSimpleTypeMarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar ); NdrSimpleTypeMarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar );
RPCRTAPI void RPC_ENTRY RPCRTAPI void RPC_ENTRY
...@@ -359,9 +434,9 @@ RPCRTAPI void RPC_ENTRY ...@@ -359,9 +434,9 @@ RPCRTAPI void RPC_ENTRY
RPCRTAPI void RPC_ENTRY RPCRTAPI void RPC_ENTRY
NdrConvert( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat ); NdrConvert( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
LONG_PTR /* CLIENT_CALL_RETURN */ RPC_VAR_ENTRY LONG_PTR RPC_VAR_ENTRY
NdrClientCall2( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... ); NdrClientCall2( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... );
LONG_PTR /* CLIENT_CALL_RETURN */ RPC_VAR_ENTRY LONG_PTR RPC_VAR_ENTRY
NdrClientCall( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... ); NdrClientCall( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... );
RPCRTAPI void RPC_ENTRY RPCRTAPI void RPC_ENTRY
...@@ -397,4 +472,39 @@ RPCRTAPI void RPC_ENTRY ...@@ -397,4 +472,39 @@ RPCRTAPI void RPC_ENTRY
RPCRTAPI unsigned char* RPC_ENTRY RPCRTAPI unsigned char* RPC_ENTRY
NdrSendReceive( MIDL_STUB_MESSAGE *stubmsg, unsigned char *buffer ); NdrSendReceive( MIDL_STUB_MESSAGE *stubmsg, unsigned char *buffer );
RPCRTAPI unsigned char * RPC_ENTRY
NdrNsGetBuffer( PMIDL_STUB_MESSAGE pStubMsg, unsigned long BufferLength, RPC_BINDING_HANDLE Handle );
RPCRTAPI unsigned char * RPC_ENTRY
NdrNsSendReceive( PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pBufferEnd, RPC_BINDING_HANDLE *pAutoHandle );
RPCRTAPI PFULL_PTR_XLAT_TABLES RPC_ENTRY
NdrFullPointerXlatInit( unsigned long 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, unsigned long *pRefId );
RPCRTAPI int RPC_ENTRY
NdrFullPointerQueryRefId( PFULL_PTR_XLAT_TABLES pXlatTables, unsigned long RefId,
unsigned char QueryType, void **ppPointer );
RPCRTAPI void RPC_ENTRY
NdrFullPointerInsertRefId( PFULL_PTR_XLAT_TABLES pXlatTables, unsigned long 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( IN size_t Size );
RPCRTAPI void RPC_ENTRY
NdrRpcSmClientFree( IN void *NodeToFree );
RPCRTAPI void * RPC_ENTRY
NdrRpcSsDefaultAllocate( IN size_t Size );
RPCRTAPI void RPC_ENTRY
NdrRpcSsDefaultFree( IN void *NodeToFree );
#endif /*__WINE_RPCNDR_H */ #endif /*__WINE_RPCNDR_H */
...@@ -30,11 +30,11 @@ ...@@ -30,11 +30,11 @@
#define RPC_FC_OP 0x13 /* unique pointer in object ? */ #define RPC_FC_OP 0x13 /* unique pointer in object ? */
#define RPC_FC_FP 0x14 /* full pointer */ #define RPC_FC_FP 0x14 /* full pointer */
/* FC_RP/UP/OP/FP: flags, NdrFcShort(typeofs)/basetype */ /* FC_RP/UP/OP/FP: flags, NdrFcShort(typeofs)/basetype */
#define RPC_FC_P_ALLOCALLNODES 0x01 #define RPC_FC_P_ALLOCALLNODES 0x01
#define RPC_FC_P_DONTFREE 0x02 #define RPC_FC_P_DONTFREE 0x02
#define RPC_FC_P_ONSTACK 0x04 /* [alloced_on_stack] */ #define RPC_FC_P_ONSTACK 0x04 /* [alloced_on_stack] */
#define RPC_FC_P_SIMPLEPOINTER 0x08 /* [simple_pointer] */ #define RPC_FC_P_SIMPLEPOINTER 0x08 /* [simple_pointer] */
#define RPC_FC_P_DEREF 0x10 #define RPC_FC_P_DEREF 0x10
#define RPC_FC_STRUCT 0x15 /* simple structure */ #define RPC_FC_STRUCT 0x15 /* simple structure */
/* FC_STRUCT: align-1, NdrFcShort(size), fields */ /* FC_STRUCT: align-1, NdrFcShort(size), fields */
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
#define RPC_FC_CSTRUCT 0x17 /* conformant structure */ #define RPC_FC_CSTRUCT 0x17 /* conformant structure */
#define RPC_FC_CPSTRUCT 0x18 /* conformant structure w/ pointers */
#define RPC_FC_BOGUS_STRUCT 0x1a /* complex structure */ #define RPC_FC_BOGUS_STRUCT 0x1a /* complex structure */
#define RPC_FC_CARRAY 0x1b /* conformant array */ #define RPC_FC_CARRAY 0x1b /* conformant array */
...@@ -53,6 +55,12 @@ ...@@ -53,6 +55,12 @@
#define RPC_FC_SMFARRAY 0x1d /* small (<64K) fixed array */ #define RPC_FC_SMFARRAY 0x1d /* small (<64K) fixed array */
/* FC_SMFARRAY: align-1, NdrFcShort(size), ptrs, fields */ /* FC_SMFARRAY: align-1, NdrFcShort(size), ptrs, fields */
#define RPC_FC_LGFARRAY 0x1e /* large (>= 64k) fixed array */
#define RPC_FC_SMVARRAY 0x1f /* small (<64k) varying array */
#define RPC_FC_LGVARRAY 0x20 /* large (>= 64k) varying array */
#define RPC_FC_BOGUS_ARRAY 0x21 /* complex array */ #define RPC_FC_BOGUS_ARRAY 0x21 /* complex array */
#define RPC_FC_C_CSTRING 0x22 #define RPC_FC_C_CSTRING 0x22
...@@ -61,10 +69,16 @@ ...@@ -61,10 +69,16 @@
#define RPC_FC_ENCAPSULATED_UNION 0x2a #define RPC_FC_ENCAPSULATED_UNION 0x2a
#define RPC_FC_NON_ENCAPSULATED_UNION 0x2b #define RPC_FC_NON_ENCAPSULATED_UNION 0x2b
#define RPC_FC_BYTE_COUNT_POINTER 0x2c /* [byte_count] ACF attribute */
#define RPC_FC_TRANSMIT_AS 0x2d
#define RPC_FC_REPRESENT_AS 0x2e
#define RPC_FC_IP 0x2f /* interface pointer */ #define RPC_FC_IP 0x2f /* interface pointer */
/* FC_IP: FC_CONSTANT_IID iid */ /* FC_IP: FC_CONSTANT_IID iid */
/* FC_IP: FC_PAD correlation */ /* FC_IP: FC_PAD correlation */
#define RPC_FC_BIND_EXPLICIT 0x00
#define RPC_FC_BIND_CONTEXT 0x30 #define RPC_FC_BIND_CONTEXT 0x30
#define RPC_FC_BIND_GENERIC 0x31 #define RPC_FC_BIND_GENERIC 0x31
...@@ -100,6 +114,11 @@ ...@@ -100,6 +114,11 @@
#define RPC_FC_PROC_PF_DONTFREEINST 0x0200 #define RPC_FC_PROC_PF_DONTFREEINST 0x0200
#define RPC_FC_PROC_PF_SAVEASYNC 0x0400 #define RPC_FC_PROC_PF_SAVEASYNC 0x0400
#define RPC_FC_PROC_PF_SRVALLOCSIZE 0xe000 /* in 8 byte units */ #define RPC_FC_PROC_PF_SRVALLOCSIZE 0xe000 /* in 8 byte units */
#define RPC_FC_PROC_EXT_NEWCORRDESC 0x01
#define RPC_FC_PROC_EXT_CLIENTCORRCHECK 0x02
#define RPC_FC_PROC_EXT_SERVERCORRCHECK 0x04
#define RPC_FC_PROC_EXT_HASNOTIFY 0x08
#define RPC_FC_PROC_EXT_HASNOTIFY2 0x10
#define RPC_FC_POINTER 0x36 #define RPC_FC_POINTER 0x36
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment