VirtualBox

Ignore:
Timestamp:
Mar 16, 2016 3:00:06 PM (9 years ago)
Author:
vboxsync
Message:

Frontends etc: convert more code to use VirtualBoxClient instead of direct creation of VirtualBox instances, to improve error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/testcase/tstHeadless.cpp

    r50117 r60063  
    66
    77/*
    8  * Copyright (C) 2006-2014 Oracle Corporation
     8 * Copyright (C) 2006-2016 Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    7979    do
    8080    {
     81        ComPtr <IVirtualBoxClient> virtualBoxClient;
    8182        ComPtr <IVirtualBox> virtualBox;
    8283        ComPtr <ISession> session;
    8384
    8485        RTPrintf("Creating VirtualBox object...\n");
    85         rc = virtualBox.createLocalObject(CLSID_VirtualBox);
     86        rc = virtualBoxClient.createInprocObject(CLSID_VirtualBoxClient);
     87        if (SUCCEEDED(rc))
     88            rc = virtualBoxClient->COMGETTER(VirtualBox)(virtualBox.asOutParam());
    8689        if (FAILED(rc))
    8790            RTPrintf("ERROR: failed to create the VirtualBox object!\n");
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