VirtualBox

Ignore:
Timestamp:
Apr 29, 2016 2:26:58 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106960
Message:

API: stop using ATL and use a vastly smaller lookalike instead, plus a lot of cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/win/dllmain.cpp

    r59369 r60765  
    2525#include <VirtualBoxClientImpl.h>
    2626
    27 #include <atlbase.h>
    28 #include <atlcom.h>
    29 
    3027#include <iprt/initterm.h>
    3128
     
    3431*   Global Variables                                                                                                             *
    3532*********************************************************************************************************************************/
    36 CComModule _Module;
     33static ATL::CComModule _Module;
    3734
    3835BEGIN_OBJECT_MAP(ObjectMap)
     
    5047    if (dwReason == DLL_PROCESS_ATTACH)
    5148    {
     49        // idempotent, so doesn't harm, and needed for COM embedding scenario
     50        RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
     51
    5252        _Module.Init(ObjectMap, hInstance, &LIBID_VirtualBox);
    5353        DisableThreadLibraryCalls(hInstance);
    54 
    55         // idempotent, so doesn't harm, and needed for COM embedding scenario
    56         RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
    5754    }
    5855    else if (dwReason == DLL_PROCESS_DETACH)
     
    6865STDAPI DllCanUnloadNow(void)
    6966{
    70     return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
     67    return (_Module.GetLockCount() == 0) ? S_OK : S_FALSE;
    7168}
    7269
     
    7471// Returns a class factory to create an object of the requested type
    7572
    76 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
     73STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
    7774{
    7875    return _Module.GetClassObject(rclsid, riid, ppv);
Note: See TracChangeset for help on using the changeset viewer.

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