VirtualBox

Changeset 76067 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Dec 8, 2018 12:54:36 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127307
Message:

VBoxSDS,VBoxSVC,VBoxProxyStub: Kicked out the failed attempt at centralized client watching. bugref:3300

Location:
trunk/src/VBox/Main/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/RpcChannelHook.h

    r71716 r76067  
    11/* $Id$ */
    22/** @file
    3 * VBox COM Rpc Channel Hook definition
    4 */
     3 * VirtualBox Main - RPC Channel Hook Hack, VBoxProxyStub.
     4 */
    55
    66/*
     
    2121#include <iprt/cdefs.h>
    2222
    23 #ifdef RT_OS_WINDOWS
     23#ifndef RT_OS_WINDOWS
     24# error "Oops"
     25#endif
     26
    2427#include <iprt/win/windows.h>
    2528#include <ObjIdl.h>
    2629
    2730
    28 typedef void *PRPC_CHANNEL_HOOK;
     31RT_C_DECLS_BEGIN
    2932
    30 // {CEDA3E95-A46A-4C41-AA01-EFFD856E455C}
     33/* {CEDA3E95-A46A-4C41-AA01-EFFD856E455C} */
    3134static const GUID RPC_CHANNEL_EXTENSION_GUID =
    3235{ 0xceda3e95, 0xa46a, 0x4c41,{ 0xaa, 0x1, 0xef, 0xfd, 0x85, 0x6e, 0x45, 0x5c } };
    3336
    34 RT_C_DECLS_BEGIN
    35 // C wrapper for using in proxy
     37/** C wrapper for using in proxy (C code). */
    3638void SetupClientRpcChannelHook(void);
     39
    3740RT_C_DECLS_END
    3841
    3942
    40 #if defined(__cplusplus)
     43#ifdef __cplusplus
    4144
    42 /*
    43 * This is RPC channel hook implementation for registering VirtualBox API clients.
    44 * This channel hook instantiated in COM client process by VBoxProxyStub
    45 * We use it to catch a moment when a new VirtualBox object sucessfully instantiated to
    46 * register new API client in a VBoxSDS clients list.
    47 */
     45/**
     46 * This is RPC channel hook implementation for registering VirtualBox API clients.
     47 *
     48 * This channel hook instantiated in COM client process by VBoxProxyStub
     49 * We use it to catch a moment when a new VirtualBox object sucessfully instantiated to
     50 * register new API client in a VBoxSDS clients list.
     51 */
    4852class CRpcChannelHook : public IChannelHook
    4953{
     
    5256
    5357    /* IUnknown Interface methods */
    54     STDMETHODIMP QueryInterface(REFIID riid, void **ppv);
    55     STDMETHODIMP_(ULONG) AddRef(void);
    56     STDMETHODIMP_(ULONG) Release(void);
     58    STDMETHOD(QueryInterface)(REFIID riid, void **ppv);
     59    STDMETHOD_(ULONG, AddRef)(void);
     60    STDMETHOD_(ULONG, Release)(void);
    5761
    5862    /* IChannelHook Interface methods */
    59     STDMETHODIMP_(void) ClientGetSize(REFGUID uExtent, REFIID riid, ULONG *pDataSize);
    60     STDMETHODIMP_(void) ClientFillBuffer(REFGUID uExtent, REFIID riid, ULONG *pDataSize, void *pDataBuffer);
    61     STDMETHODIMP_(void) ClientNotify(REFGUID uExtent, REFIID riid, ULONG cbDataSize, void *pDataBuffer, DWORD lDataRep, HRESULT hrFault);
     63    STDMETHOD_(void, ClientGetSize)(REFGUID uExtent, REFIID riid, ULONG *pDataSize);
     64    STDMETHOD_(void, ClientFillBuffer)(REFGUID uExtent, REFIID riid, ULONG *pDataSize, void *pDataBuffer);
     65    STDMETHOD_(void, ClientNotify)(REFGUID uExtent, REFIID riid, ULONG cbDataSize, void *pDataBuffer, DWORD lDataRep, HRESULT hrFault);
    6266
    63     STDMETHODIMP_(void) ServerNotify(REFGUID uExtent, REFIID riid, ULONG cbDataSize, void *pDataBuffer, DWORD lDataRep);
    64     STDMETHODIMP_(void) ServerGetSize(REFGUID uExtent, REFIID riid, HRESULT hrFault, ULONG *pDataSize);
    65     STDMETHODIMP_(void) ServerFillBuffer(REFGUID uExtent, REFIID riid, ULONG *pDataSize, void *pDataBuffer, HRESULT hrFault);
     67    STDMETHOD_(void, ServerNotify)(REFGUID uExtent, REFIID riid, ULONG cbDataSize, void *pDataBuffer, DWORD lDataRep);
     68    STDMETHOD_(void, ServerGetSize)(REFGUID uExtent, REFIID riid, HRESULT hrFault, ULONG *pDataSize);
     69    STDMETHOD_(void, ServerFillBuffer)(REFGUID uExtent, REFIID riid, ULONG *pDataSize, void *pDataBuffer, HRESULT hrFault);
    6670
    6771protected:
     
    7074
    7175protected:
    72     const GUID m_ChannelHookID;
    73     static volatile bool s_fChannelRegistered;
    74     static volatile bool s_fVBpoxSDSCalledOnce;
    75     static CRpcChannelHook s_RpcChannelHook;
     76    const GUID              m_ChannelHookID;
     77    static volatile bool    s_fChannelRegistered;
     78    static volatile bool    s_fVBpoxSDSCalledOnce;
     79    static CRpcChannelHook  s_RpcChannelHook;
    7680
    7781    /* C wrapper*/
     
    7983};
    8084
     85#endif /* __cplusplus */
    8186
    82 #endif // #if defined(__cplusplus)
    83 
    84 
    85 #endif // #ifdef RT_OS_WINDOWS
    86 
    87 #endif // ____H_RPCCHANNELHOOK
     87#endif
  • trunk/src/VBox/Main/include/VirtualBoxSDSImpl.h

    r76066 r76067  
    7575    STDMETHOD(RegisterVBoxSVC)(IVBoxSVCRegistration *aVBoxSVC, LONG aPid, IUnknown **aExistingVirtualBox);
    7676    STDMETHOD(DeregisterVBoxSVC)(IVBoxSVCRegistration *aVBoxSVC, LONG aPid);
    77     STDMETHOD(NotifyClientsFinished)(); /**< @todo r=bird: Internal within SDS! Make private. */
    7877    /** @} */
    7978
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette