- Prefix many more functions, types, structs, etc. with MSVCRT_.
[wine] / dlls / rpcrt4 / ndr_stubless.c
1 /*
2  * NDR client stuff
3  *
4  * Copyright 2001 Ove Kåven, TransGaming Technologies
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  * TODO:
21  *  - Exception handling
22  *  - Context stuff
23  *  - Who knows
24  */
25
26 #include <stdarg.h>
27 #include <stdio.h>
28 #include <string.h>
29
30 #include "windef.h"
31 #include "winbase.h"
32 #include "winerror.h"
33 #include "winreg.h"
34
35 #include "rpc.h"
36 #include "rpcndr.h"
37
38 #include "wine/debug.h"
39
40 #include "ndr_misc.h"
41
42 WINE_DEFAULT_DEBUG_CHANNEL(ole);
43
44 LONG_PTR /* CLIENT_CALL_RETURN */ RPCRT4_NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, va_list args)
45 {
46
47   RPC_CLIENT_INTERFACE *rpc_cli_if = (RPC_CLIENT_INTERFACE *)(pStubDesc->RpcInterfaceInformation);
48   LONG_PTR ret = 0;
49 /*
50   RPC_BINDING_HANDLE handle = 0;
51   RPC_MESSAGE rpcmsg;
52   MIDL_STUB_MESSAGE stubmsg;
53 */
54
55   FIXME("(pStubDec == ^%p,pFormat = ^%p,...): stub\n", pStubDesc, pFormat);
56   if (rpc_cli_if) /* NULL for objects */ {
57     TRACE("  *rpc_cli_if (== ^%p) == (RPC_CLIENT_INTERFACE):\n", pStubDesc);
58     TRACE("    Length == %d\n", rpc_cli_if->Length);
59     TRACE("    InterfaceID == %s (%d.%d)\n", debugstr_guid(&rpc_cli_if->InterfaceId.SyntaxGUID), 
60       rpc_cli_if->InterfaceId.SyntaxVersion.MajorVersion, rpc_cli_if->InterfaceId.SyntaxVersion.MinorVersion);
61     TRACE("    TransferSyntax == %s (%d.%d)\n", debugstr_guid(&rpc_cli_if->TransferSyntax.SyntaxGUID),
62       rpc_cli_if->TransferSyntax.SyntaxVersion.MajorVersion, rpc_cli_if->TransferSyntax.SyntaxVersion.MinorVersion);
63     TRACE("    DispatchTable == ^%p\n", rpc_cli_if->DispatchTable);
64     TRACE("    RpcProtseqEndpointCount == ^%d\n", rpc_cli_if->RpcProtseqEndpointCount);
65     TRACE("    RpcProtseqEndpoint == ^%p\n", rpc_cli_if->RpcProtseqEndpoint);
66     TRACE("    Flags == ^%d\n", rpc_cli_if->Flags);
67   }
68
69   /* for now, while these functons are under development, this is too sketchy.  commented out. */
70   /*
71   NdrClientInitializeNew( &rpcmsg, &stubmsg, pStubDesc, 0 );
72         
73   handle = (RPC_BINDING_HANDLE)0xdeadbeef; */ /* FIXME */
74
75   /* stubmsg.BufferLength = 0;*/ /* FIXME */
76   /*
77   NdrGetBuffer( &stubmsg, stubmsg.BufferLength, handle );
78   NdrSendReceive( &stubmsg, stubmsg.Buffer  );
79   NdrFreeBuffer( &stubmsg );
80   */
81   return ret;
82 }
83
84 /***********************************************************************
85  *           NdrClientCall2 [RPCRT4.@]
86  */
87 LONG_PTR /* CLIENT_CALL_RETURN */ WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc,
88   PFORMAT_STRING pFormat, ...)
89 {
90     LONG_PTR ret;
91     va_list args;
92
93     TRACE("(%p,%p,...)\n", pStubDesc, pFormat);
94
95     va_start(args, pFormat);
96     ret = RPCRT4_NdrClientCall2(pStubDesc, pFormat, args);
97     va_end(args);
98     return ret;
99 }