Initialize DataRepresentation in NdrClientInitializeNew, not

NdrSendReceive.
This commit is contained in:
Mike Hearn 2005-06-05 19:19:50 +00:00 committed by Alexandre Julliard
parent 599f3e879e
commit f45cb12553
1 changed files with 1 additions and 3 deletions

View File

@ -185,6 +185,7 @@ void WINAPI NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE
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( MIDL_STUB_MESSAGE *stubmsg, unsigned char
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? */