Nikolay Sivov : rpcrt4: Implement RPC_FC_CALLBACK_HANDLE handle type for NdrClientCall2().

Alexandre Julliard julliard at wine.codeweavers.com
Fri Mar 6 06:27:28 CST 2015


Module: wine
Branch: master
Commit: 2b40f9b01e45eed3c802062bba8369061a91003d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2b40f9b01e45eed3c802062bba8369061a91003d

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Mar  6 01:19:29 2015 +0300

rpcrt4: Implement RPC_FC_CALLBACK_HANDLE handle type for NdrClientCall2().

---

 dlls/rpcrt4/ndr_stubless.c | 6 +++++-
 dlls/rpcrt4/ndr_stubless.h | 3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c
index 346cc59..cce0840 100644
--- a/dlls/rpcrt4/ndr_stubless.c
+++ b/dlls/rpcrt4/ndr_stubless.c
@@ -344,7 +344,11 @@ static PFORMAT_STRING client_get_handle(
         *phBinding = *pStubMsg->StubDesc->IMPLICIT_HANDLE_INFO.pPrimitiveHandle;
         break;
     case RPC_FC_CALLBACK_HANDLE: /* implicit callback */
-        FIXME("RPC_FC_CALLBACK_HANDLE\n");
+        TRACE("RPC_FC_CALLBACK_HANDLE\n");
+        /* server calls callback procedures only in response to remote call, and most recent
+           binding handle is used. Calling back to a client can potentially result in another
+           callback with different current handle. */
+        *phBinding = I_RpcGetCurrentCallHandle();
         break;
     case RPC_FC_AUTO_HANDLE: /* implicit auto handle */
         /* strictly speaking, it isn't necessary to set hBinding here
diff --git a/dlls/rpcrt4/ndr_stubless.h b/dlls/rpcrt4/ndr_stubless.h
index 61bc606..5b0add0 100644
--- a/dlls/rpcrt4/ndr_stubless.h
+++ b/dlls/rpcrt4/ndr_stubless.h
@@ -35,7 +35,8 @@ typedef struct _NDR_PROC_HEADER
      * RPC_FC_BIND_PRIMITIVE = 32 - Implicit handle using handle_t created by
      *   calling application
      * RPC_FC_AUTO_HANDLE = 33 - Automatic handle
-     * RPC_FC_CALLBACK_HANDLE = 34 - undocumented
+     * RPC_FC_CALLBACK_HANDLE = 34 - Implicit handle used for a callback: current handle
+     *   from last remote call
      */
     unsigned char handle_type;
 




More information about the wine-cvs mailing list