Initialize DataRepresentation in NdrClientInitializeNew, not NdrSendReceive

Mike Hearn mike at navi.cx
Sun Jun 5 12:18:57 CDT 2005


This is a functional no-op but serves to shut up the NdrConvert stub, which
isn't needed on x86 only setups.

Mike Hearn <mh at codeweavers.com>
Initialize DataRepresentation in NdrClientInitializeNew, not NdrSendReceive

Index: dlls/rpcrt4/ndr_midl.c
===================================================================
RCS file: /home/wine/wine/dlls/rpcrt4/ndr_midl.c,v
retrieving revision 1.20
diff -u -p -d -u -r1.20 ndr_midl.c
--- dlls/rpcrt4/ndr_midl.c	14 Mar 2005 10:11:04 -0000	1.20
+++ dlls/rpcrt4/ndr_midl.c	5 Jun 2005 17:16:26 -0000
@@ -185,6 +185,7 @@ void WINAPI NdrClientInitializeNew( PRPC
   assert( pRpcMessage && pStubMsg && pStubDesc );
 
   memset(pRpcMessage, 0, sizeof(RPC_MESSAGE));
+  pRpcMessage->DataRepresentation = NDR_LOCAL_DATA_REPRESENTATION;
 
   /* not everyone allocates stack space for w2kReserved */
   memset(pStubMsg, 0, FIELD_OFFSET(MIDL_STUB_MESSAGE,pCSInfo));
@@ -276,9 +277,6 @@ unsigned char *WINAPI NdrSendReceive( MI
     return NULL;
   }
 
-  /* FIXME: Seems wrong.  Where should this really come from, and when? */
-  stubmsg->RpcMsg->DataRepresentation = NDR_LOCAL_DATA_REPRESENTATION;
-
   if (I_RpcSendReceive(stubmsg->RpcMsg) != RPC_S_OK) {
     WARN("I_RpcSendReceive did not return success.\n");
     /* FIXME: raise exception? */



More information about the wine-patches mailing list