LICENSE: X11 CHANGELOG: * dlls/rpcrt4: ndr_stubless.c: Greg Turner <gmturner007@ameritech.net> - Repair some glaring NdrClientCall2 bugs. -- gmt
--- ../wine/dlls/rpcrt4/ndr_stubless.c 2002-10-18 19:46:56.000000000 -0500 +++ dlls/rpcrt4/ndr_stubless.c 2002-10-18 20:37:10.000000000 -0500 @@ -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> @@ -44,8 +46,8 @@ RPC_CLIENT_INTERFACE *rpc_cli_if = (RPC_CLIENT_INTERFACE *)(pStubDesc->RpcInterfaceInformation); LONG_PTR ret = 0; RPC_BINDING_HANDLE handle = 0; - PRPC_MESSAGE rpcmsg; - PMIDL_STUB_MESSAGE stubmsg; + RPC_MESSAGE rpcmsg; + MIDL_STUB_MESSAGE stubmsg; TRACE("(pStubDec == ^%p,pFormat = ^%p,...): semi-stub\n", pStubDesc, pFormat); if (rpc_cli_if) /* NULL for objects */ { @@ -61,17 +63,15 @@ TRACE(" Flags == ^%d\n", rpc_cli_if->Flags); } - NdrClientInitializeNew( rpcmsg, /* ?? */ - stubmsg, /* ?? */ - pStubDesc, - 0 ); + NdrClientInitializeNew( &rpcmsg, &stubmsg, pStubDesc, 0 ); - handle = (RPC_BINDING_HANDLE)0xdeadbeef; /* interop_binding_handle; */ /* ?? */ - stubmsg->BufferLength = 0; - NdrGetBuffer( stubmsg, stubmsg->BufferLength, handle ); + handle = (RPC_BINDING_HANDLE)0xdeadbeef; /* FIXME: dce uses interop_binding_handle; */ - NdrSendReceive( stubmsg, stubmsg->Buffer ); - NdrFreeBuffer(stubmsg); + stubmsg.BufferLength = 0; /* FIXME */ + + NdrGetBuffer( &stubmsg, stubmsg.BufferLength, handle ); + NdrSendReceive( &stubmsg, stubmsg.Buffer ); + NdrFreeBuffer( &stubmsg ); return ret; }