Add support for specific EOI PIC command.
[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 <stdio.h>
27 #include <string.h>
28
29 #include "windef.h"
30 #include "winbase.h"
31 #include "winerror.h"
32 #include "winreg.h"
33
34 #include "rpc.h"
35 #include "rpcndr.h"
36
37 #include "wine/debug.h"
38
39 #include "ndr_misc.h"
40
41 WINE_DEFAULT_DEBUG_CHANNEL(ole);
42
43 LONG_PTR /* CLIENT_CALL_RETURN */ RPCRT4_NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, va_list args)
44 {
45
46   RPC_CLIENT_INTERFACE *rpc_cli_if = (RPC_CLIENT_INTERFACE *)(pStubDesc->RpcInterfaceInformation);
47   LONG_PTR ret = 0;
48 /*
49   RPC_BINDING_HANDLE handle = 0;
50   RPC_MESSAGE rpcmsg;
51   MIDL_STUB_MESSAGE stubmsg;
52 */
53
54   FIXME("(pStubDec == ^%p,pFormat = ^%p,...): stub\n", pStubDesc, pFormat);
55   if (rpc_cli_if) /* NULL for objects */ {
56     TRACE("  *rpc_cli_if (== ^%p) == (RPC_CLIENT_INTERFACE):\n", pStubDesc);
57     TRACE("    Length == %d\n", rpc_cli_if->Length);
58     TRACE("    InterfaceID == %s (%d.%d)\n", debugstr_guid(&rpc_cli_if->InterfaceId.SyntaxGUID), 
59       rpc_cli_if->InterfaceId.SyntaxVersion.MajorVersion, rpc_cli_if->InterfaceId.SyntaxVersion.MinorVersion);
60     TRACE("    TransferSyntax == %s (%d.%d)\n", debugstr_guid(&rpc_cli_if->TransferSyntax.SyntaxGUID),
61       rpc_cli_if->TransferSyntax.SyntaxVersion.MajorVersion, rpc_cli_if->TransferSyntax.SyntaxVersion.MinorVersion);
62     TRACE("    DispatchTable == ^%p\n", rpc_cli_if->DispatchTable);
63     TRACE("    RpcProtseqEndpointCount == ^%d\n", rpc_cli_if->RpcProtseqEndpointCount);
64     TRACE("    RpcProtseqEndpoint == ^%p\n", rpc_cli_if->RpcProtseqEndpoint);
65     TRACE("    Flags == ^%d\n", rpc_cli_if->Flags);
66   }
67
68   /* for now, while these functons are under development, this is too sketchy.  commented out. */
69   /*
70   NdrClientInitializeNew( &rpcmsg, &stubmsg, pStubDesc, 0 );
71         
72   handle = (RPC_BINDING_HANDLE)0xdeadbeef; */ /* FIXME */
73
74   /* stubmsg.BufferLength = 0;*/ /* FIXME */
75   /*
76   NdrGetBuffer( &stubmsg, stubmsg.BufferLength, handle );
77   NdrSendReceive( &stubmsg, stubmsg.Buffer  );
78   NdrFreeBuffer( &stubmsg );
79   */
80   return ret;
81 }
82
83 /***********************************************************************
84  *           NdrClientCall2 [RPCRT4.@]
85  */
86 LONG_PTR /* CLIENT_CALL_RETURN */ WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc,
87   PFORMAT_STRING pFormat, ...)
88 {
89     LONG_PTR ret;
90     va_list args;
91
92     TRACE("(%p,%p,...)\n", pStubDesc, pFormat);
93
94     va_start(args, pFormat);
95     ret = RPCRT4_NdrClientCall2(pStubDesc, pFormat, args);
96     va_end(args);
97     return ret;
98 }