VirtualBox

Changeset 35722 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Jan 26, 2011 4:37:16 PM (14 years ago)
Author:
vboxsync
Message:

Main: reworked listener objects creation, fixes Win problems with events, few cleanups

Location:
trunk/src/VBox/Main/src-server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r35638 r35722  
    43924392
    43934393    AssertReturn(pvUser, VERR_INVALID_POINTER);
     4394   
     4395    com::Initialize();
    43944396
    43954397    // create an event queue for the current thread
     
    44064408
    44074409    delete eventQ;
     4410
     4411    com::Shutdown();
     4412
    44084413
    44094414    LogFlowFuncLeave();
  • trunk/src/VBox/Main/src-server/win/svcmain.cpp

    r35368 r35722  
    2020#include "VBox/com/defs.h"
    2121
     22#include "VBox/com/com.h"
     23
    2224#include "VBox/com/VirtualBox.h"
    2325
     
    157159    lpCmdLine = GetCommandLine(); /* this line necessary for _ATL_MIN_CRT */
    158160
    159 #if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED)
    160     HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED);
    161 #else
    162     HRESULT hRes = CoInitialize(NULL);
    163 #endif
     161    HRESULT hRes = com::Initialize();
     162
    164163    _ASSERTE(SUCCEEDED(hRes));
    165164    _Module.Init(ObjectMap, hInstance, &LIBID_VirtualBox);
     
    277276
    278277    _Module.Term();
    279     CoUninitialize();
     278
     279    com::Shutdown();
     280
    280281    Log(("SVCMAIN: Returning, COM server process ends.\n"));
    281282    return nRet;
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