Changeset 42105 in vbox
- Timestamp:
- Jul 11, 2012 11:53:22 AM (12 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r42096 r42105 9744 9744 <interface 9745 9745 name="IProcess" extends="$unknown" 9746 uuid=" 031c6ba4-9005-486d-8333-b27bb009bba9"9746 uuid="8a308a2f-bea6-4786-80a0-4d07cd4bacaa" 9747 9747 wsmap="managed" 9748 9748 > … … 9851 9851 <desc>TODO</desc> 9852 9852 </param> 9853 <param name=" size" type="unsigned long" dir="in">9853 <param name="data" type="octet" dir="in" safearray="yes"> 9854 9854 <desc>TODO</desc> 9855 9855 </param> … … 9857 9857 <desc>TODO</desc> 9858 9858 </param> 9859 <param name="written" type="unsigned long" dir="out"> 9860 <desc>TODO</desc> 9861 </param> 9862 <param name="data" type="octet" dir="return" safearray="yes"> 9859 <param name="written" type="unsigned long" dir="return"> 9863 9860 <desc>TODO</desc> 9864 9861 </param> … … 10286 10283 <interface 10287 10284 name="IGuest" extends="$unknown" 10288 uuid=" a115744a-0e0b-4193-b40c-40e0d66d0f8d"10285 uuid="1413d910-e533-47af-a71b-919c106d2472" 10289 10286 wsmap="managed" 10290 10287 > … … 10674 10671 </method> 10675 10672 10676 <method name=" openSession">10673 <method name="createSession"> 10677 10674 <desc> 10678 10675 TODO -
trunk/src/VBox/Main/include/GuestImpl.h
r42084 r42105 133 133 ULONG *aPageTotal, ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal, ULONG *aMemSharedTotal); 134 134 STDMETHOD(UpdateGuestAdditions)(IN_BSTR aSource, ULONG aFlags, IProgress **aProgress); 135 STDMETHOD( OpenSession)(IN_BSTR aUser, IN_BSTR aPassword, IN_BSTR aDomain, IN_BSTR aSessionName, IGuestSession **aGuestSession);135 STDMETHOD(CreateSession)(IN_BSTR aUser, IN_BSTR aPassword, IN_BSTR aDomain, IN_BSTR aSessionName, IGuestSession **aGuestSession); 136 136 137 137 // Public methods that are not in IDL (only called internally). … … 202 202 void enableVMMStatistics(BOOL aEnable) { mCollectVMMStats = aEnable; }; 203 203 204 public: 205 /** @name Public internal methods. 206 * @{ */ 207 int sessionClose(ComObjPtr<GuestSession> pSession); 208 /** @} */ 209 204 210 private: 205 211 … … 353 359 354 360 #endif // ____H_GUESTIMPL 355 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ 361 -
trunk/src/VBox/Main/include/GuestProcessImpl.h
r42095 r42105 22 22 #include "VirtualBoxBase.h" 23 23 24 class GuestSession; 25 24 26 /** 25 27 * TODO … … 40 42 END_COM_MAP() 41 43 DECLARE_EMPTY_CTOR_DTOR(GuestProcess) 42 HRESULT init(void); 44 45 int init(GuestSession *pSession, 46 const Utf8Str &aCommand, ComSafeArrayIn(Utf8Str, aArguments), ComSafeArrayIn(Utf8Str, aEnvironment), 47 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, 48 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity)); 43 49 void uninit(void); 44 50 HRESULT FinalConstruct(void); … … 52 58 STDMETHOD(COMGETTER(ExecutablePath))(BSTR *aExecutablePath); 53 59 STDMETHOD(COMGETTER(ExitCode))(LONG *aExitCode); 54 STDMETHOD(COMGETTER(P ID))(ULONG *aPID);60 STDMETHOD(COMGETTER(Pid))(ULONG *aPID); 55 61 STDMETHOD(COMGETTER(Status))(ProcessStatus_T *aStatus); 56 62 57 63 STDMETHOD(Read)(ULONG aHandle, ULONG aSize, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData)); 58 64 STDMETHOD(Terminate)(void); 59 STDMETHOD(WaitFor)(ComSafeArray Out(ProcessWaitForFlag_T, aFlags), ULONG aTimeoutMS, ProcessWaitReason_T *aReason);65 STDMETHOD(WaitFor)(ComSafeArrayIn(ProcessWaitForFlag_T, aFlags), ULONG aTimeoutMS, ProcessWaitReason_T *aReason); 60 66 STDMETHOD(Write)(ULONG aHandle, ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten); 61 67 /** @} */ … … 72 78 struct Data 73 79 { 80 GuestSession *mParent; 74 81 Bstr mName; 75 82 } mData; -
trunk/src/VBox/Main/include/GuestSessionImpl.h
r42094 r42105 27 27 #include "GuestFsObjInfoImpl.h" 28 28 29 class Guest; 30 29 31 /** 30 32 * TODO … … 45 47 DECLARE_EMPTY_CTOR_DTOR(GuestSession) 46 48 47 HRESULT init(const ComPtr<IGuest> pGuest, Utf8Str aUser, Utf8Str aPassword, Utf8Str aDomain, Utf8Str aName);49 int init(Guest *aGuest, Utf8Str aUser, Utf8Str aPassword, Utf8Str aDomain, Utf8Str aName); 48 50 void uninit(void); 49 51 HRESULT FinalConstruct(void); … … 91 93 STDMETHOD(FileSetACL)(IN_BSTR aPath, IN_BSTR aACL); 92 94 STDMETHOD(ProcessCreate)(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment), 93 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, IGuestProcess ** IGuestProcess);95 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, IGuestProcess **aProcess); 94 96 STDMETHOD(ProcessCreateEx)(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment), 95 97 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, 96 98 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity), 97 IGuestProcess ** IGuestProcess);98 STDMETHOD(ProcessGet)(ULONG aPID, IGuestProcess ** IGuestProcess);99 IGuestProcess **aProcess); 100 STDMETHOD(ProcessGet)(ULONG aPID, IGuestProcess **aProcess); 99 101 STDMETHOD(SetTimeout)(ULONG aTimeoutMS); 100 102 STDMETHOD(SymlinkCreate)(IN_BSTR aSource, IN_BSTR aTarget, SymlinkType_T aType); … … 108 110 /** @name Public internal methods. 109 111 * @{ */ 112 int directoryClose(ComObjPtr<GuestDirectory> pDirectory); 113 int fileClose(ComObjPtr<GuestFile> pFile); 114 int processClose(ComObjPtr<GuestProcess> pProcess); 115 int processCreateExInteral(const Utf8Str &aCommand, ComSafeArrayIn(Utf8Str, aArguments), ComSafeArrayIn(Utf8Str, aEnvironment), 116 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, 117 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity), 118 IGuestProcess **aProcess); 110 119 /** @} */ 111 120 … … 113 122 114 123 typedef std::map <Utf8Str, Utf8Str> SessionEnvironment; 115 typedef std::list <ComObjPtr<GuestProcess> > SessionProcesses; 124 116 125 typedef std::list <ComObjPtr<GuestDirectory> > SessionDirectories; 117 126 typedef std::list <ComObjPtr<GuestFile> > SessionFiles; 127 typedef std::list <ComObjPtr<GuestProcess> > SessionProcesses; 118 128 119 129 struct Data 120 130 { 121 ComPtr<IGuest> mParent; 131 /** Flag indicating if this is an internal session 132 * or not. Internal session are not accessible by clients. */ 133 bool fInternal; 134 /** Pointer to the parent (IGuest). */ 135 Guest *mParent; 136 /** The session credentials. */ 122 137 Utf8Str mUser; 138 Utf8Str mPassword; 123 139 Utf8Str mDomain; 124 Utf8Str mPassword;140 /** The (optional) session name. */ 125 141 Utf8Str mName; 142 /** The session ID. */ 126 143 ULONG mId; 144 /** The session timeout. Default is 30s. */ 127 145 ULONG mTimeout; 128 146 SessionEnvironment mEnvironment; 129 SessionProcesses mProcesses;130 147 SessionDirectories mDirectories; 131 148 SessionFiles mFiles; 149 SessionProcesses mProcesses; 132 150 } mData; 133 151 }; -
trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
r42084 r42105 2661 2661 } 2662 2662 2663 STDMETHODIMP Guest::OpenSession(IN_BSTR aUser, IN_BSTR aPassword, IN_BSTR aDomain, IN_BSTR aSessionName, IGuestSession **aGuestSession) 2663 // private methods 2664 ///////////////////////////////////////////////////////////////////////////// 2665 2666 int Guest::sessionClose(ComObjPtr<GuestSession> pSession) 2667 { 2668 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2669 2670 for (GuestSessions::iterator itSessions = mData.mGuestSessions.begin(); 2671 itSessions != mData.mGuestSessions.end(); ++itSessions) 2672 { 2673 if (pSession == (*itSessions)) 2674 { 2675 mData.mGuestSessions.remove((*itSessions)); 2676 return VINF_SUCCESS; 2677 } 2678 } 2679 2680 return VERR_NOT_FOUND; 2681 } 2682 2683 // implementation of public methods 2684 ///////////////////////////////////////////////////////////////////////////// 2685 2686 STDMETHODIMP Guest::CreateSession(IN_BSTR aUser, IN_BSTR aPassword, IN_BSTR aDomain, IN_BSTR aSessionName, IGuestSession **aGuestSession) 2664 2687 { 2665 2688 #ifndef VBOX_WITH_GUEST_CONTROL … … 2670 2693 if (RT_UNLIKELY((aUser) == NULL || *(aUser) == '\0')) 2671 2694 return setError(E_INVALIDARG, tr("No user name specified")); 2672 CheckComArgOutPointerValid(a SessionName);2695 CheckComArgOutPointerValid(aGuestSession); 2673 2696 2674 2697 AutoCaller autoCaller(this); … … 2685 2708 if (FAILED(hr)) throw hr; 2686 2709 2687 hr = pGuestSession->init(static_cast<IGuest*>(this),2688 aUser, aPassword, aDomain, aSessionName);2689 if ( FAILED(hr)) throw hr;2710 int rc = pGuestSession->init(this, 2711 aUser, aPassword, aDomain, aSessionName); 2712 if (RT_FAILURE(rc)) throw VBOX_E_IPRT_ERROR; 2690 2713 2691 2714 mData.mGuestSessions.push_back(pGuestSession); -
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r42095 r42105 50 50 ///////////////////////////////////////////////////////////////////////////// 51 51 52 HRESULT GuestProcess::init(void) 52 int GuestProcess::init(GuestSession *pSession, 53 const Utf8Str &aCommand, ComSafeArrayIn(Utf8Str, aArguments), ComSafeArrayIn(Utf8Str, aEnvironment), 54 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, 55 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity)) 53 56 { 54 57 /* Enclose the state transition NotReady->InInit->Ready. */ 55 58 AutoInitSpan autoInitSpan(this); 56 AssertReturn(autoInitSpan.isOk(), E_FAIL); 59 AssertReturn(autoInitSpan.isOk(), VERR_OBJECT_DESTROYED); 60 61 int rc = VINF_SUCCESS; 62 63 mData.mParent = pSession; 57 64 58 65 /* Confirm a successful initialization when it's the case. */ 59 autoInitSpan.setSucceeded(); 66 if (RT_SUCCESS(rc)) 67 autoInitSpan.setSucceeded(); 60 68 61 69 return S_OK; … … 131 139 } 132 140 133 STDMETHODIMP GuestProcess::COMGETTER(P ID)(ULONG *aPID)141 STDMETHODIMP GuestProcess::COMGETTER(Pid)(ULONG *aPID) 134 142 { 135 143 #ifndef VBOX_WITH_GUEST_CONTROL … … 182 190 } 183 191 184 STDMETHODIMP GuestProcess::WaitFor(ComSafeArray Out(ProcessWaitForFlag_T, aFlags), ULONG aTimeoutMS, ProcessWaitReason_T *aReason)192 STDMETHODIMP GuestProcess::WaitFor(ComSafeArrayIn(ProcessWaitForFlag_T, aFlags), ULONG aTimeoutMS, ProcessWaitReason_T *aReason) 185 193 { 186 194 #ifndef VBOX_WITH_GUEST_CONTROL -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r42094 r42105 21 21 * Header Files * 22 22 *******************************************************************************/ 23 #include "GuestImpl.h" 23 24 #include "GuestSessionImpl.h" 24 25 … … 52 53 ///////////////////////////////////////////////////////////////////////////// 53 54 54 HRESULT GuestSession::init(const ComPtr<IGuest> pGuest,55 55 int GuestSession::init(Guest *aGuest, 56 Utf8Str aUser, Utf8Str aPassword, Utf8Str aDomain, Utf8Str aName) 56 57 { 57 58 /* Enclose the state transition NotReady->InInit->Ready. */ 58 59 AutoInitSpan autoInitSpan(this); 59 AssertReturn(autoInitSpan.isOk(), E_FAIL);60 61 mData.mParent = pGuest;60 AssertReturn(autoInitSpan.isOk(), VERR_OBJECT_DESTROYED); 61 62 mData.mParent = aGuest; 62 63 63 64 mData.mUser = aUser; … … 69 70 autoInitSpan.setSucceeded(); 70 71 71 return S_OK;72 return VINF_SUCCESS; 72 73 } 73 74 … … 86 87 87 88 #ifdef VBOX_WITH_GUEST_CONTROL 88 for (SessionFiles::const_iterator itFiles = mData.mFiles.begin(); 89 for (SessionDirectories::iterator itDirs = mData.mDirectories.begin(); 90 itDirs != mData.mDirectories.end(); ++itDirs) 91 { 92 (*itDirs)->uninit(); 93 (*itDirs).setNull(); 94 } 95 mData.mDirectories.clear(); 96 97 for (SessionFiles::iterator itFiles = mData.mFiles.begin(); 89 98 itFiles != mData.mFiles.end(); ++itFiles) 90 99 { 91 /** @todo */ 92 } 93 94 for (SessionDirectories::const_iterator itDirs = mData.mDirectories.begin(); 95 itDirs != mData.mDirectories.end(); ++itDirs) 96 { 97 /** @todo */ 98 } 99 100 for (SessionProcesses::const_iterator itProcs = mData.mProcesses.begin(); 100 (*itFiles)->uninit(); 101 (*itFiles).setNull(); 102 } 103 mData.mFiles.clear(); 104 105 for (SessionProcesses::iterator itProcs = mData.mProcesses.begin(); 101 106 itProcs != mData.mProcesses.end(); ++itProcs) 102 107 { 103 /** @todo */ 104 } 108 (*itProcs)->uninit(); 109 (*itProcs).setNull(); 110 } 111 mData.mProcesses.clear(); 112 113 mData.mParent->sessionClose(this); 105 114 #endif 106 115 } … … 283 292 } 284 293 294 // private methods 295 ///////////////////////////////////////////////////////////////////////////// 296 297 int GuestSession::directoryClose(ComObjPtr<GuestDirectory> pDirectory) 298 { 299 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 300 301 for (SessionDirectories::iterator itDirs = mData.mDirectories.begin(); 302 itDirs != mData.mDirectories.end(); ++itDirs) 303 { 304 if (pDirectory == (*itDirs)) 305 { 306 mData.mDirectories.remove((*itDirs)); 307 return VINF_SUCCESS; 308 } 309 } 310 311 return VERR_NOT_FOUND; 312 } 313 314 int GuestSession::fileClose(ComObjPtr<GuestFile> pFile) 315 { 316 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 317 318 for (SessionFiles::iterator itFiles = mData.mFiles.begin(); 319 itFiles != mData.mFiles.end(); ++itFiles) 320 { 321 if (pFile == (*itFiles)) 322 { 323 mData.mFiles.remove((*itFiles)); 324 return VINF_SUCCESS; 325 } 326 } 327 328 return VERR_NOT_FOUND; 329 } 330 331 int GuestSession::processClose(ComObjPtr<GuestProcess> pProcess) 332 { 333 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 334 335 for (SessionProcesses::iterator itProcs = mData.mProcesses.begin(); 336 itProcs != mData.mProcesses.end(); ++itProcs) 337 { 338 if (pProcess == (*itProcs)) 339 { 340 mData.mProcesses.remove((*itProcs)); 341 return VINF_SUCCESS; 342 } 343 } 344 345 return VERR_NOT_FOUND; 346 } 347 348 int GuestSession::processCreateExInteral(const Utf8Str &aCommand, ComSafeArrayIn(Utf8Str, aArguments), ComSafeArrayIn(Utf8Str, aEnvironment), 349 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, 350 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity), 351 IGuestProcess **aProcess) 352 { 353 AssertPtrReturn(aProcess, VERR_INVALID_POINTER); 354 355 /* Validate flags. */ 356 com::SafeArray<ProcessCreateFlag_T> arrFlags(ComSafeArrayInArg(aFlags)); 357 for (size_t i = 0; i < arrFlags.size(); i++) 358 { 359 if (arrFlags[i] == ExecuteProcessFlag_None) 360 continue; 361 362 if ( !(arrFlags[i] & ExecuteProcessFlag_IgnoreOrphanedProcesses) 363 && !(arrFlags[i] & ExecuteProcessFlag_WaitForProcessStartOnly) 364 && !(arrFlags[i] & ExecuteProcessFlag_Hidden) 365 && !(arrFlags[i] & ExecuteProcessFlag_NoProfile)) 366 { 367 return VERR_INVALID_PARAMETER; 368 } 369 } 370 371 /* Adjust timeout. If set to 0, we define 372 * an infinite timeout. */ 373 if (aTimeoutMS == 0) 374 aTimeoutMS = UINT32_MAX; 375 376 /** @tood Implement process priority + affinity. */ 377 378 int rc; 379 ComObjPtr<GuestProcess> pGuestProcess; 380 try 381 { 382 /* Create the session object. */ 383 HRESULT hr = pGuestProcess.createObject(); 384 if (FAILED(hr)) throw VERR_COM_UNEXPECTED; 385 386 rc = pGuestProcess->init(this, 387 aCommand, aArguments, aEnvironment, 388 aFlags, aTimeoutMS, aPriority, aAffinity); 389 if (RT_FAILURE(rc)) throw rc; 390 391 mData.mProcesses.push_back(pGuestProcess); 392 393 /* Return guest session to the caller. */ 394 hr = pGuestProcess.queryInterfaceTo(aProcess); 395 if (FAILED(hr)) throw VERR_COM_OBJECT_NOT_FOUND; 396 } 397 catch (int rc2) 398 { 399 rc = rc2; 400 } 401 402 return rc; 403 404 #if 0 405 int rc = VINF_SUCCESS; 406 407 char **papszArgv = NULL; 408 try 409 { 410 /* Prepare arguments. */ 411 uint32_t uNumArgs = 0; 412 if (aArguments) 413 { 414 com::SafeArray<IN_BSTR> args(ComSafeArrayInArg(aArguments)); 415 uNumArgs = args.size(); 416 papszArgv = (char**)RTMemAlloc(sizeof(char*) * (uNumArgs + 1)); 417 AssertReturn(papszArgv, VERR_NO_MEMORY); 418 for (unsigned i = 0; RT_SUCCESS(rc) && i < uNumArgs; i++) 419 rc = RTUtf16ToUtf8(args[i], &papszArgv[i]); 420 papszArgv[uNumArgs] = NULL; 421 422 if (RT_FAILURE(rc)) 423 return rc; 424 } 425 426 char *pszArgs = NULL; 427 if (uNumArgs) 428 { 429 rc = RTGetOptArgvToString(&pszArgs, papszArgv, RTGETOPTARGV_CNV_QUOTE_MS_CRT); 430 if (RT_FAILURE(rc)) throw rc; 431 } 432 433 /* Get number of arguments. */ 434 uint32_t cbArgs = pszArgs ? strlen(pszArgs) + 1 : 0; /* Include terminating zero. */ 435 436 /* Prepare environment. */ 437 void *pvEnv = NULL; 438 uint32_t uNumEnv = 0; 439 uint32_t cbEnv = 0; 440 if (aEnvironment) 441 { 442 com::SafeArray<IN_BSTR> env(ComSafeArrayInArg(aEnvironment)); 443 444 for (unsigned i = 0; RT_SUCCESS(rc) && i < env.size(); i++) 445 rc = prepareExecuteEnv(Utf8Str(env[i]).c_str(), &pvEnv, &cbEnv, &uNumEnv); 446 } 447 } 448 catch (int eRc) 449 { 450 451 452 rc = exRc; 453 } 454 455 for (unsigned i = 0; i < uNumArgs; i++) 456 RTMemFree(papszArgv[i]); 457 RTMemFree(papszArgv); 458 #endif 459 460 return rc; 461 } 462 285 463 // implementation of public methods 286 464 ///////////////////////////////////////////////////////////////////////////// … … 291 469 ReturnComNotImplemented(); 292 470 #else 293 AutoCaller autoCaller(this);294 if (FAILED(autoCaller.rc())) return autoCaller.rc();295 296 471 uninit(); 472 473 return S_OK; 297 474 #endif /* VBOX_WITH_GUEST_CONTROL */ 298 475 } … … 575 752 576 753 STDMETHODIMP GuestSession::ProcessCreate(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment), 577 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, IGuestProcess **IGuestProcess) 578 { 579 #ifndef VBOX_WITH_GUEST_CONTROL 580 ReturnComNotImplemented(); 581 #else 582 AutoCaller autoCaller(this); 583 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 584 585 ReturnComNotImplemented(); 754 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, IGuestProcess **aProcess) 755 { 756 #ifndef VBOX_WITH_GUEST_CONTROL 757 ReturnComNotImplemented(); 758 #else 759 AutoCaller autoCaller(this); 760 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 761 762 CheckComArgOutPointerValid(aProcess); 763 764 com::SafeArray<LONG> aAffinity; /** @todo Process affinity, not used yet. */ 765 766 int rc = processCreateExInteral(aCommand, aArguments, aEnvironment, aFlags, aTimeoutMS, 767 ProcessPriority_Default, ComSafeArrayAsInParam(aAffinity), aProcess); 768 return RT_SUCCESS(rc) ? S_OK : VBOX_E_IPRT_ERROR; 586 769 #endif /* VBOX_WITH_GUEST_CONTROL */ 587 770 } … … 590 773 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, 591 774 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity), 592 IGuestProcess **IGuestProcess) 593 { 594 #ifndef VBOX_WITH_GUEST_CONTROL 595 ReturnComNotImplemented(); 596 #else 597 AutoCaller autoCaller(this); 598 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 599 600 ReturnComNotImplemented(); 601 #endif /* VBOX_WITH_GUEST_CONTROL */ 602 } 603 604 STDMETHODIMP GuestSession::ProcessGet(ULONG aPID, IGuestProcess **IGuestProcess) 775 IGuestProcess **aProcess) 776 { 777 #ifndef VBOX_WITH_GUEST_CONTROL 778 ReturnComNotImplemented(); 779 #else 780 AutoCaller autoCaller(this); 781 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 782 783 CheckComArgOutPointerValid(aProcess); 784 785 int rc = processCreateExInteral(aCommand, aArguments, aEnvironment, aFlags, aTimeoutMS, 786 aPriority, aAffinity, aProcess); 787 return RT_SUCCESS(rc) ? S_OK : VBOX_E_IPRT_ERROR; 788 #endif /* VBOX_WITH_GUEST_CONTROL */ 789 } 790 791 STDMETHODIMP GuestSession::ProcessGet(ULONG aPID, IGuestProcess **aProcess) 605 792 { 606 793 #ifndef VBOX_WITH_GUEST_CONTROL
Note:
See TracChangeset
for help on using the changeset viewer.