VirtualBox

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


Ignore:
Timestamp:
Sep 16, 2019 1:18:44 PM (5 years ago)
Author:
vboxsync
Message:

Main: bugref:9341: The "environment" parameter in the IMachine::launchVMProcess renamed to "environmentChanges" and changed the type from wstring to "safearray of wstrings"

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

Legend:

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

    r80787 r80824  
    33583358HRESULT Machine::launchVMProcess(const ComPtr<ISession> &aSession,
    33593359                                 const com::Utf8Str &aName,
    3360                                  const com::Utf8Str &aEnvironment,
     3360                                 const std::vector<com::Utf8Str> &aEnvironmentChanges,
    33613361                                 ComPtr<IProgress> &aProgress)
    33623362{
     
    34353435        if (SUCCEEDED(rc))
    34363436        {
    3437             rc = i_launchVMProcess(control, strFrontend, aEnvironment, progress);
     3437            rc = i_launchVMProcess(control, strFrontend, aEnvironmentChanges, progress);
    34383438            if (SUCCEEDED(rc))
    34393439            {
     
    73707370HRESULT Machine::i_launchVMProcess(IInternalSessionControl *aControl,
    73717371                                   const Utf8Str &strFrontend,
    7372                                    const Utf8Str &strEnvironment,
     7372                                   const std::vector<com::Utf8Str> &aEnvironmentChanges,
    73737373                                   ProgressProxy *aProgress)
    73747374{
     
    76067606        if (FAILED(rc))
    76077607            return setError(rc, tr("Failed to start the machine '%s'. CoSetProxyBlanket failed"), strMachineName.c_str());
     7608
     7609        size_t const            cEnvVars = aEnvironmentChanges.size();
     7610        com::SafeArray<IN_BSTR> aBstrEnvironmentChanges(cEnvVars);
     7611        for (size_t i = 0; i < cEnvVars; i++)
     7612            aBstrEnvironmentChanges[i] = Bstr(aEnvironmentChanges[i]).raw();
     7613
    76087614        ULONG uPid = 0;
    76097615        rc = pVBoxSDS->LaunchVMProcess(Bstr(idStr).raw(), Bstr(strMachineName).raw(), Bstr(strFrontend).raw(),
    7610                                        Bstr(strEnvironment).raw(), Bstr(strSupHardeningLogArg).raw(),
     7616                                       ComSafeArrayAsInParam(aBstrEnvironmentChanges), Bstr(strSupHardeningLogArg).raw(),
    76117617                                       idCallerSession, &uPid);
    76127618        if (FAILED(rc))
     
    76177623#endif /* VBOX_WITH_VBOXSDS && RT_OS_WINDOWS */
    76187624    {
    7619         int vrc = MachineLaunchVMCommonWorker(idStr, strMachineName, strFrontend, strEnvironment, strSupHardeningLogArg,
     7625        int vrc = MachineLaunchVMCommonWorker(idStr, strMachineName, strFrontend, aEnvironmentChanges, strSupHardeningLogArg,
    76207626                                              strAppOverride, 0 /*fFlags*/, NULL /*pvExtraData*/, pid);
    76217627        if (RT_FAILURE(vrc))
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r80754 r80824  
    11571157    /** @todo This needs to be the same in OSE and non-OSE, preferrably
    11581158     *        only changing when actual API changes happens. */
    1159     uRevision |= 0;
     1159    uRevision |= 1;
    11601160
    11611161    *aAPIRevision = uRevision;
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