Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 42817)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 42818)
@@ -10302,5 +10302,5 @@
         <desc>Handle to read from. Usually 0 is stdin.</desc>
       </param>
-      <param name="size" type="unsigned long" dir="in">
+      <param name="toRead" type="unsigned long" dir="in">
         <desc>Number of bytes to read.</desc>
       </param>
@@ -10447,5 +10447,5 @@
   <interface
     name="IFile" extends="$unknown"
-    uuid="b3484293-b98b-4952-ae23-f18eca6a5ff9"
+    uuid="b702a560-6139-4a8e-a892-bbf14b97bf97"
     wsmap="managed"
     >
@@ -10539,6 +10539,9 @@
         <desc>Number of bytes to read.</desc>
       </param>
-      <param name="read" type="unsigned long" dir="out">
-        <desc>How much bytes were read.</desc>
+      <param name="timeoutMS" type="unsigned long" dir="in">
+        <desc>
+          Timeout (in ms) to wait for the operation to complete.
+          Pass 0 for an infinite timeout.
+        </desc>
       </param>
       <param name="data" type="octet" dir="return" safearray="yes">
@@ -10561,6 +10564,9 @@
         <desc>Number of bytes to read.</desc>
       </param>
-      <param name="read" type="unsigned long" dir="out">
-        <desc>How much bytes were read.</desc>
+      <param name="timeoutMS" type="unsigned long" dir="in">
+        <desc>
+          Timeout (in ms) to wait for the operation to complete.
+          Pass 0 for an infinite timeout.
+        </desc>
       </param>
       <param name="data" type="octet" dir="return" safearray="yes">
@@ -10610,4 +10616,10 @@
         </desc>
       </param>
+      <param name="timeoutMS" type="unsigned long" dir="in">
+        <desc>
+          Timeout (in ms) to wait for the operation to complete.
+          Pass 0 for an infinite timeout.
+        </desc>
+      </param>
       <param name="written" type="unsigned long" dir="return">
         <desc>How much bytes were written.</desc>
@@ -10630,4 +10642,10 @@
           Array of bytes to write. The size of the array also specifies
           how much to write.
+        </desc>
+      </param>
+      <param name="timeoutMS" type="unsigned long" dir="in">
+        <desc>
+          Timeout (in ms) to wait for the operation to complete.
+          Pass 0 for an infinite timeout.
         </desc>
       </param>
Index: /trunk/src/VBox/Main/include/GuestFileImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestFileImpl.h	(revision 42817)
+++ /trunk/src/VBox/Main/include/GuestFileImpl.h	(revision 42818)
@@ -63,10 +63,10 @@
     STDMETHOD(Close)(void);
     STDMETHOD(QueryInfo)(IFsObjInfo **aInfo);
-    STDMETHOD(Read)(ULONG aToRead, ULONG *aRead, ComSafeArrayOut(BYTE, aData));
-    STDMETHOD(ReadAt)(LONG64 aOffset, ULONG aToRead, ULONG *aRead, ComSafeArrayOut(BYTE, aData));
+    STDMETHOD(Read)(ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData));
+    STDMETHOD(ReadAt)(LONG64 aOffset, ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData));
     STDMETHOD(Seek)(LONG64 aOffset, FileSeekType_T aType);
     STDMETHOD(SetACL)(IN_BSTR aACL);
-    STDMETHOD(Write)(ComSafeArrayIn(BYTE, aData), ULONG *aWritten);
-    STDMETHOD(WriteAt)(LONG64 aOffset, ComSafeArrayIn(BYTE, aData), ULONG *aWritten);
+    STDMETHOD(Write)(ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten);
+    STDMETHOD(WriteAt)(LONG64 aOffset, ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten);
     /** @}  */
 
Index: /trunk/src/VBox/Main/include/GuestProcessImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestProcessImpl.h	(revision 42817)
+++ /trunk/src/VBox/Main/include/GuestProcessImpl.h	(revision 42818)
@@ -61,5 +61,5 @@
     STDMETHOD(COMGETTER(Status))(ProcessStatus_T *aStatus);
 
-    STDMETHOD(Read)(ULONG aHandle, ULONG aSize, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData));
+    STDMETHOD(Read)(ULONG aHandle, ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData));
     STDMETHOD(Terminate)(void);
     STDMETHOD(WaitFor)(ULONG aWaitFlags, ULONG aTimeoutMS, ProcessWaitResult_T *aReason);
Index: /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp	(revision 42817)
+++ /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp	(revision 42818)
@@ -246,17 +246,17 @@
 }
 
-STDMETHODIMP GuestFile::Read(ULONG aToRead, ULONG *aRead, ComSafeArrayOut(BYTE, aData))
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestFile::ReadAt(LONG64 aOffset, ULONG aToRead, ULONG *aRead, ComSafeArrayOut(BYTE, aData))
+STDMETHODIMP GuestFile::Read(ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData))
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestFile::ReadAt(LONG64 aOffset, ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData))
 {
 #ifndef VBOX_WITH_GUEST_CONTROL
@@ -294,26 +294,26 @@
 }
 
-STDMETHODIMP GuestFile::Write(ComSafeArrayIn(BYTE, aData), ULONG *aWritten)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestFile::WriteAt(LONG64 aOffset, ComSafeArrayIn(BYTE, aData), ULONG *aWritten)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
+STDMETHODIMP GuestFile::Write(ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestFile::WriteAt(LONG64 aOffset, ComSafeArrayIn(BYTE, aData), ULONG aTimeoutMS, ULONG *aWritten)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
Index: /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp	(revision 42817)
+++ /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp	(revision 42818)
@@ -1501,10 +1501,10 @@
 /////////////////////////////////////////////////////////////////////////////
 
-STDMETHODIMP GuestProcess::Read(ULONG aHandle, ULONG aSize, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData))
+STDMETHODIMP GuestProcess::Read(ULONG aHandle, ULONG aToRead, ULONG aTimeoutMS, ComSafeArrayOut(BYTE, aData))
 {
 #ifndef VBOX_WITH_GUEST_CONTROL
     ReturnComNotImplemented();
 #else
-    if (aSize == 0)
+    if (aToRead == 0)
         return setError(E_INVALIDARG, tr("The size to read is zero"));
     CheckComArgOutSafeArrayPointerValid(aData);
@@ -1513,9 +1513,9 @@
     if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
-    com::SafeArray<BYTE> data((size_t)aSize);
-    Assert(data.size() >= aSize);
+    com::SafeArray<BYTE> data((size_t)aToRead);
+    Assert(data.size() >= aToRead);
 
     size_t cbRead;
-    int vrc = readData(aHandle, aSize, aTimeoutMS, data.raw(), aSize, &cbRead);
+    int vrc = readData(aHandle, aToRead, aTimeoutMS, data.raw(), aToRead, &cbRead);
     if (RT_SUCCESS(vrc))
     {
