Changeset 42818 in vbox for trunk/src/VBox
- Timestamp:
- Aug 15, 2012 9:45:06 AM (12 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r42810 r42818 10302 10302 <desc>Handle to read from. Usually 0 is stdin.</desc> 10303 10303 </param> 10304 <param name=" size" type="unsigned long" dir="in">10304 <param name="toRead" type="unsigned long" dir="in"> 10305 10305 <desc>Number of bytes to read.</desc> 10306 10306 </param> … … 10447 10447 <interface 10448 10448 name="IFile" extends="$unknown" 10449 uuid="b 3484293-b98b-4952-ae23-f18eca6a5ff9"10449 uuid="b702a560-6139-4a8e-a892-bbf14b97bf97" 10450 10450 wsmap="managed" 10451 10451 > … … 10539 10539 <desc>Number of bytes to read.</desc> 10540 10540 </param> 10541 <param name="read" type="unsigned long" dir="out"> 10542 <desc>How much bytes were read.</desc> 10541 <param name="timeoutMS" type="unsigned long" dir="in"> 10542 <desc> 10543 Timeout (in ms) to wait for the operation to complete. 10544 Pass 0 for an infinite timeout. 10545 </desc> 10543 10546 </param> 10544 10547 <param name="data" type="octet" dir="return" safearray="yes"> … … 10561 10564 <desc>Number of bytes to read.</desc> 10562 10565 </param> 10563 <param name="read" type="unsigned long" dir="out"> 10564 <desc>How much bytes were read.</desc> 10566 <param name="timeoutMS" type="unsigned long" dir="in"> 10567 <desc> 10568 Timeout (in ms) to wait for the operation to complete. 10569 Pass 0 for an infinite timeout. 10570 </desc> 10565 10571 </param> 10566 10572 <param name="data" type="octet" dir="return" safearray="yes"> … … 10610 10616 </desc> 10611 10617 </param> 10618 <param name="timeoutMS" type="unsigned long" dir="in"> 10619 <desc> 10620 Timeout (in ms) to wait for the operation to complete. 10621 Pass 0 for an infinite timeout. 10622 </desc> 10623 </param> 10612 10624 <param name="written" type="unsigned long" dir="return"> 10613 10625 <desc>How much bytes were written.</desc> … … 10630 10642 Array of bytes to write. The size of the array also specifies 10631 10643 how much to write. 10644 </desc> 10645 </param> 10646 <param name="timeoutMS" type="unsigned long" dir="in"> 10647 <desc> 10648 Timeout (in ms) to wait for the operation to complete. 10649 Pass 0 for an infinite timeout. 10632 10650 </desc> 10633 10651 </param> -
trunk/src/VBox/Main/include/GuestFileImpl.h
r42611 r42818 63 63 STDMETHOD(Close)(void); 64 64 STDMETHOD(QueryInfo)(IFsObjInfo **aInfo); 65 STDMETHOD(Read)(ULONG aToRead, ULONG *aRead, ComSafeArrayOut(BYTE, aData));66 STDMETHOD(ReadAt)(LONG64 aOffset, ULONG aToRead, ULONG *aRead, ComSafeArrayOut(BYTE, aData));65 STDMETHOD(Read)(ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData)); 66 STDMETHOD(ReadAt)(LONG64 aOffset, ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData)); 67 67 STDMETHOD(Seek)(LONG64 aOffset, FileSeekType_T aType); 68 68 STDMETHOD(SetACL)(IN_BSTR aACL); 69 STDMETHOD(Write)(ComSafeArrayIn(BYTE, aData), ULONG *aWritten);70 STDMETHOD(WriteAt)(LONG64 aOffset, ComSafeArrayIn(BYTE, aData), ULONG *aWritten);69 STDMETHOD(Write)(ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten); 70 STDMETHOD(WriteAt)(LONG64 aOffset, ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten); 71 71 /** @} */ 72 72 -
trunk/src/VBox/Main/include/GuestProcessImpl.h
r42718 r42818 61 61 STDMETHOD(COMGETTER(Status))(ProcessStatus_T *aStatus); 62 62 63 STDMETHOD(Read)(ULONG aHandle, ULONG a Size, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData));63 STDMETHOD(Read)(ULONG aHandle, ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData)); 64 64 STDMETHOD(Terminate)(void); 65 65 STDMETHOD(WaitFor)(ULONG aWaitFlags, ULONG aTimeoutMS, ProcessWaitResult_T *aReason); -
trunk/src/VBox/Main/src-client/GuestFileImpl.cpp
r42611 r42818 246 246 } 247 247 248 STDMETHODIMP GuestFile::Read(ULONG aToRead, ULONG *aRead, ComSafeArrayOut(BYTE, aData))249 { 250 #ifndef VBOX_WITH_GUEST_CONTROL 251 ReturnComNotImplemented(); 252 #else 253 AutoCaller autoCaller(this); 254 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 255 256 ReturnComNotImplemented(); 257 #endif /* VBOX_WITH_GUEST_CONTROL */ 258 } 259 260 STDMETHODIMP GuestFile::ReadAt(LONG64 aOffset, ULONG aToRead, ULONG *aRead, ComSafeArrayOut(BYTE, aData))248 STDMETHODIMP GuestFile::Read(ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData)) 249 { 250 #ifndef VBOX_WITH_GUEST_CONTROL 251 ReturnComNotImplemented(); 252 #else 253 AutoCaller autoCaller(this); 254 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 255 256 ReturnComNotImplemented(); 257 #endif /* VBOX_WITH_GUEST_CONTROL */ 258 } 259 260 STDMETHODIMP GuestFile::ReadAt(LONG64 aOffset, ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData)) 261 261 { 262 262 #ifndef VBOX_WITH_GUEST_CONTROL … … 294 294 } 295 295 296 STDMETHODIMP GuestFile::Write(ComSafeArrayIn(BYTE, aData), ULONG *aWritten)297 { 298 #ifndef VBOX_WITH_GUEST_CONTROL 299 ReturnComNotImplemented(); 300 #else 301 AutoCaller autoCaller(this); 302 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 303 304 ReturnComNotImplemented(); 305 #endif /* VBOX_WITH_GUEST_CONTROL */ 306 } 307 308 STDMETHODIMP GuestFile::WriteAt(LONG64 aOffset, ComSafeArrayIn(BYTE, aData), ULONG *aWritten)309 { 310 #ifndef VBOX_WITH_GUEST_CONTROL 311 ReturnComNotImplemented(); 312 #else 313 AutoCaller autoCaller(this); 314 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 315 316 ReturnComNotImplemented(); 317 #endif /* VBOX_WITH_GUEST_CONTROL */ 318 } 319 296 STDMETHODIMP GuestFile::Write(ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten) 297 { 298 #ifndef VBOX_WITH_GUEST_CONTROL 299 ReturnComNotImplemented(); 300 #else 301 AutoCaller autoCaller(this); 302 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 303 304 ReturnComNotImplemented(); 305 #endif /* VBOX_WITH_GUEST_CONTROL */ 306 } 307 308 STDMETHODIMP GuestFile::WriteAt(LONG64 aOffset, ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten) 309 { 310 #ifndef VBOX_WITH_GUEST_CONTROL 311 ReturnComNotImplemented(); 312 #else 313 AutoCaller autoCaller(this); 314 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 315 316 ReturnComNotImplemented(); 317 #endif /* VBOX_WITH_GUEST_CONTROL */ 318 } 319 -
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r42810 r42818 1501 1501 ///////////////////////////////////////////////////////////////////////////// 1502 1502 1503 STDMETHODIMP GuestProcess::Read(ULONG aHandle, ULONG a Size, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData))1503 STDMETHODIMP GuestProcess::Read(ULONG aHandle, ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData)) 1504 1504 { 1505 1505 #ifndef VBOX_WITH_GUEST_CONTROL 1506 1506 ReturnComNotImplemented(); 1507 1507 #else 1508 if (a Size== 0)1508 if (aToRead == 0) 1509 1509 return setError(E_INVALIDARG, tr("The size to read is zero")); 1510 1510 CheckComArgOutSafeArrayPointerValid(aData); … … 1513 1513 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1514 1514 1515 com::SafeArray<BYTE> data((size_t)a Size);1516 Assert(data.size() >= a Size);1515 com::SafeArray<BYTE> data((size_t)aToRead); 1516 Assert(data.size() >= aToRead); 1517 1517 1518 1518 size_t cbRead; 1519 int vrc = readData(aHandle, a Size, aTimeoutMS, data.raw(), aSize, &cbRead);1519 int vrc = readData(aHandle, aToRead, aTimeoutMS, data.raw(), aToRead, &cbRead); 1520 1520 if (RT_SUCCESS(vrc)) 1521 1521 {
Note:
See TracChangeset
for help on using the changeset viewer.