VirtualBox

Changeset 44425 in vbox for trunk/src


Ignore:
Timestamp:
Jan 28, 2013 2:16:06 PM (12 years ago)
Author:
vboxsync
Message:

Main: Some more pVM cleanups.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r44421 r44425  
    414414public:
    415415
    416     /**
     416    /*
    417417     *  Helper class that safely manages the Console::mpUVM pointer
    418418     *  by calling addVMCaller() on construction and releaseVMCaller() on
    419419     *  destruction. Intended for Console children. The usage pattern is:
    420420     *  <code>
    421      *      Console::SaveVMPtr pVM(mParent);
    422      *      if (FAILED(pVM.rc())) return pVM.rc();
     421     *      Console::SaveVMPtr ptrVM(mParent);
     422     *      if (!ptrVM.isOk())
     423     *          return ptrVM.rc();
    423424     *      ...
    424      *      VMR3ReqCall(pVM, ...
     425     *      VMR3ReqCall(ptrVM.rawUVM(), ...
    425426     *      ...
    426      *      printf("%p\n", pVM.raw());
     427     *      printf("%p\n", ptrVM.rawUVM());
    427428     *  </code>
    428429     *
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r44419 r44425  
    1010
    1111/*
    12  * Copyright (C) 2006-2012 Oracle Corporation
     12 * Copyright (C) 2006-2013 Oracle Corporation
    1313 *
    1414 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    648648 *  is done here.
    649649 *
    650  *  @param   pVM                 VM handle.
     650 *  @param   pUVM                The user mode VM handle.
     651 *  @param   pVM                 The cross context VM handle.
    651652 *  @param   pvConsole           Pointer to the VMPowerUpTask object.
    652653 *  @return  VBox status code.
     
    697698 * @return  VBox status code.
    698699 * @param   pUVM        The user mode VM handle.
    699  * @param   pVM         The shared VM handle.
     700 * @param   pVM         The cross context VM handle.
    700701 * @param   pAlock      The automatic lock instance.  This is for when we have
    701702 *                      to leave it in order to avoid deadlocks (ext packs and
     
    783784     * This is the only node in the tree.
    784785     */
    785     PCFGMNODE pRoot = CFGMR3GetRoot(pVM);
     786    PCFGMNODE pRoot = CFGMR3GetRootU(pUVM);
    786787    Assert(pRoot);
    787788
     
    14501451                    default:
    14511452                        AssertMsgFailed(("Invalid bootDevice=%d\n", bootDevice));
    1452                         return VMSetError(pVM, VERR_INVALID_PARAMETER, RT_SRC_POS,
    1453                                         N_("Invalid boot device '%d'"), bootDevice);
     1453                        return VMR3SetError(pUVM, VERR_INVALID_PARAMETER, RT_SRC_POS,
     1454                                            N_("Invalid boot device '%d'"), bootDevice);
    14541455                }
    14551456                InsertConfigString(pBiosCfg, szParamName, pszBootDevice);
     
    18541855                    AssertMsgFailed(("Invalid network adapter type '%d' for slot '%d'",
    18551856                                    adapterType, ulInstance));
    1856                     return VMSetError(pVM, VERR_INVALID_PARAMETER, RT_SRC_POS,
    1857                                       N_("Invalid network adapter type '%d' for slot '%d'"),
    1858                                       adapterType, ulInstance);
     1857                    return VMR3SetError(pUVM, VERR_INVALID_PARAMETER, RT_SRC_POS,
     1858                                        N_("Invalid network adapter type '%d' for slot '%d'"),
     1859                                        adapterType, ulInstance);
    18591860            }
    18601861
     
    23552356                        /* Always fatal! Up to VBox 4.0.4 we allowed to start the VM anyway
    23562357                         * but this induced problems when the user saved + restored the VM! */
    2357                         return VMSetError(pVM, VERR_NOT_FOUND, RT_SRC_POS,
     2358                        return VMR3SetError(pUVM, VERR_NOT_FOUND, RT_SRC_POS,
    23582359                                N_("Implementation of the USB 2.0 controller not found!\n"
    23592360                                   "Because the USB 2.0 controller state is part of the saved "
     
    26082609                BOOL fSupports3D = VBoxOglIs3DAccelerationSupported();
    26092610                if (!fSupports3D)
    2610                     return VMSetError(pVM, VERR_NOT_AVAILABLE, RT_SRC_POS,
     2611                    return VMR3SetError(pUVM, VERR_NOT_AVAILABLE, RT_SRC_POS,
    26112612                            N_("This VM was configured to use 3D acceleration. However, the "
    26122613                               "3D support of the host is not working properly and the "
     
    28562857 *
    28572858 * @returns VBox status code.
    2858  * @param   pVM             The VM handle.
     2859 * @param   pRoot           The root of the configuration tree.
    28592860 * @param   pVirtualBox     Pointer to the IVirtualBox interface.
    28602861 * @param   pMachine        Pointer to the IMachine interface.
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