RPC Merge (E_PL14)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gee, I should really try reading Ove's code before I type...

LICENSE: X11

CHANGELOG:

* dlls/rpcrt4/ndr_midl.c: Greg Turner <gmturner007@ameritech.net>
- better attempt to implement NdrClientInitializeNew

-- 
gmt

"Oh, and of course, the fastest way to dig
 a tunnel is to dig at both sides."
   -- The Linux Advanced Routing HOWTO
diff -urx CVS -x configure -x Makefile -x '*.o' -x '*.log' -x '*.so' -x '*.s' -x '*.rc' -x tags -x '*.a' -x '*.ok' -x '*.swp' -x '*.E_PL*' -x '*~' -x '*.so.*' -x '*.spec.c' ../wine.test/dlls/rpcrt4/ndr_midl.c ./dlls/rpcrt4/ndr_midl.c
--- ../wine.test/dlls/rpcrt4/ndr_midl.c	2002-10-20 00:43:08.000000000 -0500
+++ ./dlls/rpcrt4/ndr_midl.c	2002-10-20 14:46:01.000000000 -0500
@@ -174,76 +174,21 @@
 void WINAPI NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg, 
                                     PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum )
 {
-  unsigned int i;
- 
   TRACE("(pRpcMessage == ^%p, pStubMsg == ^%p, pStubDesc == ^%p, ProcNum == %d)\n",
     pRpcMessage, pStubMsg, pStubDesc, ProcNum);
 
-  /* I guess we are supposed to initialize the Stub Message here...
-     I have no idea what most of this stuff is */
-
-  /* Uneducated guesses */
-  pStubMsg->Buffer = NULL;
-  pStubMsg->BufferStart = NULL;
-  pStubMsg->BufferEnd = NULL;
-  pStubMsg->BufferMark = NULL;
-  pStubMsg->Memory = NULL;
-  pStubMsg->AllocAllNodesMemory = NULL;
-  pStubMsg->AllocAllNodesMemoryEnd = NULL;
-  pStubMsg->PointerBufferMark = NULL;
-  pStubMsg->StackTop = NULL;
-  pStubMsg->pPresentedType = NULL;
-  pStubMsg->pTransmitType = NULL;
-  pStubMsg->pvDestContext = NULL;
-  pStubMsg->SavedContextHandles = NULL;
-  pStubMsg->pRpcChannelBuffer = NULL;
-  pStubMsg->SizePtrCountArray = NULL;
-  pStubMsg->SizePtrOffsetArray = NULL;
-  pStubMsg->SizePtrLengthArray = NULL;
-  pStubMsg->pArgQueue = NULL;
-  pStubMsg->pCorrMemory = NULL;
-  pStubMsg->pMemoryList = NULL;
-  pStubMsg->FullPtrXlatTables = NULL;
-  pStubMsg->pArrayInfo = NULL;
-  pStubMsg->pAsyncMsg = NULL;
-  pStubMsg->pCorrInfo = NULL;
-  pStubMsg->pPipeDesc = NULL;
-  pStubMsg->uFlags = 0;
-  pStubMsg->ParamNumber = 0;
-  pStubMsg->IgnoreEmbeddedPointers = 0;
-  pStubMsg->MaxCount = 0;
-
-  pStubMsg->fInDontFree = 0;
-  pStubMsg->fDontCallFreeInst = 0;
-  pStubMsg->fInOnlyParam = 0;
-  pStubMsg->fHasReturn = 0;
-  pStubMsg->fHasExtensions = 0;
-  pStubMsg->fHasNewCorrDesc = 0;
-  pStubMsg->fUnused = 0;
-
-  pStubMsg->BufferLength = 0;
-  pStubMsg->MemorySize = 0;
-  pStubMsg->Offset = 0;
-  pStubMsg->ActualCount = 0;
-  pStubMsg->FullPtrRefId = 0;
-  pStubMsg->ulUnused1 = 0;
-  pStubMsg->dwDestContext = 0;
-  pStubMsg->dwStubPhase = 0;
+  memset(pRpcMessage, 0, sizeof(RPC_MESSAGE));
+  memset(pStubMsg, 0, sizeof(MIDL_STUB_MESSAGE));
 
   pStubMsg->ReuseBuffer = TRUE;
-
-  for (i = 0; i < sizeof(pStubMsg->w2kReserved); i++)
-    pStubMsg->w2kReserved[i] = 0;
-
-  /* Educated guesses */
-  pStubMsg->fBufferValid = FALSE;
   pStubMsg->IsClient = TRUE;
-
   pStubMsg->StubDesc = pStubDesc;
-  pStubMsg->SavedHandle = pRpcMessage->Handle; /* wrong? */
-
   pStubMsg->pfnAllocate = pStubDesc->pfnAllocate;
   pStubMsg->pfnFree = pStubDesc->pfnFree;
+  pStubMsg->RpcMsg = pRpcMessage;
+
+  pRpcMessage->ProcNum = ProcNum;
+  pRpcMessage->RpcInterfaceInformation = pStubDesc->RpcInterfaceInformation;
 }
 
 /***********************************************************************

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux