Sync to Wine-20050725:
authorGé van Geldorp <ge@gse.nl>
Fri, 12 Aug 2005 17:50:33 +0000 (17:50 +0000)
committerGé van Geldorp <ge@gse.nl>
Fri, 12 Aug 2005 17:50:33 +0000 (17:50 +0000)
Francois Gouget <fgouget@free.fr>
- Fix the NdrVaryingArrayUnmarshall prototype (reported by
  winapi_check).
- Assorted spelling fixes.
Robert Shearman <rob@codeweavers.com>
- Add stubs for most of the NDR marshaling functions.
- IRpcStubBuffer_Disconnect can be called more than once.
Mike McCormack <mike@codeweavers.com>
- Interlocked LONG* gcc warning fixes.
Stefan Huehner <stefan@huehner.org>
- Fix -Wmissing-declarations warnings.
- Fix some missing-declarations warnings.

svn path=/trunk/; revision=17337

reactos/lib/rpcrt4/cstub.c
reactos/lib/rpcrt4/ndr_marshall.c
reactos/lib/rpcrt4/ndr_ole.c
reactos/lib/rpcrt4/rpc_binding.c
reactos/lib/rpcrt4/rpc_binding.h
reactos/lib/rpcrt4/rpc_message.c
reactos/lib/rpcrt4/rpc_message.h
reactos/lib/rpcrt4/rpc_server.c
reactos/lib/rpcrt4/rpcrt4.spec
reactos/lib/rpcrt4/rpcrt4_main.c

index 574f63b..98c7553 100644 (file)
@@ -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,
index 366ee78..72cce6f 100644 (file)
@@ -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);
+}
index baa3f07..7a8cdb5 100644 (file)
@@ -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;
index a4f0210..87dcce1 100644 (file)
@@ -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;
 
index 242492d..e0f39aa 100644 (file)
@@ -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;
index 00c39ef..784589d 100644 (file)
 #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;
index 18a73a9..59ee9c0 100644 (file)
@@ -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);
index 13988a9..7eebf10 100644 (file)
@@ -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;
 
index 29666ef..4faaaef 100644 (file)
 @ stdcall NdrAllocate(ptr long)\r
 @ stub NdrAsyncClientCall\r
 @ stub NdrAsyncServerCall\r
-@ stub NdrByteCountPointerBufferSize\r
-@ stub NdrByteCountPointerFree\r
-@ stub NdrByteCountPointerMarshall\r
-@ stub NdrByteCountPointerUnmarshall\r
+@ stdcall NdrByteCountPointerBufferSize(ptr ptr ptr)\r
+@ stdcall NdrByteCountPointerFree(ptr ptr ptr)\r
+@ stdcall NdrByteCountPointerMarshall(ptr ptr ptr)\r
+@ stdcall NdrByteCountPointerUnmarshall(ptr ptr ptr long)\r
 @ stub NdrCStdStubBuffer2_Release\r
 @ stdcall NdrCStdStubBuffer_Release(ptr ptr)\r
 @ stdcall NdrClearOutParameters(ptr ptr ptr)\r
 @ varargs NdrClientCall2(ptr ptr)\r
 @ stub NdrClientCall\r
-@ stub NdrClientContextMarshall\r
-@ stub NdrClientContextUnmarshall\r
+@ stdcall NdrClientContextMarshall(ptr ptr long)\r
+@ stdcall NdrClientContextUnmarshall(ptr ptr ptr)\r
 @ stub NdrClientInitialize\r
 @ stdcall NdrClientInitializeNew(ptr ptr ptr long)\r
 @ stdcall NdrComplexArrayBufferSize(ptr ptr ptr)\r
 @ stdcall NdrConformantStringMarshall(ptr ptr ptr)\r
 @ stdcall NdrConformantStringMemorySize(ptr ptr)\r
 @ stdcall NdrConformantStringUnmarshall(ptr ptr ptr long)\r
-@ stub NdrConformantStructBufferSize\r
-@ stub NdrConformantStructFree\r
-@ stub NdrConformantStructMarshall\r
-@ stub NdrConformantStructMemorySize\r
-@ stub NdrConformantStructUnmarshall\r
+@ stdcall NdrConformantStructBufferSize(ptr ptr ptr)\r
+@ stdcall NdrConformantStructFree(ptr ptr ptr)\r
+@ stdcall NdrConformantStructMarshall(ptr ptr ptr)\r
+@ stdcall NdrConformantStructMemorySize(ptr ptr)\r
+@ stdcall NdrConformantStructUnmarshall(ptr ptr ptr long)\r
 @ stdcall NdrConformantVaryingArrayBufferSize(ptr ptr ptr)\r
 @ stdcall NdrConformantVaryingArrayFree(ptr ptr ptr)\r
 @ stdcall NdrConformantVaryingArrayMarshall(ptr ptr ptr)\r
 @ stdcall NdrConformantVaryingArrayMemorySize(ptr ptr)\r
 @ stdcall NdrConformantVaryingArrayUnmarshall(ptr ptr ptr long)\r
-@ stub NdrConformantVaryingStructBufferSize\r
-@ stub NdrConformantVaryingStructFree\r
-@ stub NdrConformantVaryingStructMarshall\r
-@ stub NdrConformantVaryingStructMemorySize\r
-@ stub NdrConformantVaryingStructUnmarshall\r
+@ stdcall NdrConformantVaryingStructBufferSize(ptr ptr ptr)\r
+@ stdcall NdrConformantVaryingStructFree(ptr ptr ptr)\r
+@ stdcall NdrConformantVaryingStructMarshall(ptr ptr ptr)\r
+@ stdcall NdrConformantVaryingStructMemorySize(ptr ptr)\r
+@ stdcall NdrConformantVaryingStructUnmarshall(ptr ptr ptr long)\r
 @ stub NdrContextHandleInitialize\r
 @ stub NdrContextHandleSize\r
 @ stdcall NdrConvert2(ptr ptr long)\r
 @ stdcall NdrDllGetClassObject(ptr ptr ptr ptr ptr ptr)\r
 @ stdcall NdrDllRegisterProxy(long ptr ptr)\r
 @ stdcall NdrDllUnregisterProxy(long ptr ptr)\r
-@ stub NdrEncapsulatedUnionBufferSize\r
-@ stub NdrEncapsulatedUnionFree\r
-@ stub NdrEncapsulatedUnionMarshall\r
-@ stub NdrEncapsulatedUnionMemorySize\r
-@ stub NdrEncapsulatedUnionUnmarshall\r
-@ stub NdrFixedArrayBufferSize\r
-@ stub NdrFixedArrayFree\r
-@ stub NdrFixedArrayMarshall\r
-@ stub NdrFixedArrayMemorySize\r
-@ stub NdrFixedArrayUnmarshall\r
+@ stdcall NdrEncapsulatedUnionBufferSize(ptr ptr ptr)\r
+@ stdcall NdrEncapsulatedUnionFree(ptr ptr ptr)\r
+@ stdcall NdrEncapsulatedUnionMarshall(ptr ptr ptr)\r
+@ stdcall NdrEncapsulatedUnionMemorySize(ptr ptr)\r
+@ stdcall NdrEncapsulatedUnionUnmarshall(ptr ptr ptr long)\r
+@ stdcall NdrFixedArrayBufferSize(ptr ptr ptr)\r
+@ stdcall NdrFixedArrayFree(ptr ptr ptr)\r
+@ stdcall NdrFixedArrayMarshall(ptr ptr ptr)\r
+@ stdcall NdrFixedArrayMemorySize(ptr ptr)\r
+@ stdcall NdrFixedArrayUnmarshall(ptr ptr ptr long)\r
 @ stdcall NdrFreeBuffer(ptr)\r
 @ stub NdrFullPointerFree\r
 @ stub NdrFullPointerInsertRefId\r
 @ stub NdrGetSimpleTypeMemorySize # wxp\r
 @ stub NdrGetTypeFlags # wxp\r
 @ stub NdrGetUserMarshallInfo\r
-@ stub NdrHardStructBufferSize\r
-@ stub NdrHardStructFree\r
-@ stub NdrHardStructMarshall\r
-@ stub NdrHardStructMemorySize\r
-@ stub NdrHardStructUnmarshall\r
+@ stub NdrHardStructBufferSize #(ptr ptr ptr)\r
+@ stub NdrHardStructFree #(ptr ptr ptr)\r
+@ stub NdrHardStructMarshall #(ptr ptr ptr)\r
+@ stub NdrHardStructMemorySize #(ptr ptr)\r
+@ stub NdrHardStructUnmarshall #(ptr ptr ptr long)\r
 @ stdcall NdrInterfacePointerBufferSize(ptr ptr ptr)\r
 @ stdcall NdrInterfacePointerFree(ptr ptr ptr)\r
 @ stdcall NdrInterfacePointerMarshall(ptr ptr ptr)\r
 @ stub NdrMesTypeEncode2\r
 @ stub NdrMesTypeEncode\r
 @ stub NdrMesTypeFree2\r
-@ stub NdrNonConformantStringBufferSize\r
-@ stub NdrNonConformantStringMarshall\r
-@ stub NdrNonConformantStringMemorySize\r
-@ stub NdrNonConformantStringUnmarshall\r
-@ stub NdrNonEncapsulatedUnionBufferSize\r
-@ stub NdrNonEncapsulatedUnionFree\r
-@ stub NdrNonEncapsulatedUnionMarshall\r
-@ stub NdrNonEncapsulatedUnionMemorySize\r
-@ stub NdrNonEncapsulatedUnionUnmarshall\r
+@ stub NdrNonConformantStringBufferSize #(ptr ptr ptr)\r
+@ stub NdrNonConformantStringMarshall #(ptr ptr ptr)\r
+@ stub NdrNonConformantStringMemorySize #(ptr ptr)\r
+@ stub NdrNonConformantStringUnmarshall #(ptr ptr ptr long)\r
+@ stdcall NdrNonEncapsulatedUnionBufferSize(ptr ptr ptr)\r
+@ stdcall NdrNonEncapsulatedUnionFree(ptr ptr ptr)\r
+@ stdcall NdrNonEncapsulatedUnionMarshall(ptr ptr ptr)\r
+@ stdcall NdrNonEncapsulatedUnionMemorySize(ptr ptr)\r
+@ stdcall NdrNonEncapsulatedUnionUnmarshall(ptr ptr ptr long)\r
 @ stub NdrNsGetBuffer\r
 @ stub NdrNsSendReceive\r
 @ stdcall NdrOleAllocate(long)\r
 @ stdcall NdrUserMarshalMemorySize(ptr ptr)\r
 @ stub NdrUserMarshalSimpleTypeConvert\r
 @ stdcall NdrUserMarshalUnmarshall(ptr ptr ptr long)\r
-@ stub NdrVaryingArrayBufferSize\r
-@ stub NdrVaryingArrayFree\r
-@ stub NdrVaryingArrayMarshall\r
-@ stub NdrVaryingArrayMemorySize\r
-@ stub NdrVaryingArrayUnmarshall\r
-@ stub NdrXmitOrRepAsBufferSize\r
-@ stub NdrXmitOrRepAsFree\r
-@ stub NdrXmitOrRepAsMarshall\r
-@ stub NdrXmitOrRepAsMemorySize\r
-@ stub NdrXmitOrRepAsUnmarshall\r
+@ stdcall NdrVaryingArrayBufferSize(ptr ptr ptr)\r
+@ stdcall NdrVaryingArrayFree(ptr ptr ptr)\r
+@ stdcall NdrVaryingArrayMarshall(ptr ptr ptr)\r
+@ stdcall NdrVaryingArrayMemorySize(ptr ptr)\r
+@ stdcall NdrVaryingArrayUnmarshall(ptr ptr ptr long)\r
+@ stdcall NdrXmitOrRepAsBufferSize(ptr ptr ptr)\r
+@ stdcall NdrXmitOrRepAsFree(ptr ptr ptr)\r
+@ stdcall NdrXmitOrRepAsMarshall(ptr ptr ptr)\r
+@ stdcall NdrXmitOrRepAsMemorySize(ptr ptr)\r
+@ stdcall NdrXmitOrRepAsUnmarshall(ptr ptr ptr long)\r
 @ stub NdrpCreateProxy # wxp\r
 @ stub NdrpCreateStub # wxp\r
 @ stub NdrpGetProcFormatString # wxp\r
index 8a34113..27afc44 100644 (file)
@@ -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