VirtualBox

Changeset 69 in vbox


Ignore:
Timestamp:
Jan 16, 2007 4:09:20 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
17510
Message:

Main: If the USB proxy service cannot be loaded, report an error when accessing the IMachine::USBController() property to completely disable the USB controller.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r1 r69  
    4242#include "GuestOSTypeImpl.h"
    4343#include "VirtualBoxErrorInfoImpl.h"
     44
     45#include "USBProxyService.h"
    4446
    4547#include "Logging.h"
     
    11161118
    11171119    AutoReaderLock alock (this);
     1120
     1121    USBProxyService *usbProxyService = mParent->host()->usbProxyService();
     1122    AssertReturn (usbProxyService, E_FAIL);
     1123    if (!usbProxyService->isActive())
     1124    {
     1125        /* disable the USB controller completely to avoid assertions if the
     1126         * USB proxy service could not start. */
     1127
     1128        Assert (VBOX_FAILURE (usbProxyService->getLastError()));
     1129        if (usbProxyService->getLastError() == VERR_FILE_NOT_FOUND)
     1130            return setError (E_FAIL,
     1131                tr ("Could not load the USB proxy service (%Vrc), "
     1132                    "the virtual USB Controller is not available."
     1133                    "The service may not be installed on the host computer."),
     1134                usbProxyService->getLastError());
     1135        else
     1136            return setError (E_FAIL,
     1137                tr ("Could not load the USB proxy service (%Vrc), "
     1138                    "the virtual USB Controller is not available."),
     1139                usbProxyService->getLastError());
     1140    }
    11181141
    11191142    mUSBController.queryInterfaceTo (a_ppUSBController);
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