- Timestamp:
- Jul 11, 2012 6:09:05 PM (13 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestProcessImpl.h
r42105 r42117 22 22 #include "VirtualBoxBase.h" 23 23 24 #include <vector> 25 26 typedef std::vector<Utf8Str> StringsArray; 27 24 28 class GuestSession; 25 29 … … 44 48 45 49 int init(GuestSession *pSession, 46 const Utf8Str &aCommand, ComSafeArrayIn(Utf8Str, aArguments), ComSafeArrayIn(Utf8Str, aEnvironment),50 const Utf8Str &aCommand, const StringsArray &aArguments, const StringsArray &aEnvironment, 47 51 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, 48 52 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity)); -
trunk/src/VBox/Main/include/GuestSessionImpl.h
r42105 r42117 26 26 #include "GuestFileImpl.h" 27 27 #include "GuestFsObjInfoImpl.h" 28 29 #include <map> 30 #include <vector> 31 32 typedef std::vector<Utf8Str> StringsArray; 28 33 29 34 class Guest; … … 113 118 int fileClose(ComObjPtr<GuestFile> pFile); 114 119 int processClose(ComObjPtr<GuestProcess> pProcess); 115 int processCreateExInteral(const Utf8Str &aCommand, ComSafeArrayIn(Utf8Str, aArguments), ComSafeArrayIn(Utf8Str, aEnvironment),120 int processCreateExInteral(const Utf8Str &aCommand, const StringsArray &aArguments, const StringsArray &aEnvironment, 116 121 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, 117 122 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity), -
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r42106 r42117 51 51 52 52 int GuestProcess::init(GuestSession *pSession, 53 const Utf8Str &aCommand, ComSafeArrayIn(Utf8Str, aArguments), ComSafeArrayIn(Utf8Str, aEnvironment),53 const Utf8Str &aCommand, const StringsArray &aArguments, const StringsArray &aEnvironment, 54 54 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, 55 55 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity)) -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r42116 r42117 348 348 } 349 349 350 int GuestSession::processCreateExInteral(const Utf8Str &aCommand, ComSafeArrayIn(Utf8Str, aArguments), ComSafeArrayIn(Utf8Str, aEnvironment),350 int GuestSession::processCreateExInteral(const Utf8Str &aCommand, const StringsArray &aArguments, const StringsArray &aEnvironment, 351 351 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, 352 352 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity), … … 387 387 388 388 rc = pGuestProcess->init(this, 389 aCommand, ComSafeArrayInArg(aArguments), ComSafeArrayInArg(aEnvironment),389 aCommand, aArguments, aEnvironment, 390 390 ComSafeArrayInArg(aFlags), aTimeoutMS, 391 391 aPriority, ComSafeArrayInArg(aAffinity)); … … 760 760 ReturnComNotImplemented(); 761 761 #else 762 #if 0763 762 AutoCaller autoCaller(this); 764 763 if (FAILED(autoCaller.rc())) return autoCaller.rc(); … … 769 768 770 769 com::SafeArray<IN_BSTR> arguments(ComSafeArrayInArg(aArguments)); 771 com::SafeArray<Utf8Str>argumentsUtf8(arguments.size());770 StringsArray argumentsUtf8(arguments.size()); 772 771 for (size_t i = 0; i < arguments.size(); i++) 773 772 argumentsUtf8[i] = Utf8Str(Bstr(arguments[i])); 774 773 775 774 com::SafeArray<IN_BSTR> environment(ComSafeArrayInArg(aEnvironment)); 776 com::SafeArray<Utf8Str>environmentUtf8(environment.size());775 StringsArray environmentUtf8(environment.size()); 777 776 for (size_t i = 0; i < environment.size(); i++) 778 777 environmentUtf8[i] = Utf8Str(Bstr(environment[i])); 779 778 780 int rc = processCreateExInteral(Utf8Str(aCommand), ComSafeArrayAsInParam(argumentsUtf8), ComSafeArrayAsInParam(environmentUtf8),779 int rc = processCreateExInteral(Utf8Str(aCommand), argumentsUtf8, environmentUtf8, 781 780 ComSafeArrayInArg(aFlags), aTimeoutMS, 782 781 ProcessPriority_Default, ComSafeArrayAsInParam(affinity), aProcess); 783 782 return RT_SUCCESS(rc) ? S_OK : VBOX_E_IPRT_ERROR; 784 #endif785 783 #endif /* VBOX_WITH_GUEST_CONTROL */ 786 784 } … … 794 792 ReturnComNotImplemented(); 795 793 #else 796 #if 0797 794 AutoCaller autoCaller(this); 798 795 if (FAILED(autoCaller.rc())) return autoCaller.rc(); … … 801 798 802 799 com::SafeArray<IN_BSTR> arguments(ComSafeArrayInArg(aArguments)); 803 com::SafeArray<Utf8Str> argumentsUtf8;800 StringsArray argumentsUtf8(arguments.size()); 804 801 for (size_t i = 0; i < arguments.size(); i++) 805 802 argumentsUtf8[i] = Utf8Str(Bstr(arguments[i])); 806 803 807 804 com::SafeArray<IN_BSTR> environment(ComSafeArrayInArg(aEnvironment)); 808 com::SafeArray<Utf8Str>environmentUtf8(environment.size());805 StringsArray environmentUtf8(environment.size()); 809 806 for (size_t i = 0; i < environment.size(); i++) 810 807 environmentUtf8[i] = Utf8Str(Bstr(environment[i])); 811 808 812 int rc = processCreateExInteral(Utf8Str(aCommand), ComSafeArrayAsInParam(argumentsUtf8), ComSafeArrayAsInParam(environmentUtf8),809 int rc = processCreateExInteral(Utf8Str(aCommand), argumentsUtf8, environmentUtf8, 813 810 ComSafeArrayInArg(aFlags), aTimeoutMS, 814 811 aPriority, ComSafeArrayInArg(aAffinity), aProcess); 815 812 return RT_SUCCESS(rc) ? S_OK : VBOX_E_IPRT_ERROR; 816 #endif817 813 #endif /* VBOX_WITH_GUEST_CONTROL */ 818 814 }
Note:
See TracChangeset
for help on using the changeset viewer.