Commit 1ecb2286 authored by Greg Turner's avatar Greg Turner Committed by Alexandre Julliard

Super-crude implementation for NdrClientCall2.

Specs and headers for NdrClientInitializeNew, NdrConformantStringMarshall, NdrGetBuffer, NdrFreeBuffer, and NdrSendReceive.
parent fc4e2fe7
......@@ -18,7 +18,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* TODO:
* - actually implement RPCRT4_NdrClientCall2
* - Exception handling
* - Context stuff
* - Who knows
*/
#include <stdio.h>
......@@ -38,25 +40,40 @@
WINE_DEFAULT_DEBUG_CHANNEL(ole);
LONG_PTR /* CLIENT_CALL_RETURN */ RPCRT4_NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, va_list args)
{
RPC_CLIENT_INTERFACE *rpc_cli_if = (RPC_CLIENT_INTERFACE *)(pStubDesc->RpcInterfaceInformation);
LONG_PTR ret = 0;
RPC_BINDING_HANDLE handle = 0;
RPC_MESSAGE rpcmsg;
MIDL_STUB_MESSAGE stubmsg;
TRACE("(pStubDec == ^%p,pFormat = ^%p,...): semi-stub\n", pStubDesc, pFormat);
if (rpc_cli_if) /* NULL for objects */ {
TRACE(" *rpc_cli_if (== ^%p) == (RPC_CLIENT_INTERFACE):\n", pStubDesc);
TRACE(" Length == %d\n", rpc_cli_if->Length);
TRACE(" InterfaceID == %s (%d.%d)\n", debugstr_guid(&rpc_cli_if->InterfaceId.SyntaxGUID),
rpc_cli_if->InterfaceId.SyntaxVersion.MajorVersion, rpc_cli_if->InterfaceId.SyntaxVersion.MinorVersion);
TRACE(" TransferSyntax == %s (%d.%d)\n", debugstr_guid(&rpc_cli_if->TransferSyntax.SyntaxGUID),
rpc_cli_if->TransferSyntax.SyntaxVersion.MajorVersion, rpc_cli_if->TransferSyntax.SyntaxVersion.MinorVersion);
TRACE(" DispatchTable == ^%p\n", rpc_cli_if->DispatchTable);
TRACE(" RpcProtseqEndpointCount == ^%d\n", rpc_cli_if->RpcProtseqEndpointCount);
TRACE(" RpcProtseqEndpoint == ^%p\n", rpc_cli_if->RpcProtseqEndpoint);
TRACE(" Flags == ^%d\n", rpc_cli_if->Flags);
}
NdrClientInitializeNew( &rpcmsg, &stubmsg, pStubDesc, 0 );
handle = (RPC_BINDING_HANDLE)0xdeadbeef; /* FIXME: dce uses interop_binding_handle; */
FIXME("(pStubDec == ^%p,pFormat = \"%s\",...): stub\n", pStubDesc, pFormat);
TRACE("rpc_cli_if == ^%p\n", rpc_cli_if);
if (rpc_cli_if) /* for objects this is NULL */
TRACE("rpc_cli_if: Length == %d; InterfaceID == <%s,<%d.%d>>; TransferSyntax == <%s,<%d.%d>>; DispatchTable == ^%p; RpcProtseqEndpointCount == %d; RpcProtseqEndpoint == ^%p; Flags == %d\n",
rpc_cli_if->Length,
debugstr_guid(&rpc_cli_if->InterfaceId.SyntaxGUID), rpc_cli_if->InterfaceId.SyntaxVersion.MajorVersion, rpc_cli_if->InterfaceId.SyntaxVersion.MinorVersion,
debugstr_guid(&rpc_cli_if->TransferSyntax.SyntaxGUID), rpc_cli_if->TransferSyntax.SyntaxVersion.MajorVersion, rpc_cli_if->TransferSyntax.SyntaxVersion.MinorVersion,
rpc_cli_if->DispatchTable,
rpc_cli_if->RpcProtseqEndpointCount,
rpc_cli_if->RpcProtseqEndpoint,
rpc_cli_if->Flags);
stubmsg.BufferLength = 0; /* FIXME */
return 0;
NdrGetBuffer( &stubmsg, stubmsg.BufferLength, handle );
NdrSendReceive( &stubmsg, stubmsg.Buffer );
NdrFreeBuffer( &stubmsg );
return ret;
}
/***********************************************************************
......
......@@ -206,7 +206,7 @@ init RPCRT4_LibMain
@ stub NdrClientCall
@ varargs NdrClientCall2(ptr ptr) NdrClientCall2
@ stub NdrClientInitialize
@ stub NdrClientInitializeNew
@ stdcall NdrClientInitializeNew(ptr ptr ptr long) NdrClientInitializeNew
@ stub NdrContextHandleInitialize
@ stub NdrContextHandleSize
@ stub NdrConvert
......@@ -216,14 +216,14 @@ init RPCRT4_LibMain
@ stub NdrCorrelationPass
@ stub NdrDcomAsyncClientCall
@ stub NdrDcomAsyncStubCall
@ stub NdrFreeBuffer
@ stdcall NdrFreeBuffer(ptr) NdrFreeBuffer
@ stub NdrFullPointerFree
@ stub NdrFullPointerInsertRefId
@ stub NdrFullPointerQueryPointer
@ stub NdrFullPointerQueryRefId
@ stub NdrFullPointerXlatFree
@ stub NdrFullPointerXlatInit
@ stub NdrGetBuffer
@ stdcall NdrGetBuffer(ptr long ptr) NdrGetBuffer
@ stub NdrGetDcomProtocolVersion
@ stub NdrGetPartialBuffer
@ stub NdrGetPipeBuffer
......@@ -265,7 +265,7 @@ init RPCRT4_LibMain
@ stub NdrRpcSsDefaultFree
@ stub NdrRpcSsDisableAllocate
@ stub NdrRpcSsEnableAllocate
@ stub NdrSendReceive
@ stdcall NdrSendReceive(ptr ptr) NdrSendReceive
@ stub NdrServerCall
@ stub NdrServerCall2
@ stub NdrStubCall
......@@ -298,7 +298,7 @@ init RPCRT4_LibMain
@ stub NdrConformantArrayMemorySize
@ stub NdrConformantArrayUnmarshall
@ stub NdrConformantStringBufferSize
@ stub NdrConformantStringMarshall
@ stdcall NdrConformantStringMarshall(ptr ptr ptr) NdrConformantStringMarshall
@ stub NdrConformantStringMemorySize
@ stub NdrConformantStringUnmarshall
@ stub NdrConformantStructBufferSize
......
......@@ -296,4 +296,17 @@ RPCRTAPI void* RPC_ENTRY
RPCRTAPI void RPC_ENTRY
NdrOleFree( void* NodeToFree );
RPCRTAPI void RPC_ENTRY
NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg,
PMIDL_STUB_DESC pStubDesc, int unknown );
RPCRTAPI void RPC_ENTRY
NdrConformantStringMarshall( MIDL_STUB_MESSAGE *pStubMsg, unsigned char *pszMessage,
PFORMAT_STRING pFormat);
RPCRTAPI void RPC_ENTRY
NdrGetBuffer( MIDL_STUB_MESSAGE *stubmsg, unsigned long buflen, RPC_BINDING_HANDLE handle );
RPCRTAPI void RPC_ENTRY
NdrFreeBuffer( MIDL_STUB_MESSAGE *pStubMsg );
RPCRTAPI void RPC_ENTRY
NdrSendReceive( MIDL_STUB_MESSAGE *stubmsg, unsigned char *buffer );
#endif /*__WINE_RPCNDR_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment