VirtualBox

Changeset 50853 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Mar 24, 2014 11:44:34 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92939
Message:

Runtime/r3/win/RTSystemQueryDmiString: don't fail if the COM lib was already initialized

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/RTSystemQueryDmiString-win.cpp

    r44529 r50853  
    166166     * Before we do anything with COM, we have to initialize it.
    167167     */
     168    bool fUninit = true;
    168169    HRESULT hrc = rtSystemDmiWinInitialize();
    169     if (FAILED(hrc))
     170    if (hrc == RPC_E_CHANGED_MODE)
     171        fUninit = false;  /* don't fail if already initialized */
     172    else if (FAILED(hrc))
    170173        return VERR_NOT_SUPPORTED;
    171174
     
    247250    else
    248251        hrc = E_OUTOFMEMORY;
    249     rtSystemDmiWinTerminate();
     252    if (fUninit)
     253        rtSystemDmiWinTerminate();
    250254    if (FAILED(hrc) && rc == VERR_NOT_SUPPORTED)
    251255        rc = VERR_NOT_SUPPORTED;
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