VirtualBox

Changeset 42111 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jul 11, 2012 3:06:28 PM (13 years ago)
Author:
vboxsync
Message:

Build fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r42106 r42111  
    763763    CheckComArgOutPointerValid(aProcess);
    764764
    765     com::SafeArray<LONG> aAffinity; /** @todo Process affinity, not used yet. */
    766 
    767     int rc = processCreateExInteral(aCommand, ComSafeArrayInArg(aArguments), ComSafeArrayInArg(aEnvironment),
     765    com::SafeArray<LONG> affinity; /** @todo Process affinity, not used yet. */
     766
     767    com::SafeArray<IN_BSTR> arguments(ComSafeArrayInArg(aArguments));
     768    com::SafeArray<Utf8Str> argumentsUtf8(arguments.size());
     769    for (size_t i = 0; i < arguments.size(); i++)
     770        argumentsUtf8[i] = arguments[i];
     771
     772    com::SafeArray<IN_BSTR> environment(ComSafeArrayInArg(aEnvironment));
     773    com::SafeArray<Utf8Str> environmentUtf8(environment.size());
     774    for (size_t i = 0; i < environment.size(); i++)
     775        environmentUtf8[i] = environment[i];
     776
     777    int rc = processCreateExInteral(Utf8Str(aCommand), ComSafeArrayAsInParam(argumentsUtf8), ComSafeArrayAsInParam(environmentUtf8),
    768778                                    ComSafeArrayInArg(aFlags), aTimeoutMS,
    769                                     ProcessPriority_Default, ComSafeArrayAsInParam(aAffinity), aProcess);
     779                                    ProcessPriority_Default, ComSafeArrayAsInParam(affinity), aProcess);
    770780    return RT_SUCCESS(rc) ? S_OK : VBOX_E_IPRT_ERROR;
    771781#endif /* VBOX_WITH_GUEST_CONTROL */
     
    785795    CheckComArgOutPointerValid(aProcess);
    786796
    787     int rc = processCreateExInteral(aCommand, ComSafeArrayInArg(aArguments), ComSafeArrayInArg(aEnvironment),
     797    com::SafeArray<IN_BSTR> arguments(ComSafeArrayInArg(aArguments));
     798    com::SafeArray<Utf8Str> argumentsUtf8(arguments.size());
     799    for (size_t i = 0; i < arguments.size(); i++)
     800        argumentsUtf8[i] = arguments[i];
     801
     802    com::SafeArray<IN_BSTR> environment(ComSafeArrayInArg(aEnvironment));
     803    com::SafeArray<Utf8Str> environmentUtf8(environment.size());
     804    for (size_t i = 0; i < environment.size(); i++)
     805        environmentUtf8[i] = environment[i];
     806
     807    int rc = processCreateExInteral(Utf8Str(aCommand), ComSafeArrayAsInParam(argumentsUtf8), ComSafeArrayAsInParam(environmentUtf8),
    788808                                    ComSafeArrayInArg(aFlags), aTimeoutMS,
    789809                                    aPriority, ComSafeArrayInArg(aAffinity), aProcess);
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