Changeset 35061 in vbox
- Timestamp:
- Dec 14, 2010 10:58:49 AM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/GuestImpl.cpp
r34942 r35061 346 346 ULONG uBytesWritten; 347 347 rc = pGuest->SetProcessInput(uPID, uFlags, 348 5 * 1000 /* Wait 5s for getting the input data transfered. */, 348 349 ComSafeArrayAsInParam(aInputData), &uBytesWritten); 349 350 if (FAILED(rc)) … … 606 607 ULONG uBytesWritten; 607 608 rc = pGuest->SetProcessInput(uPID, uFlags, 609 5 * 1000 /* Wait 5s for getting the input data transfered. */, 608 610 ComSafeArrayAsInParam(aInputData), &uBytesWritten); 609 611 if (FAILED(rc)) … … 622 624 Assert(cbLength >= uBytesWritten); 623 625 cbLength -= uBytesWritten; 626 } 627 else if (RT_FAILURE(vrc)) 628 { 629 rc = TaskGuest::setProgressErrorInfo(VBOX_E_IPRT_ERROR, aTask->progress, 630 Guest::tr("Error while reading setup file \"%s\" (To read: %u, Size: %u) from installation medium (%Rrc)"), 631 installerImage.c_str(), cbToRead, cbLength, vrc); 624 632 } 625 633 } … … 2156 2164 } 2157 2165 2158 STDMETHODIMP Guest::SetProcessInput(ULONG aPID, ULONG aFlags, ComSafeArrayIn(BYTE, aData), ULONG *aBytesWritten)2166 STDMETHODIMP Guest::SetProcessInput(ULONG aPID, ULONG aFlags, ULONG aTimeoutMS, ComSafeArrayIn(BYTE, aData), ULONG *aBytesWritten) 2159 2167 { 2160 2168 #ifndef VBOX_WITH_GUEST_CONTROL … … 2217 2225 if (FAILED(rc)) return rc; 2218 2226 2227 /* Adjust timeout. */ 2228 if (aTimeoutMS == 0) 2229 aTimeoutMS = UINT32_MAX; 2230 2219 2231 PCALLBACKDATAEXECINSTATUS pData = (PCALLBACKDATAEXECINSTATUS)RTMemAlloc(sizeof(CALLBACKDATAEXECINSTATUS)); 2220 2232 AssertReturn(pData, VBOX_E_IPRT_ERROR); … … 2278 2290 2279 2291 /* Wait until operation completed. */ 2280 rc = it->second.pProgress->WaitForCompletion( UINT32_MAX /* Wait forever */);2292 rc = it->second.pProgress->WaitForCompletion(aTimeoutMS); 2281 2293 if (FAILED(rc)) throw rc; 2282 2294 … … 2385 2397 if (FAILED(rc)) return rc; 2386 2398 2387 /* Adjust timeout */2399 /* Adjust timeout. */ 2388 2400 if (aTimeoutMS == 0) 2389 2401 aTimeoutMS = UINT32_MAX; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r35040 r35061 7938 7938 <interface 7939 7939 name="IGuest" extends="$unknown" 7940 uuid=" 1039b0cc-9bc1-4c6d-8d12-864aa48aa5b9"7940 uuid="7ce7e4d8-cdaa-4d83-a0f4-510c8ee70aea" 7941 7941 wsmap="managed" 7942 7942 > … … 8327 8327 <desc> 8328 8328 Not used, must be set to zero. 8329 </desc> 8330 </param> 8331 <param name="timeoutMS" type="unsigned long" dir="in"> 8332 <desc> 8333 The maximum timeout value (in msec) to wait for getting the 8334 data transfered to the guest. Pass 0 for an infinite timeout. 8329 8335 </desc> 8330 8336 </param> -
trunk/src/VBox/Main/include/GuestImpl.h
r34831 r35061 99 99 ULONG aTimeoutMS, ULONG *aPID, IProgress **aProgress); 100 100 STDMETHOD(GetProcessOutput)(ULONG aPID, ULONG aFlags, ULONG aTimeoutMS, LONG64 aSize, ComSafeArrayOut(BYTE, aData)); 101 STDMETHOD(SetProcessInput)(ULONG aPID, ULONG aFlags, ComSafeArrayIn(BYTE, aData), ULONG *aBytesWritten);101 STDMETHOD(SetProcessInput)(ULONG aPID, ULONG aFlags, ULONG aTimeoutMS, ComSafeArrayIn(BYTE, aData), ULONG *aBytesWritten); 102 102 STDMETHOD(GetProcessStatus)(ULONG aPID, ULONG *aExitCode, ULONG *aFlags, ULONG *aStatus); 103 103 STDMETHOD(CopyToGuest)(IN_BSTR aSource, IN_BSTR aDest, IN_BSTR aUserName, IN_BSTR aPassword, ULONG aFlags, IProgress **aProgress);
Note:
See TracChangeset
for help on using the changeset viewer.