2002-10-10 21:23:33 +02:00
|
|
|
|
/*
|
|
|
|
|
* NDR client stuff
|
|
|
|
|
*
|
|
|
|
|
* Copyright 2001 Ove K<EFBFBD>ven, TransGaming Technologies
|
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
*
|
|
|
|
|
* TODO:
|
2002-10-19 21:17:19 +02:00
|
|
|
|
* - Exception handling
|
|
|
|
|
* - Context stuff
|
|
|
|
|
* - Who knows
|
2002-10-10 21:23:33 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
|
#include "winbase.h"
|
|
|
|
|
#include "winerror.h"
|
|
|
|
|
#include "winreg.h"
|
|
|
|
|
|
|
|
|
|
#include "rpc.h"
|
|
|
|
|
#include "rpcndr.h"
|
|
|
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
|
|
#include "ndr_misc.h"
|
|
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
|
|
|
|
|
2002-10-16 20:51:11 +02:00
|
|
|
|
LONG_PTR /* CLIENT_CALL_RETURN */ RPCRT4_NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, va_list args)
|
2002-10-10 21:23:33 +02:00
|
|
|
|
{
|
2002-10-18 05:56:56 +02:00
|
|
|
|
|
|
|
|
|
RPC_CLIENT_INTERFACE *rpc_cli_if = (RPC_CLIENT_INTERFACE *)(pStubDesc->RpcInterfaceInformation);
|
2002-10-19 21:17:19 +02:00
|
|
|
|
LONG_PTR ret = 0;
|
2002-10-25 21:03:43 +02:00
|
|
|
|
/*
|
2002-10-19 21:17:19 +02:00
|
|
|
|
RPC_BINDING_HANDLE handle = 0;
|
|
|
|
|
RPC_MESSAGE rpcmsg;
|
|
|
|
|
MIDL_STUB_MESSAGE stubmsg;
|
2002-10-25 21:03:43 +02:00
|
|
|
|
*/
|
2002-10-19 21:17:19 +02:00
|
|
|
|
|
2002-10-22 02:40:01 +02:00
|
|
|
|
FIXME("(pStubDec == ^%p,pFormat = ^%p,...): semi-stub\n", pStubDesc, pFormat);
|
2002-10-19 21:17:19 +02:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
2002-10-25 21:03:43 +02:00
|
|
|
|
/* for now, while these functons are under development, this is too sketchy. commented out. */
|
|
|
|
|
/*
|
2002-10-19 21:17:19 +02:00
|
|
|
|
NdrClientInitializeNew( &rpcmsg, &stubmsg, pStubDesc, 0 );
|
|
|
|
|
|
2002-10-25 21:03:43 +02:00
|
|
|
|
handle = (RPC_BINDING_HANDLE)0xdeadbeef; */ /* FIXME */
|
2002-10-18 05:56:56 +02:00
|
|
|
|
|
2002-10-25 21:03:43 +02:00
|
|
|
|
/* stubmsg.BufferLength = 0;*/ /* FIXME */
|
|
|
|
|
/*
|
2002-10-19 21:17:19 +02:00
|
|
|
|
NdrGetBuffer( &stubmsg, stubmsg.BufferLength, handle );
|
|
|
|
|
NdrSendReceive( &stubmsg, stubmsg.Buffer );
|
|
|
|
|
NdrFreeBuffer( &stubmsg );
|
2002-10-25 21:03:43 +02:00
|
|
|
|
*/
|
2002-10-19 21:17:19 +02:00
|
|
|
|
return ret;
|
2002-10-10 21:23:33 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
|
* NdrClientCall2 [RPCRT4.@]
|
|
|
|
|
*/
|
2002-10-16 20:51:11 +02:00
|
|
|
|
LONG_PTR /* CLIENT_CALL_RETURN */ WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc,
|
|
|
|
|
PFORMAT_STRING pFormat, ...)
|
2002-10-10 21:23:33 +02:00
|
|
|
|
{
|
2002-10-16 20:51:11 +02:00
|
|
|
|
LONG_PTR ret;
|
2002-10-10 21:23:33 +02:00
|
|
|
|
va_list args;
|
|
|
|
|
|
|
|
|
|
TRACE("(%p,%p,...)\n", pStubDesc, pFormat);
|
|
|
|
|
|
|
|
|
|
va_start(args, pFormat);
|
2002-10-16 20:51:11 +02:00
|
|
|
|
ret = RPCRT4_NdrClientCall2(pStubDesc, pFormat, args);
|
2002-10-10 21:23:33 +02:00
|
|
|
|
va_end(args);
|
|
|
|
|
return ret;
|
|
|
|
|
}
|