Changeset 50709 in vbox
- Timestamp:
- Mar 5, 2014 6:29:52 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92670
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestProcessImpl.h
r50618 r50709 20 20 #define ____H_GUESTPROCESSIMPL 21 21 22 #include "VirtualBoxBase.h"23 22 #include "GuestCtrlImplPrivate.h" 23 #include "GuestProcessWrap.h" 24 24 25 25 class Console; … … 30 30 */ 31 31 class ATL_NO_VTABLE GuestProcess : 32 public VirtualBoxBase, 33 public GuestObject, 34 VBOX_SCRIPTABLE_IMPL(IGuestProcess) 32 public GuestProcessWrap, 33 public GuestObject 35 34 { 36 35 public: 37 36 /** @name COM and internal init/term/mapping cruft. 38 37 * @{ */ 39 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(GuestProcess, IGuestProcess)40 DECLARE_NOT_AGGREGATABLE(GuestProcess)41 DECLARE_PROTECT_FINAL_CONSTRUCT()42 BEGIN_COM_MAP(GuestProcess)43 VBOX_DEFAULT_INTERFACE_ENTRIES(IGuestProcess)44 COM_INTERFACE_ENTRY(IProcess)45 END_COM_MAP()46 38 DECLARE_EMPTY_CTOR_DTOR(GuestProcess) 47 39 … … 52 44 /** @} */ 53 45 54 /** @name IProcess interface.55 * @{ */56 STDMETHOD(COMGETTER(Arguments))(ComSafeArrayOut(BSTR, aArguments));57 STDMETHOD(COMGETTER(Environment))(ComSafeArrayOut(BSTR, aEnvironment));58 STDMETHOD(COMGETTER(EventSource))(IEventSource ** aEventSource);59 STDMETHOD(COMGETTER(ExecutablePath))(BSTR *aExecutablePath);60 STDMETHOD(COMGETTER(ExitCode))(LONG *aExitCode);61 STDMETHOD(COMGETTER(Name))(BSTR *aName);62 STDMETHOD(COMGETTER(PID))(ULONG *aPID);63 STDMETHOD(COMGETTER(Status))(ProcessStatus_T *aStatus);64 65 STDMETHOD(Read)(ULONG aHandle, ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData));66 STDMETHOD(Terminate)(void);67 STDMETHOD(WaitFor)(ULONG aWaitFlags, ULONG aTimeoutMS, ProcessWaitResult_T *aReason);68 STDMETHOD(WaitForArray)(ComSafeArrayIn(ProcessWaitForFlag_T, aFlags), ULONG aTimeoutMS, ProcessWaitResult_T *aReason);69 STDMETHOD(Write)(ULONG aHandle, ULONG aFlags, ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten);70 STDMETHOD(WriteArray)(ULONG aHandle, ComSafeArrayIn(ProcessInputFlag_T, aFlags), ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten);71 /** @} */72 46 73 47 public: … … 75 49 * @{ */ 76 50 int i_callbackDispatcher(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb); 77 inline int checkPID(uint32_t uPID);78 static Utf8Str guestErrorToString(int guestRc);51 inline int i_checkPID(uint32_t uPID); 52 static Utf8Str i_guestErrorToString(int guestRc); 79 53 int i_onRemove(void); 80 int readData(uint32_t uHandle, uint32_t uSize, uint32_t uTimeoutMS, void *pvData, size_t cbData, uint32_t *pcbRead, int *pGuestRc);81 static HRESULT setErrorExternal(VirtualBoxBase *pInterface, int guestRc);82 int startProcess(uint32_t uTimeoutMS, int *pGuestRc);83 int startProcessAsync(void);84 int terminateProcess(uint32_t uTimeoutMS, int *pGuestRc);85 static ProcessWaitResult_T waitFlagsToResultEx(uint32_t fWaitFlags, ProcessStatus_T oldStatus, ProcessStatus_T newStatus, uint32_t uProcFlags, uint32_t uProtocol);86 ProcessWaitResult_T waitFlagsToResult(uint32_t fWaitFlags);87 int waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS, ProcessWaitResult_T &waitResult, int *pGuestRc);88 int waitForInputNotify(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS, ProcessInputStatus_T *pInputStatus, uint32_t *pcbProcessed);89 int waitForOutput(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS, void* pvData, size_t cbData, uint32_t *pcbRead);90 int waitForStatusChange(GuestWaitEvent *pEvent, uint32_t uTimeoutMS, ProcessStatus_T *pProcessStatus, int *pGuestRc);91 static bool waitResultImpliesEx(ProcessWaitResult_T waitResult, ProcessStatus_T procStatus, uint32_t uProcFlags, uint32_t uProtocol);92 int writeData(uint32_t uHandle, uint32_t uFlags, void *pvData, size_t cbData, uint32_t uTimeoutMS, uint32_t *puWritten, int *pGuestRc);54 int i_readData(uint32_t uHandle, uint32_t uSize, uint32_t uTimeoutMS, void *pvData, size_t cbData, uint32_t *pcbRead, int *pGuestRc); 55 static HRESULT i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc); 56 int i_startProcess(uint32_t uTimeoutMS, int *pGuestRc); 57 int i_startProcessAsync(void); 58 int i_terminateProcess(uint32_t uTimeoutMS, int *pGuestRc); 59 static ProcessWaitResult_T i_waitFlagsToResultEx(uint32_t fWaitFlags, ProcessStatus_T oldStatus, ProcessStatus_T newStatus, uint32_t uProcFlags, uint32_t uProtocol); 60 ProcessWaitResult_T i_waitFlagsToResult(uint32_t fWaitFlags); 61 int i_waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS, ProcessWaitResult_T &waitResult, int *pGuestRc); 62 int i_waitForInputNotify(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS, ProcessInputStatus_T *pInputStatus, uint32_t *pcbProcessed); 63 int i_waitForOutput(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS, void* pvData, size_t cbData, uint32_t *pcbRead); 64 int i_waitForStatusChange(GuestWaitEvent *pEvent, uint32_t uTimeoutMS, ProcessStatus_T *pProcessStatus, int *pGuestRc); 65 static bool i_waitResultImpliesEx(ProcessWaitResult_T waitResult, ProcessStatus_T procStatus, uint32_t uProcFlags, uint32_t uProtocol); 66 int i_writeData(uint32_t uHandle, uint32_t uFlags, void *pvData, size_t cbData, uint32_t uTimeoutMS, uint32_t *puWritten, int *pGuestRc); 93 67 /** @} */ 94 68 … … 96 70 /** @name Protected internal methods. 97 71 * @{ */ 98 inline bool i sAlive(void);99 inline bool hasEnded(void);100 int onGuestDisconnected(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);101 int onProcessInputStatus(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);102 int onProcessNotifyIO(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);103 int onProcessStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);104 int onProcessOutput(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);105 int prepareExecuteEnv(const char *pszEnv, void **ppvList, ULONG *pcbList, ULONG *pcEnvVars);106 int setProcessStatus(ProcessStatus_T procStatus, int procRc);107 static DECLCALLBACK(int) startProcessThread(RTTHREAD Thread, void *pvUser);72 inline bool i_isAlive(void); 73 inline bool i_hasEnded(void); 74 int i_onGuestDisconnected(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData); 75 int i_onProcessInputStatus(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData); 76 int i_onProcessNotifyIO(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData); 77 int i_onProcessStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData); 78 int i_onProcessOutput(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData); 79 int i_prepareExecuteEnv(const char *pszEnv, void **ppvList, ULONG *pcbList, ULONG *pcEnvVars); 80 int i_setProcessStatus(ProcessStatus_T procStatus, int procRc); 81 static DECLCALLBACK(int) i_startProcessThread(RTTHREAD Thread, void *pvUser); 108 82 /** @} */ 109 83 110 84 private: 85 /** Wrapped @name IProcess data . 86 * @{ */ 87 HRESULT getArguments(std::vector<com::Utf8Str> &aArguments); 88 HRESULT getEnvironment(std::vector<com::Utf8Str> &aEnvironment); 89 HRESULT getEventSource(ComPtr<IEventSource> &aEventSource); 90 HRESULT getExecutablePath(com::Utf8Str &aExecutablePath); 91 HRESULT getExitCode(LONG *aExitCode); 92 HRESULT getName(com::Utf8Str &aName); 93 HRESULT getPID(ULONG *aPID); 94 HRESULT getStatus(ProcessStatus_T *aStatus); 95 96 /** Wrapped @name IProcess methods. 97 * @{ */ 98 HRESULT waitFor(ULONG aWaitFor, 99 ULONG aTimeoutMS, 100 ProcessWaitResult_T *aReason); 101 HRESULT waitForArray(const std::vector<ProcessWaitForFlag_T> &aWaitFor, 102 ULONG aTimeoutMS, 103 ProcessWaitResult_T *aReason); 104 HRESULT read(ULONG aHandle, 105 ULONG aToRead, 106 ULONG aTimeoutMS, 107 std::vector<BYTE> &aData); 108 HRESULT write(ULONG aHandle, 109 ULONG aFlags, 110 const std::vector<BYTE> &aData, 111 ULONG aTimeoutMS, 112 ULONG *aWritten); 113 HRESULT writeArray(ULONG aHandle, 114 const std::vector<ProcessInputFlag_T> &aFlags, 115 const std::vector<BYTE> &aData, 116 ULONG aTimeoutMS, 117 ULONG *aWritten); 118 HRESULT terminate(); 111 119 112 120 /** … … 160 168 int Init(GuestSession *pGuestSession, const GuestProcessStartupInfo &startupInfo, bool fAsync, int *pGuestRc); 161 169 162 GuestProcessStream & GetStdOut(void) { return mStdOut; }163 164 GuestProcessStream & GetStdErr(void) { return mStdErr; }165 166 int Wait(uint32_t fFlags, int *pGuestRc);167 168 int WaitEx(uint32_t fFlags, GuestProcessStreamBlock *pStreamBlock, int *pGuestRc);169 170 int GetCurrentBlock(uint32_t uHandle, GuestProcessStreamBlock &strmBlock);171 172 bool IsRunning(void);173 174 static int Run(GuestSession *pGuestSession, const GuestProcessStartupInfo &startupInfo, int *pGuestRc);175 176 static int RunEx(GuestSession *pGuestSession, const GuestProcessStartupInfo &startupInfo, GuestCtrlStreamObjects *pStrmOutObjects,177 uint32_t cStrmOutObjects, int *pGuestRc);178 179 int TerminatedOk(LONG *pExitCode);180 181 int Terminate(uint32_t uTimeoutMS, int *pGuestRc);170 GuestProcessStream &i_getStdOut(void) { return mStdOut; } 171 172 GuestProcessStream &i_getStdErr(void) { return mStdErr; } 173 174 int i_wait(uint32_t fFlags, int *pGuestRc); 175 176 int i_waitEx(uint32_t fFlags, GuestProcessStreamBlock *pStreamBlock, int *pGuestRc); 177 178 int i_getCurrentBlock(uint32_t uHandle, GuestProcessStreamBlock &strmBlock); 179 180 bool i_isRunning(void); 181 182 static int i_run(GuestSession *pGuestSession, const GuestProcessStartupInfo &startupInfo, int *pGuestRc); 183 184 static int i_runEx(GuestSession *pGuestSession, const GuestProcessStartupInfo &startupInfo, GuestCtrlStreamObjects *pStrmOutObjects, 185 uint32_t cStrmOutObjects, int *pGuestRc); 186 187 int i_terminatedOk(LONG *pExitCode); 188 189 int i_terminate(uint32_t uTimeoutMS, int *pGuestRc); 182 190 183 191 protected: -
trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp
r50618 r50709 276 276 277 277 int guestRc; 278 int rc = mData.mProcessTool. Terminate(30 * 1000, &guestRc);278 int rc = mData.mProcessTool.i_terminate(30 * 1000, &guestRc); 279 279 if (RT_FAILURE(rc)) 280 280 { … … 282 282 { 283 283 case VERR_GSTCTL_GUEST_ERROR: 284 hr = GuestProcess:: setErrorExternal(this, guestRc);284 hr = GuestProcess::i_setErrorExternal(this, guestRc); 285 285 break; 286 286 … … 321 321 int guestRc; 322 322 323 int rc = mData.mProcessTool. WaitEx(GUESTPROCESSTOOL_FLAG_STDOUT_BLOCK,324 &curBlock, &guestRc);323 int rc = mData.mProcessTool.i_waitEx(GUESTPROCESSTOOL_FLAG_STDOUT_BLOCK, 324 &curBlock, &guestRc); 325 325 326 326 /* … … 329 329 */ 330 330 if ( RT_SUCCESS(rc) 331 && !mData.mProcessTool. IsRunning())332 { 333 rc = mData.mProcessTool. TerminatedOk(NULL /* Exit code */);331 && !mData.mProcessTool.i_isRunning()) 332 { 333 rc = mData.mProcessTool.i_terminatedOk(NULL /* Exit code */); 334 334 if (rc == VERR_NOT_EQUAL) 335 335 rc = VERR_ACCESS_DENIED; … … 379 379 { 380 380 case VERR_GSTCTL_GUEST_ERROR: 381 hr = GuestProcess:: setErrorExternal(this, guestRc);381 hr = GuestProcess::i_setErrorExternal(this, guestRc); 382 382 break; 383 383 -
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r50618 r50709 65 65 virtual ~GuestProcessTask(void) { } 66 66 67 int rc(void) const { return mRC; }68 bool i sOk(void) const { return RT_SUCCESS(mRC); }69 const ComObjPtr<GuestProcess> & Process(void) const { return mProcess; }67 int i_rc(void) const { return mRC; } 68 bool i_isOk(void) const { return RT_SUCCESS(mRC); } 69 const ComObjPtr<GuestProcess> &i_process(void) const { return mProcess; } 70 70 71 71 protected: … … 271 271 /* Terminate process if not already done yet. */ 272 272 int guestRc = VINF_SUCCESS; 273 int vrc = terminateProcess(30 * 1000, &guestRc); /** @todo Make timeouts configurable. */273 int vrc = i_terminateProcess(30 * 1000, &guestRc); /** @todo Make timeouts configurable. */ 274 274 /* Note: Don't return here yet; first uninit all other stuff in 275 275 * case of failure. */ … … 284 284 // implementation of public getters/setters for attributes 285 285 ///////////////////////////////////////////////////////////////////////////// 286 287 STDMETHODIMP GuestProcess::COMGETTER(Arguments)(ComSafeArrayOut(BSTR, aArguments)) 286 HRESULT GuestProcess::getArguments(std::vector<com::Utf8Str> &aArguments) 288 287 { 289 288 #ifndef VBOX_WITH_GUEST_CONTROL … … 291 290 #else 292 291 LogFlowThisFuncEnter(); 293 294 CheckComArgOutSafeArrayPointerValid(aArguments);295 296 AutoCaller autoCaller(this);297 if (FAILED(autoCaller.rc())) return autoCaller.rc();298 292 299 293 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); … … 304 298 it != mData.mProcess.mArguments.end(); 305 299 it++, s++) 306 { 307 Bstr tmp = *it; 308 tmp.cloneTo(&collection[s]); 309 } 310 311 collection.detachTo(ComSafeArrayOutArg(aArguments)); 300 aArguments[s] = (*it); 312 301 313 302 return S_OK; … … 315 304 } 316 305 317 STDMETHODIMP GuestProcess::COMGETTER(Environment)(ComSafeArrayOut(BSTR, aEnvironment))306 HRESULT GuestProcess::getEnvironment(std::vector<com::Utf8Str> &aEnvironment) 318 307 { 319 308 #ifndef VBOX_WITH_GUEST_CONTROL … … 322 311 LogFlowThisFuncEnter(); 323 312 324 CheckComArgOutSafeArrayPointerValid(aEnvironment);325 326 AutoCaller autoCaller(this);327 if (FAILED(autoCaller.rc())) return autoCaller.rc();328 329 313 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 330 314 331 315 com::SafeArray<BSTR> arguments(mData.mProcess.mEnvironment.Size()); 332 316 for (size_t i = 0; i < arguments.size(); i++) 333 { 334 Bstr tmp = mData.mProcess.mEnvironment.Get(i); 335 tmp.cloneTo(&arguments[i]); 336 } 337 arguments.detachTo(ComSafeArrayOutArg(aEnvironment)); 317 aEnvironment[i] = mData.mProcess.mEnvironment.Get(i); 338 318 339 319 return S_OK; … … 341 321 } 342 322 343 STDMETHODIMP GuestProcess::COMGETTER(EventSource)(IEventSource **aEventSource)323 HRESULT GuestProcess::getEventSource(ComPtr<IEventSource> &aEventSource) 344 324 { 345 325 #ifndef VBOX_WITH_GUEST_CONTROL … … 348 328 LogFlowThisFuncEnter(); 349 329 350 CheckComArgOutPointerValid(aEventSource);351 352 AutoCaller autoCaller(this);353 if (FAILED(autoCaller.rc())) return autoCaller.rc();354 355 330 // no need to lock - lifetime constant 356 mEventSource.queryInterfaceTo(aEventSource );331 mEventSource.queryInterfaceTo(aEventSource.asOutParam()); 357 332 358 333 LogFlowThisFuncLeave(); … … 361 336 } 362 337 363 STDMETHODIMP GuestProcess::COMGETTER(ExecutablePath)(BSTR *aExecutablePath)338 HRESULT GuestProcess::getExecutablePath(com::Utf8Str &aExecutablePath) 364 339 { 365 340 #ifndef VBOX_WITH_GUEST_CONTROL … … 368 343 LogFlowThisFuncEnter(); 369 344 370 CheckComArgOutPointerValid(aExecutablePath);371 372 AutoCaller autoCaller(this);373 if (FAILED(autoCaller.rc())) return autoCaller.rc();374 375 345 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 376 346 377 mData.mProcess.mCommand.cloneTo(aExecutablePath);347 aExecutablePath = mData.mProcess.mCommand; 378 348 379 349 return S_OK; … … 381 351 } 382 352 383 STDMETHODIMP GuestProcess::COMGETTER(ExitCode)(LONG *aExitCode)353 HRESULT GuestProcess::getExitCode(LONG *aExitCode) 384 354 { 385 355 #ifndef VBOX_WITH_GUEST_CONTROL … … 388 358 LogFlowThisFuncEnter(); 389 359 390 CheckComArgOutPointerValid(aExitCode);391 392 AutoCaller autoCaller(this);393 if (FAILED(autoCaller.rc())) return autoCaller.rc();394 395 360 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 396 361 … … 401 366 } 402 367 403 STDMETHODIMP GuestProcess::COMGETTER(Name)(BSTR *aName)368 HRESULT GuestProcess::getName(com::Utf8Str &aName) 404 369 { 405 370 #ifndef VBOX_WITH_GUEST_CONTROL … … 408 373 LogFlowThisFuncEnter(); 409 374 410 CheckComArgOutPointerValid(aName);411 412 AutoCaller autoCaller(this);413 if (FAILED(autoCaller.rc())) return autoCaller.rc();414 415 375 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 416 376 417 mData.mProcess.mName.cloneTo(aName);377 aName = mData.mProcess.mName; 418 378 419 379 return S_OK; … … 421 381 } 422 382 423 STDMETHODIMP GuestProcess::COMGETTER(PID)(ULONG *aPID)383 HRESULT GuestProcess::getPID(ULONG *aPID) 424 384 { 425 385 #ifndef VBOX_WITH_GUEST_CONTROL … … 428 388 LogFlowThisFuncEnter(); 429 389 430 CheckComArgOutPointerValid(aPID);431 432 AutoCaller autoCaller(this);433 if (FAILED(autoCaller.rc())) return autoCaller.rc();434 435 390 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 436 391 … … 441 396 } 442 397 443 STDMETHODIMP GuestProcess::COMGETTER(Status)(ProcessStatus_T *aStatus)398 HRESULT GuestProcess::getStatus(ProcessStatus_T *aStatus) 444 399 { 445 400 #ifndef VBOX_WITH_GUEST_CONTROL … … 447 402 #else 448 403 LogFlowThisFuncEnter(); 449 450 AutoCaller autoCaller(this);451 if (FAILED(autoCaller.rc())) return autoCaller.rc();452 404 453 405 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); … … 476 428 case GUEST_DISCONNECTED: 477 429 { 478 vrc = onGuestDisconnected(pCbCtx, pSvcCb);430 vrc = i_onGuestDisconnected(pCbCtx, pSvcCb); 479 431 break; 480 432 } … … 482 434 case GUEST_EXEC_STATUS: 483 435 { 484 vrc = onProcessStatusChange(pCbCtx, pSvcCb);436 vrc = i_onProcessStatusChange(pCbCtx, pSvcCb); 485 437 break; 486 438 } … … 488 440 case GUEST_EXEC_OUTPUT: 489 441 { 490 vrc = onProcessOutput(pCbCtx, pSvcCb);442 vrc = i_onProcessOutput(pCbCtx, pSvcCb); 491 443 break; 492 444 } … … 494 446 case GUEST_EXEC_INPUT_STATUS: 495 447 { 496 vrc = onProcessInputStatus(pCbCtx, pSvcCb);448 vrc = i_onProcessInputStatus(pCbCtx, pSvcCb); 497 449 break; 498 450 } … … 526 478 * @param uPID PID to check. 527 479 */ 528 inline int GuestProcess:: checkPID(uint32_t uPID)480 inline int GuestProcess::i_checkPID(uint32_t uPID) 529 481 { 530 482 int rc = VINF_SUCCESS; … … 545 497 546 498 /* static */ 547 Utf8Str GuestProcess:: guestErrorToString(int guestRc)499 Utf8Str GuestProcess::i_guestErrorToString(int guestRc) 548 500 { 549 501 Utf8Str strError; … … 612 564 } 613 565 614 inline bool GuestProcess::i sAlive(void)566 inline bool GuestProcess::i_isAlive(void) 615 567 { 616 568 return ( mData.mStatus == ProcessStatus_Started … … 619 571 } 620 572 621 inline bool GuestProcess:: hasEnded(void)573 inline bool GuestProcess::i_hasEnded(void) 622 574 { 623 575 return ( mData.mStatus == ProcessStatus_TerminatedNormally … … 630 582 } 631 583 632 int GuestProcess:: onGuestDisconnected(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData)584 int GuestProcess::i_onGuestDisconnected(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData) 633 585 { 634 586 AssertPtrReturn(pCbCtx, VERR_INVALID_POINTER); 635 587 AssertPtrReturn(pSvcCbData, VERR_INVALID_POINTER); 636 588 637 int vrc = setProcessStatus(ProcessStatus_Down, VINF_SUCCESS);589 int vrc = i_setProcessStatus(ProcessStatus_Down, VINF_SUCCESS); 638 590 639 591 LogFlowFuncLeaveRC(vrc); … … 641 593 } 642 594 643 int GuestProcess:: onProcessInputStatus(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData)595 int GuestProcess::i_onProcessInputStatus(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData) 644 596 { 645 597 AssertPtrReturn(pCbCtx, VERR_INVALID_POINTER); … … 664 616 dataCb.uPID, dataCb.uStatus, dataCb.uFlags, dataCb.uProcessed)); 665 617 666 vrc = checkPID(dataCb.uPID);618 vrc = i_checkPID(dataCb.uPID); 667 619 if (RT_SUCCESS(vrc)) 668 620 { … … 708 660 } 709 661 710 int GuestProcess:: onProcessNotifyIO(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData)662 int GuestProcess::i_onProcessNotifyIO(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData) 711 663 { 712 664 AssertPtrReturn(pCbCtx, VERR_INVALID_POINTER); … … 716 668 } 717 669 718 int GuestProcess:: onProcessStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData)670 int GuestProcess::i_onProcessStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData) 719 671 { 720 672 AssertPtrReturn(pCbCtx, VERR_INVALID_POINTER); … … 738 690 dataCb.uPID, dataCb.uStatus, dataCb.uFlags)); 739 691 740 vrc = checkPID(dataCb.uPID);692 vrc = i_checkPID(dataCb.uPID); 741 693 if (RT_SUCCESS(vrc)) 742 694 { … … 817 769 818 770 /* Set the process status. */ 819 int rc2 = setProcessStatus(procStatus, procRc);771 int rc2 = i_setProcessStatus(procStatus, procRc); 820 772 if (RT_SUCCESS(vrc)) 821 773 vrc = rc2; … … 826 778 } 827 779 828 int GuestProcess:: onProcessOutput(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData)780 int GuestProcess::i_onProcessOutput(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData) 829 781 { 830 782 AssertPtrReturn(pSvcCbData, VERR_INVALID_POINTER); … … 847 799 dataCb.uPID, dataCb.uHandle, dataCb.uFlags, dataCb.pvData, dataCb.cbData)); 848 800 849 vrc = checkPID(dataCb.uPID);801 vrc = i_checkPID(dataCb.uPID); 850 802 if (RT_SUCCESS(vrc)) 851 803 { … … 890 842 } 891 843 892 int GuestProcess:: readData(uint32_t uHandle, uint32_t uSize, uint32_t uTimeoutMS,893 void *pvData, size_t cbData, uint32_t *pcbRead, int *pGuestRc)844 int GuestProcess::i_readData(uint32_t uHandle, uint32_t uSize, uint32_t uTimeoutMS, 845 void *pvData, size_t cbData, uint32_t *pcbRead, int *pGuestRc) 894 846 { 895 847 LogFlowThisFunc(("uPID=%RU32, uHandle=%RU32, uSize=%RU32, uTimeoutMS=%RU32, pvData=%p, cbData=%RU32, pGuestRc=%p\n", … … 961 913 962 914 if (RT_SUCCESS(vrc)) 963 vrc = waitForOutput(pEvent, uHandle, uTimeoutMS,964 pvData, cbData, pcbRead);915 vrc = i_waitForOutput(pEvent, uHandle, uTimeoutMS, 916 pvData, cbData, pcbRead); 965 917 966 918 unregisterWaitEvent(pEvent); … … 971 923 972 924 /* Does not do locking; caller is responsible for that! */ 973 int GuestProcess:: setProcessStatus(ProcessStatus_T procStatus, int procRc)925 int GuestProcess::i_setProcessStatus(ProcessStatus_T procStatus, int procRc) 974 926 { 975 927 LogFlowThisFuncEnter(); … … 1004 956 hr = errorInfo->initEx(VBOX_E_IPRT_ERROR, mData.mLastError, 1005 957 COM_IIDOF(IGuestProcess), getComponentName(), 1006 guestErrorToString(mData.mLastError));958 i_guestErrorToString(mData.mLastError)); 1007 959 ComAssertComRC(hr); 1008 960 } … … 1036 988 1037 989 /* static */ 1038 HRESULT GuestProcess:: setErrorExternal(VirtualBoxBase *pInterface, int guestRc)990 HRESULT GuestProcess::i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc) 1039 991 { 1040 992 AssertPtr(pInterface); 1041 993 AssertMsg(RT_FAILURE(guestRc), ("Guest rc does not indicate a failure when setting error\n")); 1042 994 1043 return pInterface->setError(VBOX_E_IPRT_ERROR, GuestProcess:: guestErrorToString(guestRc).c_str());1044 } 1045 1046 int GuestProcess:: startProcess(uint32_t uTimeoutMS, int *pGuestRc)995 return pInterface->setError(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(guestRc).c_str()); 996 } 997 998 int GuestProcess::i_startProcess(uint32_t uTimeoutMS, int *pGuestRc) 1047 999 { 1048 1000 LogFlowThisFunc(("uTimeoutMS=%RU32, procCmd=%s, procTimeoutMS=%RU32, procFlags=%x, sessionID=%RU32\n", … … 1172 1124 if (RT_FAILURE(vrc)) 1173 1125 { 1174 int rc2 = setProcessStatus(ProcessStatus_Error, vrc);1126 int rc2 = i_setProcessStatus(ProcessStatus_Error, vrc); 1175 1127 AssertRC(rc2); 1176 1128 } … … 1182 1134 1183 1135 if (RT_SUCCESS(vrc)) 1184 vrc = waitForStatusChange(pEvent, uTimeoutMS,1185 NULL /* Process status */, pGuestRc);1136 vrc = i_waitForStatusChange(pEvent, uTimeoutMS, 1137 NULL /* Process status */, pGuestRc); 1186 1138 unregisterWaitEvent(pEvent); 1187 1139 … … 1190 1142 } 1191 1143 1192 int GuestProcess:: startProcessAsync(void)1144 int GuestProcess::i_startProcessAsync(void) 1193 1145 { 1194 1146 LogFlowThisFuncEnter(); … … 1201 1153 * worker thread. */ 1202 1154 std::auto_ptr<GuestProcessStartTask> pTask(new GuestProcessStartTask(this)); 1203 AssertReturn(pTask->i sOk(), pTask->rc());1204 1205 vrc = RTThreadCreate(NULL, GuestProcess:: startProcessThread,1155 AssertReturn(pTask->i_isOk(), pTask->i_rc()); 1156 1157 vrc = RTThreadCreate(NULL, GuestProcess::i_startProcessThread, 1206 1158 (void *)pTask.get(), 0, 1207 1159 RTTHREADTYPE_MAIN_WORKER, 0, … … 1223 1175 1224 1176 /* static */ 1225 DECLCALLBACK(int) GuestProcess:: startProcessThread(RTTHREAD Thread, void *pvUser)1177 DECLCALLBACK(int) GuestProcess::i_startProcessThread(RTTHREAD Thread, void *pvUser) 1226 1178 { 1227 1179 LogFlowFunc(("pvUser=%p\n", pvUser)); … … 1230 1182 AssertPtr(pTask.get()); 1231 1183 1232 const ComObjPtr<GuestProcess> pProcess(pTask-> Process());1184 const ComObjPtr<GuestProcess> pProcess(pTask->i_process()); 1233 1185 Assert(!pProcess.isNull()); 1234 1186 … … 1236 1188 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1237 1189 1238 int vrc = pProcess-> startProcess(30 * 1000 /* 30s timeout */,1239 NULL /* Guest rc, ignored */);1190 int vrc = pProcess->i_startProcess(30 * 1000 /* 30s timeout */, 1191 NULL /* Guest rc, ignored */); 1240 1192 /* Nothing to do here anymore. */ 1241 1193 … … 1244 1196 } 1245 1197 1246 int GuestProcess:: terminateProcess(uint32_t uTimeoutMS, int *pGuestRc)1198 int GuestProcess::i_terminateProcess(uint32_t uTimeoutMS, int *pGuestRc) 1247 1199 { 1248 1200 /* pGuestRc is optional. */ … … 1293 1245 vrc = sendCommand(HOST_EXEC_TERMINATE, i, paParms); 1294 1246 if (RT_SUCCESS(vrc)) 1295 vrc = waitForStatusChange(pEvent, uTimeoutMS,1296 NULL /* ProcessStatus */, pGuestRc);1247 vrc = i_waitForStatusChange(pEvent, uTimeoutMS, 1248 NULL /* ProcessStatus */, pGuestRc); 1297 1249 unregisterWaitEvent(pEvent); 1298 1250 } … … 1304 1256 1305 1257 /* static */ 1306 ProcessWaitResult_T GuestProcess:: waitFlagsToResultEx(uint32_t fWaitFlags,1307 ProcessStatus_T oldStatus, ProcessStatus_T newStatus,1308 uint32_t uProcFlags, uint32_t uProtocol)1258 ProcessWaitResult_T GuestProcess::i_waitFlagsToResultEx(uint32_t fWaitFlags, 1259 ProcessStatus_T oldStatus, ProcessStatus_T newStatus, 1260 uint32_t uProcFlags, uint32_t uProtocol) 1309 1261 { 1310 1262 ProcessWaitResult_T waitResult = ProcessWaitResult_None; … … 1403 1355 } 1404 1356 1405 ProcessWaitResult_T GuestProcess:: waitFlagsToResult(uint32_t fWaitFlags)1357 ProcessWaitResult_T GuestProcess::i_waitFlagsToResult(uint32_t fWaitFlags) 1406 1358 { 1407 1359 AssertPtr(mSession); 1408 return GuestProcess:: waitFlagsToResultEx(fWaitFlags,1409 mData.mStatus /* curStatus */, mData.mStatus /* newStatus */,1410 mData.mProcess.mFlags, mSession->getProtocolVersion());1411 } 1412 1413 int GuestProcess:: waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS,1414 ProcessWaitResult_T &waitResult, int *pGuestRc)1360 return GuestProcess::i_waitFlagsToResultEx(fWaitFlags, 1361 mData.mStatus /* curStatus */, mData.mStatus /* newStatus */, 1362 mData.mProcess.mFlags, mSession->getProtocolVersion()); 1363 } 1364 1365 int GuestProcess::i_waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS, 1366 ProcessWaitResult_T &waitResult, int *pGuestRc) 1415 1367 { 1416 1368 AssertReturn(fWaitFlags, VERR_INVALID_PARAMETER); … … 1433 1385 } 1434 1386 1435 waitResult = waitFlagsToResult(fWaitFlags);1387 waitResult = i_waitFlagsToResult(fWaitFlags); 1436 1388 1437 1389 /* No waiting needed? Return immediately using the last set error. */ … … 1483 1435 } 1484 1436 1485 vrc = waitForStatusChange(pEvent,1437 vrc = i_waitForStatusChange(pEvent, 1486 1438 uTimeoutMS == RT_INDEFINITE_WAIT 1487 ? RT_INDEFINITE_WAIT : uTimeoutMS - (uint32_t)u64ElapsedMS,1488 &newStatus, pGuestRc);1439 ? RT_INDEFINITE_WAIT : uTimeoutMS - (uint32_t)u64ElapsedMS, 1440 &newStatus, pGuestRc); 1489 1441 if (RT_SUCCESS(vrc)) 1490 1442 { 1491 1443 alock.acquire(); 1492 1444 1493 waitResult = waitFlagsToResultEx(fWaitFlags, curStatus, newStatus,1494 mData.mProcess.mFlags, mSession->getProtocolVersion());1445 waitResult = i_waitFlagsToResultEx(fWaitFlags, curStatus, newStatus, 1446 mData.mProcess.mFlags, mSession->getProtocolVersion()); 1495 1447 #ifdef DEBUG 1496 1448 LogFlowThisFunc(("Got new status change: fWaitFlags=0x%x, newStatus=%RU32, waitResult=%RU32\n", … … 1513 1465 } 1514 1466 1515 int GuestProcess:: waitForInputNotify(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS,1516 ProcessInputStatus_T *pInputStatus, uint32_t *pcbProcessed)1467 int GuestProcess::i_waitForInputNotify(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS, 1468 ProcessInputStatus_T *pInputStatus, uint32_t *pcbProcessed) 1517 1469 { 1518 1470 AssertPtrReturn(pEvent, VERR_INVALID_POINTER); … … 1549 1501 } 1550 1502 1551 int GuestProcess:: waitForOutput(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS,1552 void *pvData, size_t cbData, uint32_t *pcbRead)1503 int GuestProcess::i_waitForOutput(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS, 1504 void *pvData, size_t cbData, uint32_t *pcbRead) 1553 1505 { 1554 1506 AssertPtrReturn(pEvent, VERR_INVALID_POINTER); … … 1631 1583 } 1632 1584 1633 int GuestProcess:: waitForStatusChange(GuestWaitEvent *pEvent, uint32_t uTimeoutMS,1634 ProcessStatus_T *pProcessStatus, int *pGuestRc)1585 int GuestProcess::i_waitForStatusChange(GuestWaitEvent *pEvent, uint32_t uTimeoutMS, 1586 ProcessStatus_T *pProcessStatus, int *pGuestRc) 1635 1587 { 1636 1588 AssertPtrReturn(pEvent, VERR_INVALID_POINTER); … … 1677 1629 1678 1630 /* static */ 1679 bool GuestProcess:: waitResultImpliesEx(ProcessWaitResult_T waitResult,1680 ProcessStatus_T procStatus, uint32_t uProcFlags,1681 uint32_t uProtocol)1631 bool GuestProcess::i_waitResultImpliesEx(ProcessWaitResult_T waitResult, 1632 ProcessStatus_T procStatus, uint32_t uProcFlags, 1633 uint32_t uProtocol) 1682 1634 { 1683 1635 bool fImplies; … … 1707 1659 } 1708 1660 1709 int GuestProcess:: writeData(uint32_t uHandle, uint32_t uFlags,1710 void *pvData, size_t cbData, uint32_t uTimeoutMS, uint32_t *puWritten, int *pGuestRc)1661 int GuestProcess::i_writeData(uint32_t uHandle, uint32_t uFlags, 1662 void *pvData, size_t cbData, uint32_t uTimeoutMS, uint32_t *puWritten, int *pGuestRc) 1711 1663 { 1712 1664 LogFlowThisFunc(("uPID=%RU32, uHandle=%RU32, uFlags=%RU32, pvData=%p, cbData=%RU32, uTimeoutMS=%RU32, puWritten=%p, pGuestRc=%p\n", … … 1767 1719 { 1768 1720 ProcessInputStatus_T inputStatus; 1769 vrc = waitForInputNotify(pEvent, uHandle, uTimeoutMS,1770 &inputStatus, &cbProcessed);1721 vrc = i_waitForInputNotify(pEvent, uHandle, uTimeoutMS, 1722 &inputStatus, &cbProcessed); 1771 1723 if (RT_SUCCESS(vrc)) 1772 1724 { … … 1789 1741 ///////////////////////////////////////////////////////////////////////////// 1790 1742 1791 STDMETHODIMP GuestProcess::Read(ULONG aHandle, ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData))1743 HRESULT GuestProcess::read(ULONG aHandle, ULONG aToRead, ULONG aTimeoutMS, std::vector<BYTE> &aData) 1792 1744 { 1793 1745 #ifndef VBOX_WITH_GUEST_CONTROL … … 1798 1750 if (aToRead == 0) 1799 1751 return setError(E_INVALIDARG, tr("The size to read is zero")); 1800 CheckComArgOutSafeArrayPointerValid(aData);1801 1802 AutoCaller autoCaller(this);1803 if (FAILED(autoCaller.rc())) return autoCaller.rc();1804 1752 1805 1753 com::SafeArray<BYTE> data((size_t)aToRead); … … 1809 1757 1810 1758 uint32_t cbRead; int guestRc; 1811 int vrc = readData(aHandle, aToRead, aTimeoutMS, data.raw(), aToRead, &cbRead, &guestRc);1759 int vrc = i_readData(aHandle, aToRead, aTimeoutMS, data.raw(), aToRead, &cbRead, &guestRc); 1812 1760 if (RT_SUCCESS(vrc)) 1813 1761 { 1814 1762 if (data.size() != cbRead) 1815 1763 data.resize(cbRead); 1816 data.detachTo(ComSafeArrayOutArg(aData)); 1764 for(size_t i = 0; i < data.size(); ++i) 1765 aData[i] = data[i]; 1817 1766 } 1818 1767 else … … 1821 1770 { 1822 1771 case VERR_GSTCTL_GUEST_ERROR: 1823 hr = GuestProcess:: setErrorExternal(this, guestRc);1772 hr = GuestProcess::i_setErrorExternal(this, guestRc); 1824 1773 break; 1825 1774 … … 1839 1788 } 1840 1789 1841 STDMETHODIMP GuestProcess::Terminate(void)1790 HRESULT GuestProcess::terminate() 1842 1791 { 1843 1792 #ifndef VBOX_WITH_GUEST_CONTROL 1844 1793 ReturnComNotImplemented(); 1845 1794 #else 1846 LogFlowThisFuncEnter();1847 1848 AutoCaller autoCaller(this);1849 if (FAILED(autoCaller.rc())) return autoCaller.rc();1850 1795 1851 1796 HRESULT hr = S_OK; 1852 1797 1853 1798 int guestRc; 1854 int vrc = terminateProcess(30 * 1000 /* Timeout in ms */,1855 &guestRc);1799 int vrc = i_terminateProcess(30 * 1000 /* Timeout in ms */, 1800 &guestRc); 1856 1801 if (RT_FAILURE(vrc)) 1857 1802 { … … 1859 1804 { 1860 1805 case VERR_GSTCTL_GUEST_ERROR: 1861 hr = GuestProcess:: setErrorExternal(this, guestRc);1806 hr = GuestProcess::i_setErrorExternal(this, guestRc); 1862 1807 break; 1863 1808 … … 1888 1833 } 1889 1834 1890 STDMETHODIMP GuestProcess::WaitFor(ULONG aWaitFlags, ULONG aTimeoutMS, ProcessWaitResult_T *aReason) 1835 HRESULT GuestProcess::waitFor(ULONG aWaitFor, 1836 ULONG aTimeoutMS, 1837 ProcessWaitResult_T *aReason) 1838 { 1839 #ifndef VBOX_WITH_GUEST_CONTROL 1840 ReturnComNotImplemented(); 1841 #else 1842 1843 /* 1844 * Note: Do not hold any locks here while waiting! 1845 */ 1846 HRESULT hr = S_OK; 1847 1848 int guestRc; ProcessWaitResult_T waitResult; 1849 int vrc = i_waitFor(aWaitFor, aTimeoutMS, waitResult, &guestRc); 1850 if (RT_SUCCESS(vrc)) 1851 { 1852 *aReason = waitResult; 1853 } 1854 else 1855 { 1856 switch (vrc) 1857 { 1858 case VERR_GSTCTL_GUEST_ERROR: 1859 hr = GuestProcess::i_setErrorExternal(this, guestRc); 1860 break; 1861 1862 case VERR_TIMEOUT: 1863 *aReason = ProcessWaitResult_Timeout; 1864 break; 1865 1866 default: 1867 hr = setError(VBOX_E_IPRT_ERROR, 1868 tr("Waiting for process \"%s\" (PID %RU32) failed: %Rrc"), 1869 mData.mProcess.mCommand.c_str(), mData.mPID, vrc); 1870 break; 1871 } 1872 } 1873 1874 LogFlowFuncLeaveRC(vrc); 1875 return hr; 1876 #endif /* VBOX_WITH_GUEST_CONTROL */ 1877 } 1878 1879 HRESULT GuestProcess::waitForArray(const std::vector<ProcessWaitForFlag_T> &aWaitFor, ULONG aTimeoutMS, ProcessWaitResult_T *aReason) 1880 1881 { 1882 #ifndef VBOX_WITH_GUEST_CONTROL 1883 ReturnComNotImplemented(); 1884 #else 1885 /* 1886 * Note: Do not hold any locks here while waiting! 1887 */ 1888 uint32_t fWaitFor = ProcessWaitForFlag_None; 1889 for (size_t i = 0; i < aWaitFor.size(); i++) 1890 fWaitFor |= aWaitFor[i]; 1891 1892 return WaitFor(fWaitFor, aTimeoutMS, aReason); 1893 #endif /* VBOX_WITH_GUEST_CONTROL */ 1894 } 1895 1896 HRESULT GuestProcess::write(ULONG aHandle, ULONG aFlags, const std::vector<BYTE> &aData, 1897 ULONG aTimeoutMS, ULONG *aWritten) 1891 1898 { 1892 1899 #ifndef VBOX_WITH_GUEST_CONTROL … … 1895 1902 LogFlowThisFuncEnter(); 1896 1903 1897 CheckComArgOutPointerValid(aReason);1898 1899 AutoCaller autoCaller(this);1900 if (FAILED(autoCaller.rc())) return autoCaller.rc();1901 1902 /*1903 * Note: Do not hold any locks here while waiting!1904 */1905 1904 HRESULT hr = S_OK; 1906 1907 int guestRc; ProcessWaitResult_T waitResult; 1908 int vrc = waitFor(aWaitFlags, aTimeoutMS, waitResult, &guestRc); 1909 if (RT_SUCCESS(vrc)) 1910 { 1911 *aReason = waitResult; 1912 } 1913 else 1905 com::SafeArray<BYTE> data; 1906 for(size_t i = 0; i < aData.size(); ++i) 1907 data[i] = aData[i]; 1908 uint32_t cbWritten; int guestRc; 1909 int vrc = i_writeData(aHandle, aFlags, data.raw(), data.size(), aTimeoutMS, &cbWritten, &guestRc); 1910 if (RT_FAILURE(vrc)) 1914 1911 { 1915 1912 switch (vrc) 1916 1913 { 1917 1914 case VERR_GSTCTL_GUEST_ERROR: 1918 hr = GuestProcess::setErrorExternal(this, guestRc); 1919 break; 1920 1921 case VERR_TIMEOUT: 1922 *aReason = ProcessWaitResult_Timeout; 1915 hr = GuestProcess::i_setErrorExternal(this, guestRc); 1923 1916 break; 1924 1917 1925 1918 default: 1926 1919 hr = setError(VBOX_E_IPRT_ERROR, 1927 tr("W aiting forprocess \"%s\" (PID %RU32) failed: %Rrc"),1920 tr("Writing to process \"%s\" (PID %RU32) failed: %Rrc"), 1928 1921 mData.mProcess.mCommand.c_str(), mData.mPID, vrc); 1929 1922 break; 1930 1923 } 1931 1924 } 1925 1926 LogFlowThisFunc(("rc=%Rrc, aWritten=%RU32\n", vrc, cbWritten)); 1927 1928 *aWritten = (ULONG)cbWritten; 1932 1929 1933 1930 LogFlowFuncLeaveRC(vrc); … … 1936 1933 } 1937 1934 1938 STDMETHODIMP GuestProcess::WaitForArray(ComSafeArrayIn(ProcessWaitForFlag_T, aFlags), ULONG aTimeoutMS, ProcessWaitResult_T *aReason) 1935 HRESULT GuestProcess::writeArray(ULONG aHandle, const std::vector<ProcessInputFlag_T> &aFlags, 1936 const std::vector<BYTE> &aData, ULONG aTimeoutMS, ULONG *aWritten) 1939 1937 { 1940 1938 #ifndef VBOX_WITH_GUEST_CONTROL … … 1943 1941 LogFlowThisFuncEnter(); 1944 1942 1945 CheckComArgOutPointerValid(aReason);1946 1947 AutoCaller autoCaller(this);1948 if (FAILED(autoCaller.rc())) return autoCaller.rc();1949 1950 /*1951 * Note: Do not hold any locks here while waiting!1952 */1953 uint32_t fWaitFor = ProcessWaitForFlag_None;1954 com::SafeArray<ProcessWaitForFlag_T> flags(ComSafeArrayInArg(aFlags));1955 for (size_t i = 0; i < flags.size(); i++)1956 fWaitFor |= flags[i];1957 1958 return WaitFor(fWaitFor, aTimeoutMS, aReason);1959 #endif /* VBOX_WITH_GUEST_CONTROL */1960 }1961 1962 STDMETHODIMP GuestProcess::Write(ULONG aHandle, ULONG aFlags,1963 ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten)1964 {1965 #ifndef VBOX_WITH_GUEST_CONTROL1966 ReturnComNotImplemented();1967 #else1968 LogFlowThisFuncEnter();1969 1970 CheckComArgSafeArrayNotNull(aData);1971 CheckComArgOutPointerValid(aWritten);1972 1973 AutoCaller autoCaller(this);1974 if (FAILED(autoCaller.rc())) return autoCaller.rc();1975 1976 com::SafeArray<BYTE> data(ComSafeArrayInArg(aData));1977 1978 HRESULT hr = S_OK;1979 1980 uint32_t cbWritten; int guestRc;1981 int vrc = writeData(aHandle, aFlags, data.raw(), data.size(), aTimeoutMS, &cbWritten, &guestRc);1982 if (RT_FAILURE(vrc))1983 {1984 switch (vrc)1985 {1986 case VERR_GSTCTL_GUEST_ERROR:1987 hr = GuestProcess::setErrorExternal(this, guestRc);1988 break;1989 1990 default:1991 hr = setError(VBOX_E_IPRT_ERROR,1992 tr("Writing to process \"%s\" (PID %RU32) failed: %Rrc"),1993 mData.mProcess.mCommand.c_str(), mData.mPID, vrc);1994 break;1995 }1996 }1997 1998 LogFlowThisFunc(("rc=%Rrc, aWritten=%RU32\n", vrc, cbWritten));1999 2000 *aWritten = (ULONG)cbWritten;2001 2002 LogFlowFuncLeaveRC(vrc);2003 return hr;2004 #endif /* VBOX_WITH_GUEST_CONTROL */2005 }2006 2007 STDMETHODIMP GuestProcess::WriteArray(ULONG aHandle, ComSafeArrayIn(ProcessInputFlag_T, aFlags),2008 ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten)2009 {2010 #ifndef VBOX_WITH_GUEST_CONTROL2011 ReturnComNotImplemented();2012 #else2013 LogFlowThisFuncEnter();2014 2015 CheckComArgSafeArrayNotNull(aData);2016 CheckComArgOutPointerValid(aWritten);2017 2018 AutoCaller autoCaller(this);2019 if (FAILED(autoCaller.rc())) return autoCaller.rc();2020 2021 1943 /* 2022 1944 * Note: Do not hold any locks here while writing! 2023 1945 */ 2024 1946 ULONG fWrite = ProcessInputFlag_None; 2025 com::SafeArray<ProcessInputFlag_T> flags(ComSafeArrayInArg(aFlags)); 2026 for (size_t i = 0; i < flags.size(); i++) 2027 fWrite |= flags[i]; 2028 2029 return Write(aHandle, fWrite, ComSafeArrayInArg(aData), aTimeoutMS, aWritten); 1947 for (size_t i = 0; i < aFlags.size(); i++) 1948 fWrite |= aFlags[i]; 1949 1950 return write(aHandle, fWrite, aData, aTimeoutMS, aWritten); 2030 1951 #endif /* VBOX_WITH_GUEST_CONTROL */ 2031 1952 } … … 2041 1962 GuestProcessTool::~GuestProcessTool(void) 2042 1963 { 2043 Terminate(30 * 1000, NULL /* pGuestRc */);1964 i_terminate(30 * 1000, NULL /* pGuestRc */); 2044 1965 } 2045 1966 … … 2061 1982 if (RT_SUCCESS(vrc)) 2062 1983 vrc = fAsync 2063 ? pProcess-> startProcessAsync()2064 : pProcess-> startProcess(30 * 1000 /* 30s timeout */, pGuestRc);1984 ? pProcess->i_startProcessAsync() 1985 : pProcess->i_startProcess(30 * 1000 /* 30s timeout */, pGuestRc); 2065 1986 2066 1987 if ( RT_SUCCESS(vrc) … … 2078 1999 } 2079 2000 2080 int GuestProcessTool:: GetCurrentBlock(uint32_t uHandle, GuestProcessStreamBlock &strmBlock)2001 int GuestProcessTool::i_getCurrentBlock(uint32_t uHandle, GuestProcessStreamBlock &strmBlock) 2081 2002 { 2082 2003 const GuestProcessStream *pStream = NULL; … … 2103 2024 } 2104 2025 2105 bool GuestProcessTool:: IsRunning(void)2026 bool GuestProcessTool::i_isRunning(void) 2106 2027 { 2107 2028 AssertReturn(!pProcess.isNull(), false); … … 2122 2043 2123 2044 /* static */ 2124 int GuestProcessTool:: Run( GuestSession *pGuestSession,2125 const GuestProcessStartupInfo &startupInfo,2126 int*pGuestRc)2127 { 2128 return RunEx(pGuestSession, startupInfo,2129 NULL /* pStrmOutObjects */, 0 /* cStrmOutObjects */,2130 pGuestRc);2045 int GuestProcessTool::i_run( GuestSession *pGuestSession, 2046 const GuestProcessStartupInfo &startupInfo, 2047 int *pGuestRc) 2048 { 2049 return i_runEx(pGuestSession, startupInfo, 2050 NULL /* pStrmOutObjects */, 0 /* cStrmOutObjects */, 2051 pGuestRc); 2131 2052 } 2132 2053 2133 2054 /* static */ 2134 int GuestProcessTool:: RunEx( GuestSession *pGuestSession,2135 const GuestProcessStartupInfo &startupInfo,2136 GuestCtrlStreamObjects *pStrmOutObjects,2137 uint32_t cStrmOutObjects,2138 int *pGuestRc)2055 int GuestProcessTool::i_runEx( GuestSession *pGuestSession, 2056 const GuestProcessStartupInfo &startupInfo, 2057 GuestCtrlStreamObjects *pStrmOutObjects, 2058 uint32_t cStrmOutObjects, 2059 int *pGuestRc) 2139 2060 { 2140 2061 GuestProcessTool procTool; int guestRc; … … 2147 2068 { 2148 2069 GuestProcessStreamBlock strmBlk; 2149 vrc = procTool. WaitEx( pStrmOutObjects2150 ? GUESTPROCESSTOOL_FLAG_STDOUT_BLOCK2151 : GUESTPROCESSTOOL_FLAG_NONE, &strmBlk, &guestRc);2070 vrc = procTool.i_waitEx( pStrmOutObjects 2071 ? GUESTPROCESSTOOL_FLAG_STDOUT_BLOCK 2072 : GUESTPROCESSTOOL_FLAG_NONE, &strmBlk, &guestRc); 2152 2073 if (pStrmOutObjects) 2153 2074 pStrmOutObjects->push_back(strmBlk); … … 2163 2084 { 2164 2085 /* Make sure the process runs until completion. */ 2165 vrc = procTool. Wait(GUESTPROCESSTOOL_FLAG_NONE, &guestRc);2086 vrc = procTool.i_wait(GUESTPROCESSTOOL_FLAG_NONE, &guestRc); 2166 2087 if (RT_SUCCESS(vrc)) 2167 2088 { 2168 guestRc = procTool. TerminatedOk(NULL /* Exit code */);2089 guestRc = procTool.i_terminatedOk(NULL /* Exit code */); 2169 2090 if (RT_FAILURE(guestRc)) 2170 2091 vrc = VERR_GSTCTL_GUEST_ERROR; … … 2179 2100 } 2180 2101 2181 int GuestProcessTool:: TerminatedOk(LONG *pExitCode)2102 int GuestProcessTool::i_terminatedOk(LONG *pExitCode) 2182 2103 { 2183 2104 Assert(!pProcess.isNull()); … … 2185 2106 2186 2107 int vrc; 2187 if (! IsRunning())2108 if (!i_isRunning()) 2188 2109 { 2189 2110 LONG exitCode; … … 2205 2126 } 2206 2127 2207 int GuestProcessTool:: Wait(uint32_t fFlags, int *pGuestRc)2208 { 2209 return WaitEx(fFlags, NULL /* pStrmBlkOut */, pGuestRc);2210 } 2211 2212 int GuestProcessTool:: WaitEx(uint32_t fFlags, GuestProcessStreamBlock *pStrmBlkOut, int *pGuestRc)2128 int GuestProcessTool::i_wait(uint32_t fFlags, int *pGuestRc) 2129 { 2130 return i_waitEx(fFlags, NULL /* pStrmBlkOut */, pGuestRc); 2131 } 2132 2133 int GuestProcessTool::i_waitEx(uint32_t fFlags, GuestProcessStreamBlock *pStrmBlkOut, int *pGuestRc) 2213 2134 { 2214 2135 LogFlowThisFunc(("fFlags=0x%x, pStreamBlock=%p, pGuestRc=%p\n", … … 2220 2141 { 2221 2142 AssertPtr(pStrmBlkOut); 2222 vrc = GetCurrentBlock(OUTPUT_HANDLE_ID_STDOUT, *pStrmBlkOut);2143 vrc = i_getCurrentBlock(OUTPUT_HANDLE_ID_STDOUT, *pStrmBlkOut); 2223 2144 if (RT_SUCCESS(vrc)) 2224 2145 return vrc; … … 2272 2193 UPDATE_AND_CHECK_ELAPSED_TIME(); 2273 2194 2274 vrc = pProcess-> waitFor(fWaitFlags, GET_REMAINING_TIME,2275 waitRes, &guestRc);2195 vrc = pProcess->i_waitFor(fWaitFlags, GET_REMAINING_TIME, 2196 waitRes, &guestRc); 2276 2197 if (RT_FAILURE(vrc)) 2277 2198 break; … … 2331 2252 2332 2253 cbRead = 0; 2333 vrc = pProcess-> readData(OUTPUT_HANDLE_ID_STDOUT, sizeof(byBuf),2334 GET_REMAINING_TIME,2335 byBuf, sizeof(byBuf),2336 &cbRead, &guestRc);2254 vrc = pProcess->i_readData(OUTPUT_HANDLE_ID_STDOUT, sizeof(byBuf), 2255 GET_REMAINING_TIME, 2256 byBuf, sizeof(byBuf), 2257 &cbRead, &guestRc); 2337 2258 if ( RT_FAILURE(vrc) 2338 2259 || vrc == VWRN_GSTCTL_OBJECTSTATE_CHANGED) … … 2348 2269 { 2349 2270 AssertPtr(pStrmBlkOut); 2350 vrc = GetCurrentBlock(OUTPUT_HANDLE_ID_STDOUT, *pStrmBlkOut);2271 vrc = i_getCurrentBlock(OUTPUT_HANDLE_ID_STDOUT, *pStrmBlkOut); 2351 2272 2352 2273 /* When successful, break out of the loop because we're done … … 2365 2286 2366 2287 cbRead = 0; 2367 vrc = pProcess-> readData(OUTPUT_HANDLE_ID_STDERR, sizeof(byBuf),2368 GET_REMAINING_TIME,2369 byBuf, sizeof(byBuf),2370 &cbRead, &guestRc);2288 vrc = pProcess->i_readData(OUTPUT_HANDLE_ID_STDERR, sizeof(byBuf), 2289 GET_REMAINING_TIME, 2290 byBuf, sizeof(byBuf), 2291 &cbRead, &guestRc); 2371 2292 if ( RT_FAILURE(vrc) 2372 2293 || vrc == VWRN_GSTCTL_OBJECTSTATE_CHANGED) … … 2399 2320 } 2400 2321 2401 int GuestProcessTool:: Terminate(uint32_t uTimeoutMS, int *pGuestRc)2322 int GuestProcessTool::i_terminate(uint32_t uTimeoutMS, int *pGuestRc) 2402 2323 { 2403 2324 LogFlowThisFuncEnter(); … … 2406 2327 if (!pProcess.isNull()) 2407 2328 { 2408 rc = pProcess-> terminateProcess(uTimeoutMS, pGuestRc);2329 rc = pProcess->i_terminateProcess(uTimeoutMS, pGuestRc); 2409 2330 pProcess.setNull(); 2410 2331 } -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r50618 r50709 753 753 754 754 if (RT_SUCCESS(vrc)) 755 vrc = GuestProcessTool:: Run(this, procInfo, pGuestRc);755 vrc = GuestProcessTool::i_run(this, procInfo, pGuestRc); 756 756 757 757 LogFlowFuncLeaveRC(vrc); … … 898 898 int guestRc; GuestCtrlStreamObjects stdOut; 899 899 if (RT_SUCCESS(vrc)) 900 vrc = GuestProcessTool:: RunEx(this, procInfo,901 &stdOut, 1 /* cStrmOutObjects */,902 &guestRc);900 vrc = GuestProcessTool::i_runEx(this, procInfo, 901 &stdOut, 1 /* cStrmOutObjects */, 902 &guestRc); 903 903 if ( RT_SUCCESS(vrc) 904 904 && RT_SUCCESS(guestRc)) … … 1289 1289 1290 1290 if (RT_SUCCESS(vrc)) 1291 vrc = GuestProcessTool:: Run(this, procInfo, pGuestRc);1291 vrc = GuestProcessTool::i_run(this, procInfo, pGuestRc); 1292 1292 1293 1293 LogFlowFuncLeaveRC(vrc); … … 1448 1448 int guestRc; GuestCtrlStreamObjects stdOut; 1449 1449 if (RT_SUCCESS(vrc)) 1450 vrc = GuestProcessTool:: RunEx(this, procInfo,1451 &stdOut, 1 /* cStrmOutObjects */,1452 &guestRc);1450 vrc = GuestProcessTool::i_runEx(this, procInfo, 1451 &stdOut, 1 /* cStrmOutObjects */, 1452 &guestRc); 1453 1453 if ( RT_SUCCESS(vrc) 1454 1454 && RT_SUCCESS(guestRc)) … … 2674 2674 { 2675 2675 case VERR_GSTCTL_GUEST_ERROR: 2676 hr = GuestProcess:: setErrorExternal(this, guestRc);2676 hr = GuestProcess::i_setErrorExternal(this, guestRc); 2677 2677 break; 2678 2678 … … 2715 2715 { 2716 2716 case VERR_GSTCTL_GUEST_ERROR: 2717 hr = GuestProcess:: setErrorExternal(this, guestRc);2717 hr = GuestProcess::i_setErrorExternal(this, guestRc); 2718 2718 break; 2719 2719 … … 2834 2834 { 2835 2835 case VERR_GSTCTL_GUEST_ERROR: 2836 hr = GuestProcess:: setErrorExternal(this, guestRc);2836 hr = GuestProcess::i_setErrorExternal(this, guestRc); 2837 2837 break; 2838 2838 … … 3157 3157 { 3158 3158 case VERR_GSTCTL_GUEST_ERROR: 3159 hr = GuestProcess:: setErrorExternal(this, guestRc);3159 hr = GuestProcess::i_setErrorExternal(this, guestRc); 3160 3160 break; 3161 3161 … … 3196 3196 { 3197 3197 case VERR_GSTCTL_GUEST_ERROR: 3198 hr = GuestProcess:: setErrorExternal(this, guestRc);3198 hr = GuestProcess::i_setErrorExternal(this, guestRc); 3199 3199 break; 3200 3200 … … 3336 3336 { 3337 3337 case VERR_GSTCTL_GUEST_ERROR: 3338 hr = GuestProcess:: setErrorExternal(this, guestRc);3338 hr = GuestProcess::i_setErrorExternal(this, guestRc); 3339 3339 break; 3340 3340 … … 3380 3380 { 3381 3381 case VERR_GSTCTL_GUEST_ERROR: 3382 hr = GuestProcess:: setErrorExternal(this, guestRc);3382 hr = GuestProcess::i_setErrorExternal(this, guestRc); 3383 3383 break; 3384 3384 … … 3554 3554 3555 3555 if (RT_SUCCESS(rc)) 3556 rc = pProcess-> startProcessAsync();3556 rc = pProcess->i_startProcessAsync(); 3557 3557 } 3558 3558 } -
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r49630 r50709 323 323 { 324 324 Assert(!pProcess.isNull()); 325 rc = pProcess-> startProcess(30 * 1000 /* 30s timeout */,326 &guestRc);325 rc = pProcess->i_startProcess(30 * 1000 /* 30s timeout */, 326 &guestRc); 327 327 } 328 328 … … 333 333 case VERR_GSTCTL_GUEST_ERROR: 334 334 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 335 GuestProcess:: guestErrorToString(guestRc));335 GuestProcess::i_guestErrorToString(guestRc)); 336 336 break; 337 337 … … 355 355 for (;;) 356 356 { 357 rc = pProcess-> waitFor(ProcessWaitForFlag_StdIn,358 30 * 1000 /* Timeout */, waitRes, &guestRc);357 rc = pProcess->i_waitFor(ProcessWaitForFlag_StdIn, 358 30 * 1000 /* Timeout */, waitRes, &guestRc); 359 359 if ( RT_FAILURE(rc) 360 360 || ( waitRes != ProcessWaitResult_StdIn … … 419 419 uint32_t cbWritten; 420 420 Assert(sizeof(byBuf) >= cbRead); 421 rc = pProcess-> writeData(0 /* StdIn */, fFlags,422 byBuf, cbRead,423 30 * 1000 /* Timeout */, &cbWritten, &guestRc);421 rc = pProcess->i_writeData(0 /* StdIn */, fFlags, 422 byBuf, cbRead, 423 30 * 1000 /* Timeout */, &cbWritten, &guestRc); 424 424 if (RT_FAILURE(rc)) 425 425 { … … 428 428 case VERR_GSTCTL_GUEST_ERROR: 429 429 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 430 GuestProcess:: guestErrorToString(guestRc));430 GuestProcess::i_guestErrorToString(guestRc)); 431 431 break; 432 432 … … 499 499 else 500 500 { 501 rc = pProcess-> waitFor(ProcessWaitForFlag_Terminate,502 30 * 1000 /* Timeout */, waitRes, &guestRc);501 rc = pProcess->i_waitFor(ProcessWaitForFlag_Terminate, 502 30 * 1000 /* Timeout */, waitRes, &guestRc); 503 503 if ( RT_FAILURE(rc) 504 504 || waitRes != ProcessWaitResult_Terminate) … … 643 643 rc = pSession->processCreateExInteral(procInfo, pProcess); 644 644 if (RT_SUCCESS(rc)) 645 rc = pProcess-> startProcess(30 * 1000 /* 30s timeout */,646 &guestRc);645 rc = pProcess->i_startProcess(30 * 1000 /* 30s timeout */, 646 &guestRc); 647 647 if (RT_FAILURE(rc)) 648 648 { … … 651 651 case VERR_GSTCTL_GUEST_ERROR: 652 652 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 653 GuestProcess:: guestErrorToString(guestRc));653 GuestProcess::i_guestErrorToString(guestRc)); 654 654 break; 655 655 … … 672 672 for (;;) 673 673 { 674 rc = pProcess-> waitFor(ProcessWaitForFlag_StdOut,675 30 * 1000 /* Timeout */, waitRes, &guestRc);674 rc = pProcess->i_waitFor(ProcessWaitForFlag_StdOut, 675 30 * 1000 /* Timeout */, waitRes, &guestRc); 676 676 if (RT_FAILURE(rc)) 677 677 { … … 680 680 case VERR_GSTCTL_GUEST_ERROR: 681 681 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 682 GuestProcess:: guestErrorToString(guestRc));682 GuestProcess::i_guestErrorToString(guestRc)); 683 683 break; 684 684 … … 702 702 703 703 uint32_t cbRead = 0; /* readData can return with VWRN_GSTCTL_OBJECTSTATE_CHANGED. */ 704 rc = pProcess-> readData(OUTPUT_HANDLE_ID_STDOUT, sizeof(byBuf),705 30 * 1000 /* Timeout */, byBuf, sizeof(byBuf),706 &cbRead, &guestRc);704 rc = pProcess->i_readData(OUTPUT_HANDLE_ID_STDOUT, sizeof(byBuf), 705 30 * 1000 /* Timeout */, byBuf, sizeof(byBuf), 706 &cbRead, &guestRc); 707 707 if (RT_FAILURE(rc)) 708 708 { … … 711 711 case VERR_GSTCTL_GUEST_ERROR: 712 712 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 713 GuestProcess:: guestErrorToString(guestRc));713 GuestProcess::i_guestErrorToString(guestRc)); 714 714 break; 715 715 … … 988 988 case VERR_GSTCTL_GUEST_ERROR: 989 989 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 990 GuestProcess:: guestErrorToString(guestRc));990 GuestProcess::i_guestErrorToString(guestRc)); 991 991 break; 992 992 … … 1022 1022 { 1023 1023 if (RT_SUCCESS(guestRc)) 1024 vrc = procTool. Wait(GUESTPROCESSTOOL_FLAG_NONE, &guestRc);1024 vrc = procTool.i_wait(GUESTPROCESSTOOL_FLAG_NONE, &guestRc); 1025 1025 if (RT_SUCCESS(vrc)) 1026 vrc = procTool. TerminatedOk(&exitCode);1026 vrc = procTool.i_terminatedOk(&exitCode); 1027 1027 } 1028 1028 … … 1039 1039 case VERR_GSTCTL_GUEST_ERROR: 1040 1040 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 1041 GuestProcess:: guestErrorToString(guestRc));1041 GuestProcess::i_guestErrorToString(guestRc)); 1042 1042 break; 1043 1043 … … 1288 1288 case VERR_GSTCTL_GUEST_ERROR: 1289 1289 hr = setProgressErrorMsg(VBOX_E_IPRT_ERROR, 1290 GuestProcess:: guestErrorToString(guestRc));1290 GuestProcess::i_guestErrorToString(guestRc)); 1291 1291 break; 1292 1292 -
trunk/src/VBox/Main/src-client/xpcom/module.cpp
r50618 r50709 69 69 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Guest, IGuest) 70 70 #ifdef VBOX_WITH_GUEST_CONTROL 71 NS_DECL_CLASSINFO(GuestProcess)72 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestProcess, IGuestProcess, IProcess)73 71 NS_DECL_CLASSINFO(GuestSession) 74 72 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(GuestSession, IGuestSession)
Note:
See TracChangeset
for help on using the changeset viewer.