RPC Merge (E_PL2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



LICENSE: X11

CHANGELOG:

* dlls/rpcrt4: ndr_stubless.c, rpcrt4.spec;
  include: rpcndr.h: Greg Turner <gmturner007@ameritech.net>
- Super-crude implementation for NdrClientCall2 using stubs from PL1
- specs and headers for NdrClientInitializeNew, NdrConformantStringMarshall,
  NdrGetBuffer, NdrFreeBuffer, and NdrSendReceive

-- 
gmt
Index: dlls/rpcrt4/ndr_stubless.c
===================================================================
RCS file: /home/wine/wine/dlls/rpcrt4/ndr_stubless.c,v
retrieving revision 1.3
diff -u -r1.3 ndr_stubless.c
--- dlls/rpcrt4/ndr_stubless.c	18 Oct 2002 03:56:57 -0000	1.3
+++ dlls/rpcrt4/ndr_stubless.c	18 Oct 2002 16:00:57 -0000
@@ -38,25 +39,42 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(ole);
 
-
 LONG_PTR /* CLIENT_CALL_RETURN */ RPCRT4_NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, va_list args)
 {
 
   RPC_CLIENT_INTERFACE *rpc_cli_if = (RPC_CLIENT_INTERFACE *)(pStubDesc->RpcInterfaceInformation);
-
-  FIXME("(pStubDec == ^%p,pFormat = \"%s\",...): stub\n", pStubDesc, pFormat);
-  TRACE("rpc_cli_if == ^%p\n", rpc_cli_if);
-  if (rpc_cli_if) /* for objects this is NULL */
-    TRACE("rpc_cli_if: Length == %d; InterfaceID == <%s,<%d.%d>>; TransferSyntax == <%s,<%d.%d>>; DispatchTable == ^%p; RpcProtseqEndpointCount == %d; RpcProtseqEndpoint == ^%p; Flags == %d\n",
-     rpc_cli_if->Length,
-     debugstr_guid(&rpc_cli_if->InterfaceId.SyntaxGUID), rpc_cli_if->InterfaceId.SyntaxVersion.MajorVersion, rpc_cli_if->InterfaceId.SyntaxVersion.MinorVersion,
-     debugstr_guid(&rpc_cli_if->TransferSyntax.SyntaxGUID), rpc_cli_if->TransferSyntax.SyntaxVersion.MajorVersion, rpc_cli_if->TransferSyntax.SyntaxVersion.MinorVersion,
-     rpc_cli_if->DispatchTable, 
-     rpc_cli_if->RpcProtseqEndpointCount, 
-     rpc_cli_if->RpcProtseqEndpoint, 
-     rpc_cli_if->Flags);
-
-  return 0;
+  LONG_PTR ret = 0;
+  RPC_BINDING_HANDLE handle = 0;
+  PRPC_MESSAGE rpcmsg;
+  PMIDL_STUB_MESSAGE stubmsg;
+
+  TRACE("(pStubDec == ^%p,pFormat = ^%p,...): semi-stub\n", pStubDesc, pFormat);
+  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);
+  }
+
+  NdrClientInitializeNew( rpcmsg, /* ?? */
+                          stubmsg, /* ?? */
+                          pStubDesc,
+                          0 );
+        
+  handle = (RPC_BINDING_HANDLE)0xdeadbeef; /* interop_binding_handle; */ /* ?? */
+  stubmsg->BufferLength = 0;
+  NdrGetBuffer( stubmsg, stubmsg->BufferLength, handle );
+
+  NdrSendReceive( stubmsg, stubmsg->Buffer  );
+  NdrFreeBuffer(stubmsg);
+ 
+  return ret;
 }
 
 /***********************************************************************
Index: dlls/rpcrt4/rpcrt4.spec
===================================================================
RCS file: /home/wine/wine/dlls/rpcrt4/rpcrt4.spec,v
retrieving revision 1.30
diff -u -r1.30 rpcrt4.spec
--- dlls/rpcrt4/rpcrt4.spec	18 Oct 2002 03:56:57 -0000	1.30
+++ dlls/rpcrt4/rpcrt4.spec	18 Oct 2002 16:00:58 -0000
@@ -206,7 +206,7 @@
 @ stub NdrClientCall
 @ varargs NdrClientCall2(ptr ptr) NdrClientCall2
 @ stub NdrClientInitialize
-@ stub NdrClientInitializeNew
+@ stdcall NdrClientInitializeNew(ptr ptr ptr long) NdrClientInitializeNew
 @ stub NdrContextHandleInitialize
 @ stub NdrContextHandleSize
 @ stub NdrConvert
@@ -216,14 +216,14 @@
 @ stub NdrCorrelationPass
 @ stub NdrDcomAsyncClientCall
 @ stub NdrDcomAsyncStubCall
-@ stub NdrFreeBuffer
+@ stdcall NdrFreeBuffer(ptr) NdrFreeBuffer
 @ stub NdrFullPointerFree
 @ stub NdrFullPointerInsertRefId
 @ stub NdrFullPointerQueryPointer
 @ stub NdrFullPointerQueryRefId
 @ stub NdrFullPointerXlatFree
 @ stub NdrFullPointerXlatInit
-@ stub NdrGetBuffer
+@ stdcall NdrGetBuffer(ptr long ptr) NdrGetBuffer
 @ stub NdrGetDcomProtocolVersion
 @ stub NdrGetPartialBuffer
 @ stub NdrGetPipeBuffer
@@ -265,7 +265,7 @@
 @ stub NdrRpcSsDefaultFree
 @ stub NdrRpcSsDisableAllocate
 @ stub NdrRpcSsEnableAllocate
-@ stub NdrSendReceive
+@ stdcall NdrSendReceive(ptr ptr) NdrSendReceive
 @ stub NdrServerCall
 @ stub NdrServerCall2
 @ stub NdrStubCall
@@ -298,7 +298,7 @@
 @ stub NdrConformantArrayMemorySize
 @ stub NdrConformantArrayUnmarshall
 @ stub NdrConformantStringBufferSize
-@ stub NdrConformantStringMarshall
+@ stdcall NdrConformantStringMarshall(ptr ptr ptr) NdrConformantStringMarshall
 @ stub NdrConformantStringMemorySize
 @ stub NdrConformantStringUnmarshall
 @ stub NdrConformantStructBufferSize
Index: include/rpcndr.h
===================================================================
RCS file: /home/wine/wine/include/rpcndr.h,v
retrieving revision 1.9
diff -u -r1.9 rpcndr.h
--- include/rpcndr.h	16 Oct 2002 18:51:11 -0000	1.9
+++ include/rpcndr.h	18 Oct 2002 21:59:22 -0000
@@ -296,4 +296,17 @@
 RPCRTAPI void RPC_ENTRY
   NdrOleFree( void* NodeToFree );
 
+RPCRTAPI void RPC_ENTRY
+  NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg, 
+                          PMIDL_STUB_DESC pStubDesc, int unknown );
+RPCRTAPI void RPC_ENTRY
+  NdrConformantStringMarshall( MIDL_STUB_MESSAGE *pStubMsg, unsigned char *pszMessage,
+                               PFORMAT_STRING pFormat);
+RPCRTAPI void RPC_ENTRY
+  NdrGetBuffer( MIDL_STUB_MESSAGE *stubmsg, unsigned long buflen, RPC_BINDING_HANDLE handle );
+RPCRTAPI void RPC_ENTRY
+  NdrFreeBuffer( MIDL_STUB_MESSAGE *pStubMsg );
+RPCRTAPI void RPC_ENTRY
+  NdrSendReceive( MIDL_STUB_MESSAGE *stubmsg, unsigned char *buffer );
+
 #endif /*__WINE_RPCNDR_H */

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux