- Timestamp:
- Apr 29, 2016 2:26:58 PM (9 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk
r60592 r60765 5 5 6 6 # 7 # Copyright (C) 2008-201 5Oracle Corporation7 # Copyright (C) 2008-2016 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 365 365 win/nobj/VBoxNetFltNobj.rc 366 366 VBoxNetFltNobj_LIBS = \ 367 $( PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_VCC_CRT_TYPE).lib367 $(LIB_RUNTIME) 368 368 #VBoxNetFltNobj_INTERMEDIATES = 369 369 VBoxNetFltNobj_DEPS = \ -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.cpp
r56293 r60765 5 5 */ 6 6 /* 7 * Copyright (C) 2011-201 5Oracle Corporation7 * Copyright (C) 2011-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 542 542 543 543 544 CComModule _Module;544 static ATL::CComModule _Module; 545 545 546 546 BEGIN_OBJECT_MAP(ObjectMap) … … 575 575 STDAPI DllRegisterServer() 576 576 { 577 // this is a "just in case" conditional, which is not defined 578 #ifdef VBOX_FORCE_REGISTER_SERVER 577 579 return _Module.RegisterServer(TRUE); 580 #else 581 return S_OK; 582 #endif 578 583 } 579 584 580 585 STDAPI DllUnregisterServer() 581 586 { 587 // this is a "just in case" conditional, which is not defined 588 #ifdef VBOX_FORCE_REGISTER_SERVER 582 589 return _Module.UnregisterServer(TRUE); 583 } 590 #else 591 return S_OK; 592 #endif 593 } -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/nobj/VBoxNetFltNobj.h
r56293 r60765 5 5 */ 6 6 /* 7 * Copyright (C) 2011-201 5Oracle Corporation7 * Copyright (C) 2011-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 19 19 20 20 #include <windows.h> 21 /* atl stuff */22 #include <atlbase.h>23 extern CComModule _Module;24 #include <atlcom.h>25 21 22 #include "VBox/com/defs.h" 26 23 #include "VBoxNetFltNobjT.h" 27 24 #include "VBoxNetFltNobjRc.h" … … 34 31 */ 35 32 class ATL_NO_VTABLE VBoxNetFltNobj : 36 public CComObjectRootEx<CComObjectThreadModel>,37 public CComCoClass<VBoxNetFltNobj, &CLSID_VBoxNetFltNobj>,33 public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>, 34 public ATL::CComCoClass<VBoxNetFltNobj, &CLSID_VBoxNetFltNobj>, 38 35 public INetCfgComponentControl, 39 36 public INetCfgComponentNotifyBinding … … 48 45 END_COM_MAP() 49 46 47 // this is a "just in case" conditional, which is not defined 48 #ifdef VBOX_FORCE_REGISTER_SERVER 50 49 DECLARE_REGISTRY_RESOURCEID(IDR_VBOXNETFLT_NOBJ) 50 #endif 51 51 52 52 /* INetCfgComponentControl methods */ -
trunk/src/VBox/HostServices/DragAndDrop/Makefile.kmk
r56301 r60765 5 5 6 6 # 7 # Copyright (C) 2011-201 5Oracle Corporation7 # Copyright (C) 2011-2016 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 VBoxDragAndDropSvc_INCS = $(PATH_ROOT)/src/VBox/Main/include ./ 34 34 VBoxDragAndDropSvc_INCS.win = \ 35 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \36 35 $(VBOX_PATH_SDK) 37 36 -
trunk/src/VBox/HostServices/GuestControl/Makefile.kmk
r56301 r60765 5 5 6 6 # 7 # Copyright (C) 2011-201 5Oracle Corporation7 # Copyright (C) 2011-2016 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 31 31 VBoxGuestControlSvc_INCS = $(PATH_ROOT)/src/VBox/Main/include 32 32 VBoxGuestControlSvc_INCS.win = \ 33 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \34 33 $(VBOX_PATH_SDK) 35 34 -
trunk/src/VBox/HostServices/GuestProperties/Makefile.kmk
r56301 r60765 5 5 6 6 # 7 # Copyright (C) 2006-201 5Oracle Corporation7 # Copyright (C) 2006-2016 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 31 31 VBoxGuestPropSvc_INCS = $(PATH_ROOT)/src/VBox/Main/include 32 32 VBoxGuestPropSvc_INCS.win = \ 33 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \34 33 $(VBOX_PATH_SDK) 35 34 -
trunk/src/VBox/HostServices/SharedFolders/Makefile.kmk
r56962 r60765 5 5 6 6 # 7 # Copyright (C) 2006-201 5Oracle Corporation7 # Copyright (C) 2006-2016 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 30 30 VBoxSharedFolders_DEFS = VBOX_WITH_HGCM RTSHFL 31 31 VBoxSharedFolders_INCS.win = \ 32 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \33 32 $(VBOX_PATH_SDK) 34 33 -
trunk/src/VBox/HostServices/SharedOpenGL/Makefile.kmk
r60072 r60765 5 5 6 6 # 7 # Copyright (C) 2008-201 5Oracle Corporation7 # Copyright (C) 2008-2016 Oracle Corporation 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 60 60 $(TEMPLATE_VBOXMAINEXE_INTERMEDIATES) 61 61 VBoxSharedCrOpenGL_INCS.win = \ 62 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \63 62 $(VBOX_PATH_SDK)/bindings/mscom/include 64 63 ifdef VBOX_WITH_XPCOM … … 85 84 ifeq ($(KBUILD_TARGET),win) 86 85 VBoxSharedCrOpenGL_LIBS += \ 87 $(PATH_OBJ)/VBoxOGLrenderspu/VBoxOGLrenderspu$(VBOX_SUFF_LIB) \ 88 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_SUFF_LIB) 86 $(PATH_OBJ)/VBoxOGLrenderspu/VBoxOGLrenderspu$(VBOX_SUFF_LIB) 89 87 else 90 88 VBoxSharedCrOpenGL_LIBS += \ -
trunk/src/VBox/Main/idl/apiwrap-server.xsl
r56596 r60765 6 6 VirtualBox.xidl. 7 7 8 Copyright (C) 2010-201 5Oracle Corporation8 Copyright (C) 2010-2016 Oracle Corporation 9 9 10 10 This file is part of VirtualBox Open Source Edition (OSE), as … … 170 170 </xsl:for-each> 171 171 </xsl:if> 172 <xsl: text> COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)173 END_COM_MAP()172 <xsl:value-of select="concat(' VBOX_TWEAK_INTERFACE_ENTRY(', @name, ')', $G_sNewLine)"/> 173 <xsl:text> END_COM_MAP() 174 174 175 175 </xsl:text> -
trunk/src/VBox/Main/idl/comimpl.xsl
r56328 r60765 14 14 Further extension to other interfaces is possible and anticipated. 15 15 16 Copyright (C) 2010-201 5Oracle Corporation16 Copyright (C) 2010-2016 Oracle Corporation 17 17 18 18 This file is part of VirtualBox Open Source Edition (OSE), as … … 58 58 59 59 /* 60 * Copyright (C) 2010-201 5Oracle Corporation60 * Copyright (C) 2010-2016 Oracle Corporation 61 61 * 62 62 * This file is part of VirtualBox Open Source Edition (OSE), as … … 488 488 <xsl:value-of select=" ' DECLARE_PROTECT_FINAL_CONSTRUCT() '" /> 489 489 <xsl:value-of select="concat(' BEGIN_COM_MAP(', $implName, ') ')" /> 490 <xsl:value-of select="concat(' VBOX_DEFAULT_INTERFACE_ENTRIES(', @name, ') ')" /> 490 <xsl:value-of select=" ' COM_INTERFACE_ENTRY(ISupportErrorInfo) '" /> 491 <xsl:value-of select="concat(' COM_INTERFACE_ENTRY(', @name, ') ')" /> 492 <xsl:value-of select="concat(' COM_INTERFACE_ENTRY2(IDispatch, ', @name, ') ')" /> 493 <xsl:value-of select="concat(' VBOX_TWEAK_INTERFACE_ENTRY(', @name, ') ')" /> 491 494 492 495 <xsl:call-template name="genComEntry"> -
trunk/src/VBox/Main/include/MachineImpl.h
r60410 r60765 5 5 6 6 /* 7 * Copyright (C) 2006-201 5Oracle Corporation7 * Copyright (C) 2006-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1294 1294 1295 1295 BEGIN_COM_MAP(SessionMachine) 1296 VBOX_DEFAULT_INTERFACE_ENTRIES(IMachine) 1296 COM_INTERFACE_ENTRY(ISupportErrorInfo) 1297 COM_INTERFACE_ENTRY(IMachine) 1298 COM_INTERFACE_ENTRY2(IDispatch, IMachine) 1297 1299 COM_INTERFACE_ENTRY(IInternalMachineControl) 1300 VBOX_TWEAK_INTERFACE_ENTRY(IMachine) 1298 1301 END_COM_MAP() 1299 1302 … … 1548 1551 1549 1552 BEGIN_COM_MAP(SnapshotMachine) 1550 VBOX_DEFAULT_INTERFACE_ENTRIES(IMachine) 1553 COM_INTERFACE_ENTRY(ISupportErrorInfo) 1554 COM_INTERFACE_ENTRY(IMachine) 1555 COM_INTERFACE_ENTRY2(IDispatch, IMachine) 1556 VBOX_TWEAK_INTERFACE_ENTRY(IMachine) 1551 1557 END_COM_MAP() 1552 1558 -
trunk/src/VBox/Main/include/ProgressProxyImpl.h
r44528 r60765 1 1 /* $Id$ */ 2 2 /** @file 3 * IProgress implementation for Machine:: openRemoteSessionin VBoxSVC.3 * IProgress implementation for Machine::LaunchVMProcess in VBoxSVC. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 37 37 38 38 BEGIN_COM_MAP(ProgressProxy) 39 VBOX_DEFAULT_INTERFACE_ENTRIES (IProgress) 39 COM_INTERFACE_ENTRY(ISupportErrorInfo) 40 COM_INTERFACE_ENTRY(IProgress) 41 COM_INTERFACE_ENTRY2(IDispatch, IProgress) 42 VBOX_TWEAK_INTERFACE_ENTRY(IProgress) 40 43 END_COM_MAP() 41 44 … … 43 46 void FinalRelease(); 44 47 HRESULT init( 45 #if !defined (VBOX_COM_INPROC)48 #ifndef VBOX_COM_INPROC 46 49 VirtualBox *pParent, 47 50 #endif … … 50 53 BOOL fCancelable); 51 54 HRESULT init( 52 #if !defined (VBOX_COM_INPROC)55 #ifndef VBOX_COM_INPROC 53 56 VirtualBox *pParent, 54 57 #endif -
trunk/src/VBox/Main/include/SessionImpl.h
r56450 r60765 5 5 6 6 /* 7 * Copyright (C) 2006-201 5Oracle Corporation7 * Copyright (C) 2006-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 32 32 public SessionWrap 33 33 #ifdef RT_OS_WINDOWS 34 , public CComCoClass<Session, &CLSID_Session>34 , public ATL::CComCoClass<Session, &CLSID_Session> 35 35 #endif 36 36 { … … 39 39 DECLARE_CLASSFACTORY() 40 40 41 DECLARE_REGISTRY_RESOURCEID(IDR_VIRTUALBOX) 41 // Do not use any ATL registry support. 42 //DECLARE_REGISTRY_RESOURCEID(IDR_VIRTUALBOX) 42 43 43 44 DECLARE_NOT_AGGREGATABLE(Session) -
trunk/src/VBox/Main/include/VirtualBoxBase.h
r57065 r60765 5 5 6 6 /* 7 * Copyright (C) 2006-201 5Oracle Corporation7 * Copyright (C) 2006-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 62 62 #if !defined(VBOX_WITH_XPCOM) 63 63 64 #include <atlcom.h>65 66 64 /* use a special version of the singleton class factory, 67 65 * see KB811591 in msdn for more info. */ … … 71 69 72 70 template <class T> 73 class CMyComClassFactorySingleton : public CComClassFactory71 class CMyComClassFactorySingleton : public ATL::CComClassFactory 74 72 { 75 73 public: 76 CMyComClassFactorySingleton() : m_hrCreate(S_OK){} 77 virtual ~CMyComClassFactorySingleton(){} 74 CMyComClassFactorySingleton() : 75 m_hrCreate(S_OK), m_spObj(NULL) 76 { 77 } 78 virtual ~CMyComClassFactorySingleton() 79 { 80 if (m_spObj) 81 m_spObj->Release(); 82 } 78 83 // IClassFactory 79 84 STDMETHOD(CreateInstance)(LPUNKNOWN pUnkOuter, REFIID riid, void** ppvObj) … … 83 88 { 84 89 *ppvObj = NULL; 85 // Aggregation is not supported in singleton objects. 86 ATLASSERT(pUnkOuter == NULL); 87 if (pUnkOuter != NULL) 88 hRes = CLASS_E_NOAGGREGATION; 90 // no aggregation for singletons 91 AssertReturn(pUnkOuter == NULL, CLASS_E_NOAGGREGATION); 92 if (m_hrCreate == S_OK && m_spObj == NULL) 93 { 94 Lock(); 95 __try 96 { 97 // Fix: The following If statement was moved inside the __try statement. 98 // Did another thread arrive here first? 99 if (m_hrCreate == S_OK && m_spObj == NULL) 100 { 101 // lock the module to indicate activity 102 // (necessary for the monitor shutdown thread to correctly 103 // terminate the module in case when CreateInstance() fails) 104 ATL::_pAtlModule->Lock(); 105 ATL::CComObjectCached<T> *p; 106 m_hrCreate = ATL::CComObjectCached<T>::CreateInstance(&p); 107 if (SUCCEEDED(m_hrCreate)) 108 { 109 m_hrCreate = p->QueryInterface(IID_IUnknown, (void **)&m_spObj); 110 if (FAILED(m_hrCreate)) 111 { 112 delete p; 113 } 114 } 115 ATL::_pAtlModule->Unlock(); 116 } 117 } 118 __finally 119 { 120 Unlock(); 121 } 122 } 123 if (m_hrCreate == S_OK) 124 { 125 hRes = m_spObj->QueryInterface(riid, ppvObj); 126 } 89 127 else 90 128 { 91 if (m_hrCreate == S_OK && m_spObj == NULL) 92 { 93 Lock(); 94 __try 95 { 96 // Fix: The following If statement was moved inside the __try statement. 97 // Did another thread arrive here first? 98 if (m_hrCreate == S_OK && m_spObj == NULL) 99 { 100 // lock the module to indicate activity 101 // (necessary for the monitor shutdown thread to correctly 102 // terminate the module in case when CreateInstance() fails) 103 _pAtlModule->Lock(); 104 CComObjectCached<T> *p; 105 m_hrCreate = CComObjectCached<T>::CreateInstance(&p); 106 if (SUCCEEDED(m_hrCreate)) 107 { 108 m_hrCreate = p->QueryInterface(IID_IUnknown, (void**)&m_spObj); 109 if (FAILED(m_hrCreate)) 110 { 111 delete p; 112 } 113 } 114 _pAtlModule->Unlock(); 115 } 116 } 117 __finally 118 { 119 Unlock(); 120 } 121 } 122 if (m_hrCreate == S_OK) 123 { 124 hRes = m_spObj->QueryInterface(riid, ppvObj); 125 } 126 else 127 { 128 hRes = m_hrCreate; 129 } 129 hRes = m_hrCreate; 130 130 } 131 131 } … … 133 133 } 134 134 HRESULT m_hrCreate; 135 CComPtr<IUnknown>m_spObj;135 IUnknown *m_spObj; 136 136 }; 137 137 … … 642 642 #define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(cls, iface) \ 643 643 VIRTUALBOXBASE_ADD_VIRTUAL_COMPONENT_METHODS(cls, iface) 644 #else // #ifdefVBOX_WITH_XPCOM644 #else // !VBOX_WITH_XPCOM 645 645 #define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(cls, iface) \ 646 646 VIRTUALBOXBASE_ADD_VIRTUAL_COMPONENT_METHODS(cls, iface) \ 647 647 STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid) \ 648 648 { \ 649 const _ATL_INTMAP_ENTRY* pEntries = cls::_GetEntries(); \649 const ATL::_ATL_INTMAP_ENTRY* pEntries = cls::_GetEntries(); \ 650 650 Assert(pEntries); \ 651 651 if (!pEntries) \ … … 664 664 return bSupports ? S_OK : S_FALSE; \ 665 665 } 666 #endif // #ifdef VBOX_WITH_XPCOM 666 #endif // !VBOX_WITH_XPCOM 667 668 /** 669 * VBOX_TWEAK_INTERFACE_ENTRY: 670 * Macro for defining magic interface entries needed for all interfaces 671 * implemented by any subclass of VirtualBoxBase. 672 */ 673 #ifdef VBOX_WITH_XPCOM 674 #define VBOX_TWEAK_INTERFACE_ENTRY(iface) 675 #else // !VBOX_WITH_XPCOM 676 #define VBOX_TWEAK_INTERFACE_ENTRY(iface) \ 677 COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.m_p) 678 #endif // !VBOX_WITH_XPCOM 679 667 680 668 681 /** … … 676 689 class ATL_NO_VTABLE VirtualBoxBase 677 690 : public VirtualBoxTranslatable, 678 public CComObjectRootEx<CComMultiThreadModel>691 public ATL::CComObjectRootEx<ATL::CComMultiThreadModel> 679 692 #if !defined (VBOX_WITH_XPCOM) 680 693 , public ISupportErrorInfo … … 683 696 protected: 684 697 #ifdef RT_OS_WINDOWS 685 C ComPtr <IUnknown>m_pUnkMarshaler;698 ComPtr<IUnknown> m_pUnkMarshaler; 686 699 #endif 687 700 688 HRESULT 701 HRESULT BaseFinalConstruct() 689 702 { 690 703 #ifdef RT_OS_WINDOWS 691 704 return CoCreateFreeThreadedMarshaler(this, //GetControllingUnknown(), 692 &m_pUnkMarshaler.p);705 m_pUnkMarshaler.asOutParam()); 693 706 #else 694 707 return S_OK; … … 696 709 } 697 710 698 void 711 void BaseFinalRelease() 699 712 { 700 713 #ifdef RT_OS_WINDOWS 701 m_pUnkMarshaler. Release();714 m_pUnkMarshaler.setNull(); 702 715 #endif 703 716 } -
trunk/src/VBox/Main/include/VirtualBoxClientImpl.h
r52442 r60765 6 6 7 7 /* 8 * Copyright (C) 2010-201 4Oracle Corporation8 * Copyright (C) 2010-2016 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 30 30 public VirtualBoxClientWrap 31 31 #ifdef RT_OS_WINDOWS 32 , public CComCoClass<VirtualBoxClient, &CLSID_VirtualBoxClient>32 , public ATL::CComCoClass<VirtualBoxClient, &CLSID_VirtualBoxClient> 33 33 #endif 34 34 { … … 36 36 DECLARE_CLASSFACTORY() 37 37 38 DECLARE_REGISTRY_RESOURCEID(IDR_VIRTUALBOX) 38 // Do not use any ATL registry support. 39 //DECLARE_REGISTRY_RESOURCEID(IDR_VIRTUALBOX) 39 40 40 41 DECLARE_NOT_AGGREGATABLE(VirtualBoxClient) -
trunk/src/VBox/Main/include/VirtualBoxErrorInfoImpl.h
r55401 r60765 24 24 25 25 class ATL_NO_VTABLE VirtualBoxErrorInfo 26 : public CComObjectRootEx<CComMultiThreadModel>26 : public ATL::CComObjectRootEx<ATL::CComMultiThreadModel> 27 27 , VBOX_SCRIPTABLE_IMPL(IVirtualBoxErrorInfo) 28 28 #ifndef VBOX_WITH_XPCOM /* IErrorInfo doesn't inherit from IDispatch, ugly 3am hack: */ -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r59571 r60765 5 5 6 6 /* 7 * Copyright (C) 2006-201 5Oracle Corporation7 * Copyright (C) 2006-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 61 61 public VirtualBoxWrap 62 62 #ifdef RT_OS_WINDOWS 63 , public CComCoClass<VirtualBox, &CLSID_VirtualBox>63 , public ATL::CComCoClass<VirtualBox, &CLSID_VirtualBox> 64 64 #endif 65 65 { … … 75 75 DECLARE_CLASSFACTORY_SINGLETON(VirtualBox) 76 76 77 DECLARE_REGISTRY_RESOURCEID(IDR_VIRTUALBOX) 77 // Do not use any ATL registry support. 78 //DECLARE_REGISTRY_RESOURCEID(IDR_VIRTUALBOX) 78 79 79 80 // Kind of redundant (VirtualBoxWrap declares itself not aggregatable and -
trunk/src/VBox/Main/src-all/EventImpl.cpp
r60240 r60765 1261 1261 1262 1262 BEGIN_COM_MAP(PassiveEventListener) 1263 VBOX_DEFAULT_INTERFACE_ENTRIES(IEventListener) 1263 COM_INTERFACE_ENTRY(ISupportErrorInfo) 1264 COM_INTERFACE_ENTRY(IEventListener) 1265 COM_INTERFACE_ENTRY2(IDispatch, IEventListener) 1266 VBOX_TWEAK_INTERFACE_ENTRY(IEventListener) 1264 1267 END_COM_MAP() 1265 1268 … … 1301 1304 1302 1305 BEGIN_COM_MAP(ProxyEventListener) 1303 VBOX_DEFAULT_INTERFACE_ENTRIES(IEventListener) 1306 COM_INTERFACE_ENTRY(ISupportErrorInfo) 1307 COM_INTERFACE_ENTRY(IEventListener) 1308 COM_INTERFACE_ENTRY2(IDispatch, IEventListener) 1309 VBOX_TWEAK_INTERFACE_ENTRY(IEventListener) 1304 1310 END_COM_MAP() 1305 1311 … … 1356 1362 1357 1363 BEGIN_COM_MAP(EventSourceAggregator) 1358 VBOX_DEFAULT_INTERFACE_ENTRIES(IEventSource) 1364 COM_INTERFACE_ENTRY(ISupportErrorInfo) 1365 COM_INTERFACE_ENTRY(IEventSource) 1366 COM_INTERFACE_ENTRY2(IDispatch, IEventSource) 1367 VBOX_TWEAK_INTERFACE_ENTRY(IEventSource) 1359 1368 END_COM_MAP() 1360 1369 -
trunk/src/VBox/Main/src-client/win/dllmain.cpp
r59369 r60765 25 25 #include <VirtualBoxClientImpl.h> 26 26 27 #include <atlbase.h>28 #include <atlcom.h>29 30 27 #include <iprt/initterm.h> 31 28 … … 34 31 * Global Variables * 35 32 *********************************************************************************************************************************/ 36 CComModule _Module;33 static ATL::CComModule _Module; 37 34 38 35 BEGIN_OBJECT_MAP(ObjectMap) … … 50 47 if (dwReason == DLL_PROCESS_ATTACH) 51 48 { 49 // idempotent, so doesn't harm, and needed for COM embedding scenario 50 RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE); 51 52 52 _Module.Init(ObjectMap, hInstance, &LIBID_VirtualBox); 53 53 DisableThreadLibraryCalls(hInstance); 54 55 // idempotent, so doesn't harm, and needed for COM embedding scenario56 RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);57 54 } 58 55 else if (dwReason == DLL_PROCESS_DETACH) … … 68 65 STDAPI DllCanUnloadNow(void) 69 66 { 70 return (_Module.GetLockCount() ==0) ? S_OK : S_FALSE;67 return (_Module.GetLockCount() == 0) ? S_OK : S_FALSE; 71 68 } 72 69 … … 74 71 // Returns a class factory to create an object of the requested type 75 72 76 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)73 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) 77 74 { 78 75 return _Module.GetClassObject(rclsid, riid, ppv); -
trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
r60159 r60765 5 5 6 6 /* 7 * Copyright (C) 2005-201 5Oracle Corporation7 * Copyright (C) 2005-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 258 258 DECLARE_PROTECT_FINAL_CONSTRUCT() 259 259 BEGIN_COM_MAP(USBDeviceFilter) 260 VBOX_DEFAULT_INTERFACE_ENTRIES(IUSBDeviceFilter) 260 COM_INTERFACE_ENTRY(ISupportErrorInfo) 261 COM_INTERFACE_ENTRY(IUSBDeviceFilter) 262 COM_INTERFACE_ENTRY2(IDispatch, IUSBDeviceFilter) 263 VBOX_TWEAK_INTERFACE_ENTRY(IUSBDeviceFilter) 261 264 END_COM_MAP() 262 265 -
trunk/src/VBox/Main/src-server/win/svcmain.cpp
r59369 r60765 6 6 7 7 /* 8 * Copyright (C) 2004-201 3Oracle Corporation8 * Copyright (C) 2004-2016 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 #include <stdio.h> 21 21 #include <stdlib.h> 22 #include <tchar.h> 22 23 23 24 #include "VBox/com/defs.h" … … 41 42 #include <iprt/message.h> 42 43 43 #include <atlbase.h> 44 #include <atlcom.h> 45 46 #define _ATL_FREE_THREADED 47 48 class CExeModule : public CComModule 44 class CExeModule : public ATL::CComModule 49 45 { 50 46 public: … … 70 66 LONG CExeModule::Unlock() 71 67 { 72 LONG l = CComModule::Unlock();68 LONG l = ATL::CComModule::Unlock(); 73 69 if (l == 0) 74 70 { … … 92 88 } while (dwWait == WAIT_OBJECT_0); 93 89 /* timed out */ 94 if (!bActivity && m_nLockCnt== 0) /* if no activity let's really bail */90 if (!bActivity && GetLockCount() == 0) /* if no activity let's really bail */ 95 91 { 96 92 /* Disable log rotation at this point, worst case a log file … … 114 110 } 115 111 } 116 #if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED)112 #if _WIN32_WINNT >= 0x0400 117 113 CoSuspendClassObjects(); 118 if (!bActivity && m_nLockCnt== 0)114 if (!bActivity && GetLockCount() == 0) 119 115 #endif 120 116 break; … … 135 131 } 136 132 137 CExeModule _Module;133 static CExeModule _Module; 138 134 139 135 BEGIN_OBJECT_MAP(ObjectMap) … … 384 380 { 385 381 _Module.StartMonitor(); 386 #if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED)382 #if _WIN32_WINNT >= 0x0400 387 383 hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE | REGCLS_SUSPENDED); 388 384 _ASSERTE(SUCCEEDED(hRes)); -
trunk/src/VBox/Main/testcase/makefile.tstVBoxAPIWin
r45064 r60765 3 3 # 4 4 # 5 # Copyright (C) 2006-201 3Oracle Corporation5 # Copyright (C) 2006-2016 Oracle Corporation 6 6 # 7 7 # This file is part of VirtualBox Open Source Edition (OSE), as … … 32 32 # VS_INSTALL_PATH = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\" 33 33 # VS_INCLUDE_PATH = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include" 34 # VS_ATLMFC_INCLUDE_PATH = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include"35 34 # WIN_SDK_INCLUDE_PATH = "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include" 36 35 # WIN_SDK_LIB_PATH = "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64\"
Note:
See TracChangeset
for help on using the changeset viewer.