From 95a149a8df4044a35fc78ca8071798b8fbd48c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Fri, 12 Aug 2005 17:50:33 +0000 Subject: [PATCH] Sync to Wine-20050725: Francois Gouget - Fix the NdrVaryingArrayUnmarshall prototype (reported by winapi_check). - Assorted spelling fixes. Robert Shearman - Add stubs for most of the NDR marshaling functions. - IRpcStubBuffer_Disconnect can be called more than once. Mike McCormack - Interlocked LONG* gcc warning fixes. Stefan Huehner - Fix -Wmissing-declarations warnings. - Fix some missing-declarations warnings. svn path=/trunk/; revision=17337 --- reactos/lib/rpcrt4/cstub.c | 9 +- reactos/lib/rpcrt4/ndr_marshall.c | 499 +++++++++++++++++++++++++++++- reactos/lib/rpcrt4/ndr_ole.c | 2 +- reactos/lib/rpcrt4/rpc_binding.c | 2 +- reactos/lib/rpcrt4/rpc_binding.h | 2 +- reactos/lib/rpcrt4/rpc_message.c | 9 +- reactos/lib/rpcrt4/rpc_message.h | 3 - reactos/lib/rpcrt4/rpc_server.c | 2 +- reactos/lib/rpcrt4/rpcrt4.spec | 100 +++--- reactos/lib/rpcrt4/rpcrt4_main.c | 2 +- 10 files changed, 552 insertions(+), 78 deletions(-) diff --git a/reactos/lib/rpcrt4/cstub.c b/reactos/lib/rpcrt4/cstub.c index 574f63b3e35..98c7553f321 100644 --- a/reactos/lib/rpcrt4/cstub.c +++ b/reactos/lib/rpcrt4/cstub.c @@ -100,8 +100,7 @@ ULONG WINAPI NdrCStdStubBuffer_Release(LPRPCSTUBBUFFER iface, TRACE("(%p)->Release()\n",This); if (!--(This->RefCount)) { - if(This->pvServerObject) - IUnknown_Release(This->pvServerObject); + IRpcStubBuffer_Disconnect(iface); if(This->pPSFactory) IPSFactoryBuffer_Release(This->pPSFactory); HeapFree(GetProcessHeap(),0,This); @@ -123,7 +122,11 @@ void WINAPI CStdStubBuffer_Disconnect(LPRPCSTUBBUFFER iface) { CStdStubBuffer *This = (CStdStubBuffer *)iface; TRACE("(%p)->Disconnect()\n",This); - This->pvServerObject = NULL; + if (This->pvServerObject) + { + IUnknown_Release(This->pvServerObject); + This->pvServerObject = NULL; + } } HRESULT WINAPI CStdStubBuffer_Invoke(LPRPCSTUBBUFFER iface, diff --git a/reactos/lib/rpcrt4/ndr_marshall.c b/reactos/lib/rpcrt4/ndr_marshall.c index 366ee78f3f9..72cce6f457e 100644 --- a/reactos/lib/rpcrt4/ndr_marshall.c +++ b/reactos/lib/rpcrt4/ndr_marshall.c @@ -114,16 +114,23 @@ NDR_MARSHALL NdrMarshaller[NDR_TABLE_SIZE] = { NdrPointerMarshall, NdrPointerMarshall, /* 0x15 */ NdrSimpleStructMarshall, NdrSimpleStructMarshall, - 0, 0, 0, + NdrConformantStructMarshall, NdrConformantStructMarshall, + NdrConformantVaryingStructMarshall, NdrComplexStructMarshall, /* 0x1b */ - NdrConformantArrayMarshall, 0, 0, 0, 0, 0, + NdrConformantArrayMarshall, + NdrConformantVaryingArrayMarshall, + NdrFixedArrayMarshall, NdrFixedArrayMarshall, + NdrVaryingArrayMarshall, NdrVaryingArrayMarshall, NdrComplexArrayMarshall, /* 0x22 */ NdrConformantStringMarshall, 0, 0, NdrConformantStringMarshall, 0, 0, 0, 0, /* 0x2a */ - 0, 0, 0, 0, 0, + NdrEncapsulatedUnionMarshall, + NdrNonEncapsulatedUnionMarshall, + 0, + NdrXmitOrRepAsMarshall, NdrXmitOrRepAsMarshall, /* 0x2f */ NdrInterfacePointerMarshall, /* 0xb0 */ @@ -140,16 +147,23 @@ NDR_UNMARSHALL NdrUnmarshaller[NDR_TABLE_SIZE] = { NdrPointerUnmarshall, NdrPointerUnmarshall, /* 0x15 */ NdrSimpleStructUnmarshall, NdrSimpleStructUnmarshall, - 0, 0, 0, + NdrConformantStructUnmarshall, NdrConformantStructUnmarshall, + NdrConformantVaryingStructUnmarshall, NdrComplexStructUnmarshall, /* 0x1b */ - NdrConformantArrayUnmarshall, 0, 0, 0, 0, 0, + NdrConformantArrayUnmarshall, + NdrConformantVaryingArrayUnmarshall, + NdrFixedArrayUnmarshall, NdrFixedArrayUnmarshall, + NdrVaryingArrayUnmarshall, NdrVaryingArrayUnmarshall, NdrComplexArrayUnmarshall, /* 0x22 */ NdrConformantStringUnmarshall, 0, 0, NdrConformantStringUnmarshall, 0, 0, 0, 0, /* 0x2a */ - 0, 0, 0, 0, 0, + NdrEncapsulatedUnionUnmarshall, + NdrNonEncapsulatedUnionUnmarshall, + 0, + NdrXmitOrRepAsUnmarshall, NdrXmitOrRepAsUnmarshall, /* 0x2f */ NdrInterfacePointerUnmarshall, /* 0xb0 */ @@ -166,16 +180,23 @@ NDR_BUFFERSIZE NdrBufferSizer[NDR_TABLE_SIZE] = { NdrPointerBufferSize, NdrPointerBufferSize, /* 0x15 */ NdrSimpleStructBufferSize, NdrSimpleStructBufferSize, - 0, 0, 0, + NdrConformantStructBufferSize, NdrConformantStructBufferSize, + NdrConformantVaryingStructBufferSize, NdrComplexStructBufferSize, /* 0x1b */ - NdrConformantArrayBufferSize, 0, 0, 0, 0, 0, + NdrConformantArrayBufferSize, + NdrConformantVaryingArrayBufferSize, + NdrFixedArrayBufferSize, NdrFixedArrayBufferSize, + NdrVaryingArrayBufferSize, NdrVaryingArrayBufferSize, NdrComplexArrayBufferSize, /* 0x22 */ NdrConformantStringBufferSize, 0, 0, NdrConformantStringBufferSize, 0, 0, 0, 0, /* 0x2a */ - 0, 0, 0, 0, 0, + NdrEncapsulatedUnionBufferSize, + NdrNonEncapsulatedUnionBufferSize, + 0, + NdrXmitOrRepAsBufferSize, NdrXmitOrRepAsBufferSize, /* 0x2f */ NdrInterfacePointerBufferSize, /* 0xb0 */ @@ -218,15 +239,23 @@ NDR_FREE NdrFreer[NDR_TABLE_SIZE] = { NdrPointerFree, NdrPointerFree, /* 0x15 */ NdrSimpleStructFree, NdrSimpleStructFree, - 0, 0, 0, + NdrConformantStructFree, NdrConformantStructFree, + NdrConformantVaryingStructFree, NdrComplexStructFree, /* 0x1b */ - NdrConformantArrayFree, 0, 0, 0, 0, 0, + NdrConformantArrayFree, + NdrConformantVaryingArrayFree, + NdrFixedArrayFree, NdrFixedArrayFree, + NdrVaryingArrayFree, NdrVaryingArrayFree, NdrComplexArrayFree, /* 0x22 */ - 0, 0, 0, 0, 0, 0, 0, 0, - /* 0x2a */ + 0, 0, 0, 0, 0, 0, 0, 0, + /* 0x2a */ + NdrEncapsulatedUnionFree, + NdrNonEncapsulatedUnionFree, + 0, + NdrXmitOrRepAsFree, NdrXmitOrRepAsFree, /* 0x2f */ NdrInterfacePointerFree, /* 0xb0 */ @@ -2191,3 +2220,447 @@ void WINAPI NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, lo /* FIXME: since this stub doesn't do any converting, the proper behavior is to raise an exception */ } + +/*********************************************************************** + * NdrConformantStructMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrConformantStructMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrConformantStructUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrConformantStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrConformantStructBufferSize [RPCRT4.@] + */ +void WINAPI NdrConformantStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrConformantStructMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrConformantStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/*********************************************************************** + * NdrConformantStructFree [RPCRT4.@] + */ +void WINAPI NdrConformantStructFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrConformantVaryingStructMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrConformantVaryingStructMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrConformantVaryingStructUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrConformantVaryingStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrConformantVaryingStructBufferSize [RPCRT4.@] + */ +void WINAPI NdrConformantVaryingStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrConformantVaryingStructMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrConformantVaryingStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/*********************************************************************** + * NdrConformantVaryingStructFree [RPCRT4.@] + */ +void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrFixedArrayMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrFixedArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrFixedArrayUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrFixedArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrFixedArrayBufferSize [RPCRT4.@] + */ +void WINAPI NdrFixedArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrFixedArrayMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrFixedArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/*********************************************************************** + * NdrFixedArrayFree [RPCRT4.@] + */ +void WINAPI NdrFixedArrayFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrVaryingArrayMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrVaryingArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrVaryingArrayUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrVaryingArrayBufferSize [RPCRT4.@] + */ +void WINAPI NdrVaryingArrayBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrVaryingArrayMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrVaryingArrayMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/*********************************************************************** + * NdrVaryingArrayFree [RPCRT4.@] + */ +void WINAPI NdrVaryingArrayFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrEncapsulatedUnionMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrEncapsulatedUnionUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrEncapsulatedUnionBufferSize [RPCRT4.@] + */ +void WINAPI NdrEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrEncapsulatedUnionMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/*********************************************************************** + * NdrEncapsulatedUnionFree [RPCRT4.@] + */ +void WINAPI NdrEncapsulatedUnionFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrNonEncapsulatedUnionMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrNonEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrNonEncapsulatedUnionUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrNonEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrNonEncapsulatedUnionBufferSize [RPCRT4.@] + */ +void WINAPI NdrNonEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrNonEncapsulatedUnionMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrNonEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/*********************************************************************** + * NdrNonEncapsulatedUnionFree [RPCRT4.@] + */ +void WINAPI NdrNonEncapsulatedUnionFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrByteCountPointerMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrByteCountPointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrByteCountPointerUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrByteCountPointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrByteCountPointerBufferSize [RPCRT4.@] + */ +void WINAPI NdrByteCountPointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrByteCountPointerMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrByteCountPointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/*********************************************************************** + * NdrByteCountPointerFree [RPCRT4.@] + */ +void WINAPI NdrByteCountPointerFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrXmitOrRepAsMarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrXmitOrRepAsMarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrXmitOrRepAsUnmarshall [RPCRT4.@] + */ +unsigned char * WINAPI NdrXmitOrRepAsUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char **ppMemory, + PFORMAT_STRING pFormat, + unsigned char fMustAlloc) +{ + FIXME("stub\n"); + return NULL; +} + +/*********************************************************************** + * NdrXmitOrRepAsBufferSize [RPCRT4.@] + */ +void WINAPI NdrXmitOrRepAsBufferSize(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrXmitOrRepAsMemorySize [RPCRT4.@] + */ +unsigned long WINAPI NdrXmitOrRepAsMemorySize(PMIDL_STUB_MESSAGE pStubMsg, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); + return 0; +} + +/*********************************************************************** + * NdrXmitOrRepAsFree [RPCRT4.@] + */ +void WINAPI NdrXmitOrRepAsFree(PMIDL_STUB_MESSAGE pStubMsg, + unsigned char *pMemory, + PFORMAT_STRING pFormat) +{ + FIXME("stub\n"); +} + +/*********************************************************************** + * NdrClientContextMarshall + */ +void WINAPI NdrClientContextMarshall(PMIDL_STUB_MESSAGE pStubMsg, + NDR_CCONTEXT ContextHandle, + int fCheck) +{ + FIXME("(%p, %p, %d): stub\n", pStubMsg, ContextHandle, fCheck); +} + +/*********************************************************************** + * NdrClientContextUnmarshall + */ +void WINAPI NdrClientContextUnmarshall(PMIDL_STUB_MESSAGE pStubMsg, + NDR_CCONTEXT * pContextHandle, + RPC_BINDING_HANDLE BindHandle) +{ + FIXME("(%p, %p, %p): stub\n", pStubMsg, pContextHandle, BindHandle); +} diff --git a/reactos/lib/rpcrt4/ndr_ole.c b/reactos/lib/rpcrt4/ndr_ole.c index baa3f07338a..7a8cdb55b68 100644 --- a/reactos/lib/rpcrt4/ndr_ole.c +++ b/reactos/lib/rpcrt4/ndr_ole.c @@ -223,7 +223,7 @@ static LPSTREAM RpcStream_Create(PMIDL_STUB_MESSAGE pStubMsg, BOOL init) return (LPSTREAM)This; } -const IID* get_ip_iid(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat) +static const IID* get_ip_iid(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat) { const IID *riid; if (!pFormat) return &IID_IUnknown; diff --git a/reactos/lib/rpcrt4/rpc_binding.c b/reactos/lib/rpcrt4/rpc_binding.c index a4f0210808c..87dcce1878a 100644 --- a/reactos/lib/rpcrt4/rpc_binding.c +++ b/reactos/lib/rpcrt4/rpc_binding.c @@ -312,7 +312,7 @@ RPC_STATUS RPCRT4_SpawnConnection(RpcConnection** Connection, RpcConnection* Old return err; } -RPC_STATUS RPCRT4_AllocBinding(RpcBinding** Binding, BOOL server) +static RPC_STATUS RPCRT4_AllocBinding(RpcBinding** Binding, BOOL server) { RpcBinding* NewBinding; diff --git a/reactos/lib/rpcrt4/rpc_binding.h b/reactos/lib/rpcrt4/rpc_binding.h index 242492daa9b..e0f39aad4ed 100644 --- a/reactos/lib/rpcrt4/rpc_binding.h +++ b/reactos/lib/rpcrt4/rpc_binding.h @@ -41,7 +41,7 @@ typedef struct _RpcConnection /* don't know what MS's structure looks like */ typedef struct _RpcBinding { - DWORD refs; + LONG refs; struct _RpcBinding* Next; BOOL server; UUID ObjectUuid; diff --git a/reactos/lib/rpcrt4/rpc_message.c b/reactos/lib/rpcrt4/rpc_message.c index 00c39efa901..784589d88e0 100644 --- a/reactos/lib/rpcrt4/rpc_message.c +++ b/reactos/lib/rpcrt4/rpc_message.c @@ -41,10 +41,11 @@ #include "rpc_binding.h" #include "rpc_misc.h" #include "rpc_defs.h" +#include "rpc_message.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); -DWORD RPCRT4_GetHeaderSize(RpcPktHdr *Header) +static DWORD RPCRT4_GetHeaderSize(RpcPktHdr *Header) { static const DWORD header_sizes[] = { sizeof(Header->request), 0, sizeof(Header->response), @@ -67,7 +68,7 @@ DWORD RPCRT4_GetHeaderSize(RpcPktHdr *Header) return ret; } -VOID RPCRT4_BuildCommonHeader(RpcPktHdr *Header, unsigned char PacketType, +static VOID RPCRT4_BuildCommonHeader(RpcPktHdr *Header, unsigned char PacketType, unsigned long DataRepresentation) { Header->common.rpc_ver = RPC_VER_MAJOR; @@ -83,7 +84,7 @@ VOID RPCRT4_BuildCommonHeader(RpcPktHdr *Header, unsigned char PacketType, /* Flags and fragment length are computed in RPCRT4_Send. */ } -RpcPktHdr *RPCRT4_BuildRequestHeader(unsigned long DataRepresentation, +static RpcPktHdr *RPCRT4_BuildRequestHeader(unsigned long DataRepresentation, unsigned long BufferLength, unsigned short ProcNum, UUID *ObjectUuid) @@ -113,7 +114,7 @@ RpcPktHdr *RPCRT4_BuildRequestHeader(unsigned long DataRepresentation, return header; } -RpcPktHdr *RPCRT4_BuildResponseHeader(unsigned long DataRepresentation, +static RpcPktHdr *RPCRT4_BuildResponseHeader(unsigned long DataRepresentation, unsigned long BufferLength) { RpcPktHdr *header; diff --git a/reactos/lib/rpcrt4/rpc_message.h b/reactos/lib/rpcrt4/rpc_message.h index 18a73a9fb0a..59ee9c050ec 100644 --- a/reactos/lib/rpcrt4/rpc_message.h +++ b/reactos/lib/rpcrt4/rpc_message.h @@ -24,9 +24,6 @@ #include "wine/rpcss_shared.h" #include "rpc_defs.h" -VOID RPCRT4_BuildCommonHeader(RpcPktHdr *Header, unsigned char PacketType, unsigned long DataRepresentation); -RpcPktHdr *RPCRT4_BuildRequestHeader(unsigned long DataRepresentation, unsigned long BufferLength, unsigned short ProcNum, UUID *ObjectUuid); -RpcPktHdr *RPCRT4_BuildResponseHeader(unsigned long DataRepresentation, unsigned long BufferLength); RpcPktHdr *RPCRT4_BuildFaultHeader(unsigned long DataRepresentation, RPC_STATUS Status); RpcPktHdr *RPCRT4_BuildBindHeader(unsigned long DataRepresentation, unsigned short MaxTransmissionSize, unsigned short MaxReceiveSize, RPC_SYNTAX_IDENTIFIER *AbstractId, RPC_SYNTAX_IDENTIFIER *TransferId); RpcPktHdr *RPCRT4_BuildBindNackHeader(unsigned long DataRepresentation, unsigned char RpcVersion, unsigned char RpcVersionMinor); diff --git a/reactos/lib/rpcrt4/rpc_server.c b/reactos/lib/rpcrt4/rpc_server.c index 13988a903cf..7eebf1056a4 100644 --- a/reactos/lib/rpcrt4/rpc_server.c +++ b/reactos/lib/rpcrt4/rpc_server.c @@ -117,7 +117,7 @@ static RpcPacket* spacket_head; static RpcPacket* spacket_tail; static HANDLE server_sem; -static DWORD worker_count, worker_free, worker_tls; +static LONG worker_count, worker_free, worker_tls; static UUID uuid_nil; diff --git a/reactos/lib/rpcrt4/rpcrt4.spec b/reactos/lib/rpcrt4/rpcrt4.spec index 29666eff7f5..4faaaef6c9c 100644 --- a/reactos/lib/rpcrt4/rpcrt4.spec +++ b/reactos/lib/rpcrt4/rpcrt4.spec @@ -150,17 +150,17 @@ @ stdcall NdrAllocate(ptr long) @ stub NdrAsyncClientCall @ stub NdrAsyncServerCall -@ stub NdrByteCountPointerBufferSize -@ stub NdrByteCountPointerFree -@ stub NdrByteCountPointerMarshall -@ stub NdrByteCountPointerUnmarshall +@ stdcall NdrByteCountPointerBufferSize(ptr ptr ptr) +@ stdcall NdrByteCountPointerFree(ptr ptr ptr) +@ stdcall NdrByteCountPointerMarshall(ptr ptr ptr) +@ stdcall NdrByteCountPointerUnmarshall(ptr ptr ptr long) @ stub NdrCStdStubBuffer2_Release @ stdcall NdrCStdStubBuffer_Release(ptr ptr) @ stdcall NdrClearOutParameters(ptr ptr ptr) @ varargs NdrClientCall2(ptr ptr) @ stub NdrClientCall -@ stub NdrClientContextMarshall -@ stub NdrClientContextUnmarshall +@ stdcall NdrClientContextMarshall(ptr ptr long) +@ stdcall NdrClientContextUnmarshall(ptr ptr ptr) @ stub NdrClientInitialize @ stdcall NdrClientInitializeNew(ptr ptr ptr long) @ stdcall NdrComplexArrayBufferSize(ptr ptr ptr) @@ -182,21 +182,21 @@ @ stdcall NdrConformantStringMarshall(ptr ptr ptr) @ stdcall NdrConformantStringMemorySize(ptr ptr) @ stdcall NdrConformantStringUnmarshall(ptr ptr ptr long) -@ stub NdrConformantStructBufferSize -@ stub NdrConformantStructFree -@ stub NdrConformantStructMarshall -@ stub NdrConformantStructMemorySize -@ stub NdrConformantStructUnmarshall +@ stdcall NdrConformantStructBufferSize(ptr ptr ptr) +@ stdcall NdrConformantStructFree(ptr ptr ptr) +@ stdcall NdrConformantStructMarshall(ptr ptr ptr) +@ stdcall NdrConformantStructMemorySize(ptr ptr) +@ stdcall NdrConformantStructUnmarshall(ptr ptr ptr long) @ stdcall NdrConformantVaryingArrayBufferSize(ptr ptr ptr) @ stdcall NdrConformantVaryingArrayFree(ptr ptr ptr) @ stdcall NdrConformantVaryingArrayMarshall(ptr ptr ptr) @ stdcall NdrConformantVaryingArrayMemorySize(ptr ptr) @ stdcall NdrConformantVaryingArrayUnmarshall(ptr ptr ptr long) -@ stub NdrConformantVaryingStructBufferSize -@ stub NdrConformantVaryingStructFree -@ stub NdrConformantVaryingStructMarshall -@ stub NdrConformantVaryingStructMemorySize -@ stub NdrConformantVaryingStructUnmarshall +@ stdcall NdrConformantVaryingStructBufferSize(ptr ptr ptr) +@ stdcall NdrConformantVaryingStructFree(ptr ptr ptr) +@ stdcall NdrConformantVaryingStructMarshall(ptr ptr ptr) +@ stdcall NdrConformantVaryingStructMemorySize(ptr ptr) +@ stdcall NdrConformantVaryingStructUnmarshall(ptr ptr ptr long) @ stub NdrContextHandleInitialize @ stub NdrContextHandleSize @ stdcall NdrConvert2(ptr ptr long) @@ -210,16 +210,16 @@ @ stdcall NdrDllGetClassObject(ptr ptr ptr ptr ptr ptr) @ stdcall NdrDllRegisterProxy(long ptr ptr) @ stdcall NdrDllUnregisterProxy(long ptr ptr) -@ stub NdrEncapsulatedUnionBufferSize -@ stub NdrEncapsulatedUnionFree -@ stub NdrEncapsulatedUnionMarshall -@ stub NdrEncapsulatedUnionMemorySize -@ stub NdrEncapsulatedUnionUnmarshall -@ stub NdrFixedArrayBufferSize -@ stub NdrFixedArrayFree -@ stub NdrFixedArrayMarshall -@ stub NdrFixedArrayMemorySize -@ stub NdrFixedArrayUnmarshall +@ stdcall NdrEncapsulatedUnionBufferSize(ptr ptr ptr) +@ stdcall NdrEncapsulatedUnionFree(ptr ptr ptr) +@ stdcall NdrEncapsulatedUnionMarshall(ptr ptr ptr) +@ stdcall NdrEncapsulatedUnionMemorySize(ptr ptr) +@ stdcall NdrEncapsulatedUnionUnmarshall(ptr ptr ptr long) +@ stdcall NdrFixedArrayBufferSize(ptr ptr ptr) +@ stdcall NdrFixedArrayFree(ptr ptr ptr) +@ stdcall NdrFixedArrayMarshall(ptr ptr ptr) +@ stdcall NdrFixedArrayMemorySize(ptr ptr) +@ stdcall NdrFixedArrayUnmarshall(ptr ptr ptr long) @ stdcall NdrFreeBuffer(ptr) @ stub NdrFullPointerFree @ stub NdrFullPointerInsertRefId @@ -236,11 +236,11 @@ @ stub NdrGetSimpleTypeMemorySize # wxp @ stub NdrGetTypeFlags # wxp @ stub NdrGetUserMarshallInfo -@ stub NdrHardStructBufferSize -@ stub NdrHardStructFree -@ stub NdrHardStructMarshall -@ stub NdrHardStructMemorySize -@ stub NdrHardStructUnmarshall +@ stub NdrHardStructBufferSize #(ptr ptr ptr) +@ stub NdrHardStructFree #(ptr ptr ptr) +@ stub NdrHardStructMarshall #(ptr ptr ptr) +@ stub NdrHardStructMemorySize #(ptr ptr) +@ stub NdrHardStructUnmarshall #(ptr ptr ptr long) @ stdcall NdrInterfacePointerBufferSize(ptr ptr ptr) @ stdcall NdrInterfacePointerFree(ptr ptr ptr) @ stdcall NdrInterfacePointerMarshall(ptr ptr ptr) @@ -261,15 +261,15 @@ @ stub NdrMesTypeEncode2 @ stub NdrMesTypeEncode @ stub NdrMesTypeFree2 -@ stub NdrNonConformantStringBufferSize -@ stub NdrNonConformantStringMarshall -@ stub NdrNonConformantStringMemorySize -@ stub NdrNonConformantStringUnmarshall -@ stub NdrNonEncapsulatedUnionBufferSize -@ stub NdrNonEncapsulatedUnionFree -@ stub NdrNonEncapsulatedUnionMarshall -@ stub NdrNonEncapsulatedUnionMemorySize -@ stub NdrNonEncapsulatedUnionUnmarshall +@ stub NdrNonConformantStringBufferSize #(ptr ptr ptr) +@ stub NdrNonConformantStringMarshall #(ptr ptr ptr) +@ stub NdrNonConformantStringMemorySize #(ptr ptr) +@ stub NdrNonConformantStringUnmarshall #(ptr ptr ptr long) +@ stdcall NdrNonEncapsulatedUnionBufferSize(ptr ptr ptr) +@ stdcall NdrNonEncapsulatedUnionFree(ptr ptr ptr) +@ stdcall NdrNonEncapsulatedUnionMarshall(ptr ptr ptr) +@ stdcall NdrNonEncapsulatedUnionMemorySize(ptr ptr) +@ stdcall NdrNonEncapsulatedUnionUnmarshall(ptr ptr ptr long) @ stub NdrNsGetBuffer @ stub NdrNsSendReceive @ stdcall NdrOleAllocate(long) @@ -341,16 +341,16 @@ @ stdcall NdrUserMarshalMemorySize(ptr ptr) @ stub NdrUserMarshalSimpleTypeConvert @ stdcall NdrUserMarshalUnmarshall(ptr ptr ptr long) -@ stub NdrVaryingArrayBufferSize -@ stub NdrVaryingArrayFree -@ stub NdrVaryingArrayMarshall -@ stub NdrVaryingArrayMemorySize -@ stub NdrVaryingArrayUnmarshall -@ stub NdrXmitOrRepAsBufferSize -@ stub NdrXmitOrRepAsFree -@ stub NdrXmitOrRepAsMarshall -@ stub NdrXmitOrRepAsMemorySize -@ stub NdrXmitOrRepAsUnmarshall +@ stdcall NdrVaryingArrayBufferSize(ptr ptr ptr) +@ stdcall NdrVaryingArrayFree(ptr ptr ptr) +@ stdcall NdrVaryingArrayMarshall(ptr ptr ptr) +@ stdcall NdrVaryingArrayMemorySize(ptr ptr) +@ stdcall NdrVaryingArrayUnmarshall(ptr ptr ptr long) +@ stdcall NdrXmitOrRepAsBufferSize(ptr ptr ptr) +@ stdcall NdrXmitOrRepAsFree(ptr ptr ptr) +@ stdcall NdrXmitOrRepAsMarshall(ptr ptr ptr) +@ stdcall NdrXmitOrRepAsMemorySize(ptr ptr) +@ stdcall NdrXmitOrRepAsUnmarshall(ptr ptr ptr long) @ stub NdrpCreateProxy # wxp @ stub NdrpCreateStub # wxp @ stub NdrpGetProcFormatString # wxp diff --git a/reactos/lib/rpcrt4/rpcrt4_main.c b/reactos/lib/rpcrt4/rpcrt4_main.c index 8a3411344f1..27afc4461b3 100644 --- a/reactos/lib/rpcrt4/rpcrt4_main.c +++ b/reactos/lib/rpcrt4/rpcrt4_main.c @@ -57,7 +57,7 @@ * * - ORPC is RPC for OLE; once we have a working RPC framework, we can * use it to implement out-of-process OLE client/server communications. - * ATM there is maybe a disconnect between the marshalling in the OLE DLL's + * ATM there is maybe a disconnect between the marshalling in the OLE DLLs * and the marshalling going on here [TODO: well, is there or not?] * * - In-source API Documentation, at least for those functions which we have