Provide minimal API documentation in advapi/eventlog.c to silence some
[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 /***********************************************************************
45  * Note: this should return a CLIENT_CALL_RETURN, but calling convention for
46  * returning structures/unions is different between Windows and gcc on i386.
47  */
48 LONG_PTR RPCRT4_NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, va_list args)
49 {
50
51   RPC_CLIENT_INTERFACE *rpc_cli_if = (RPC_CLIENT_INTERFACE *)(pStubDesc->RpcInterfaceInformation);
52   LONG_PTR ret = 0;
53 /*
54   RPC_BINDING_HANDLE handle = 0;
55   RPC_MESSAGE rpcmsg;
56   MIDL_STUB_MESSAGE stubmsg;
57 */
58
59   FIXME("(pStubDec == ^%p,pFormat = ^%p,...): stub\n", pStubDesc, pFormat);
60   if (rpc_cli_if) /* NULL for objects */ {
61     TRACE("  *rpc_cli_if (== ^%p) == (RPC_CLIENT_INTERFACE):\n", pStubDesc);
62     TRACE("    Length == %d\n", rpc_cli_if->Length);
63     TRACE("    InterfaceID == %s (%d.%d)\n", debugstr_guid(&rpc_cli_if->InterfaceId.SyntaxGUID), 
64       rpc_cli_if->InterfaceId.SyntaxVersion.MajorVersion, rpc_cli_if->InterfaceId.SyntaxVersion.MinorVersion);
65     TRACE("    TransferSyntax == %s (%d.%d)\n", debugstr_guid(&rpc_cli_if->TransferSyntax.SyntaxGUID),
66       rpc_cli_if->TransferSyntax.SyntaxVersion.MajorVersion, rpc_cli_if->TransferSyntax.SyntaxVersion.MinorVersion);
67     TRACE("    DispatchTable == ^%p\n", rpc_cli_if->DispatchTable);
68     TRACE("    RpcProtseqEndpointCount == ^%d\n", rpc_cli_if->RpcProtseqEndpointCount);
69     TRACE("    RpcProtseqEndpoint == ^%p\n", rpc_cli_if->RpcProtseqEndpoint);
70     TRACE("    Flags == ^%d\n", rpc_cli_if->Flags);
71   }
72
73   /* for now, while these functons are under development, this is too sketchy.  commented out. */
74   /*
75   NdrClientInitializeNew( &rpcmsg, &stubmsg, pStubDesc, 0 );
76         
77   handle = (RPC_BINDING_HANDLE)0xdeadbeef; */ /* FIXME */
78
79   /* stubmsg.BufferLength = 0;*/ /* FIXME */
80   /*
81   NdrGetBuffer( &stubmsg, stubmsg.BufferLength, handle );
82   NdrSendReceive( &stubmsg, stubmsg.Buffer  );
83   NdrFreeBuffer( &stubmsg );
84   */
85   return ret;
86 }
87
88 /***********************************************************************
89  *           NdrClientCall2 [RPCRT4.@]
90  *
91  * Note: this should return a CLIENT_CALL_RETURN, but calling convention for
92  * returning structures/unions is different between Windows and gcc on i386.
93  */
94 LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc,
95   PFORMAT_STRING pFormat, ...)
96 {
97     LONG_PTR ret;
98     va_list args;
99
100     TRACE("(%p,%p,...)\n", pStubDesc, pFormat);
101
102     va_start(args, pFormat);
103     ret = RPCRT4_NdrClientCall2(pStubDesc, pFormat, args);
104     va_end(args);
105     return ret;
106 }