Index: trunk/include/VBox/HostServices/GuestControlSvc.h
===================================================================
--- trunk/include/VBox/HostServices/GuestControlSvc.h	(revision 28441)
+++ trunk/include/VBox/HostServices/GuestControlSvc.h	(revision 28557)
@@ -98,11 +98,28 @@
     /** Size of optional data buffer (not used atm). */
     uint32_t cbData;
-
 } HOSTEXECCALLBACKDATA, *PHOSTEXECCALLBACKDATA;
 
+typedef struct _VBoxGuestCtrlExecOutCallbackData
+{
+    /** Callback data header. */
+    HOSTCCALLBACKHEADER hdr;
+    /** The process ID (PID). */
+    uint32_t u32PID;
+    /* The handle ID (stdout/stderr). */
+    uint32_t u32HandleId;
+    /** Optional flags (not used atm). */
+    uint32_t u32Flags;
+    /** Optional data buffer. */
+    void *pvData;
+    /** Size of optional data buffer. */
+    uint32_t cbData;
+} HOSTEXECOUTCALLBACKDATA, *PHOSTEXECOUTCALLBACKDATA;
+
 enum
 {
-    /** Magic number for sanity checking the HOSTEXECCALLBACKDATA structure */
-    HOSTEXECCALLBACKDATAMAGIC = 0x26011982
+    /** Magic number for sanity checking the HOSTEXECCALLBACKDATA structure. */
+    HOSTEXECCALLBACKDATAMAGIC = 0x26011982,
+    /** Magic number for sanity checking the HOSTEXECOUTCALLBACKDATA structure. */
+    HOSTEXECOUTCALLBACKDATAMAGIC = 0x11061949
 };
 
@@ -120,10 +137,10 @@
      * Sends input data for stdin to a running process executed by HOST_EXEC_CMD.
      */
-    HOST_EXEC_SEND_STDIN = 2,
+    HOST_EXEC_SET_INPUT = 2,
     /**
      * Gets the current status of a running process, e.g.
      * new data on stdout/stderr, process terminated etc.
      */
-    HOST_EXEC_GET_STATUS = 3
+    HOST_EXEC_GET_OUTPUT = 3
 };
 
@@ -141,13 +158,9 @@
      * TODO
      */
-    GUEST_EXEC_SEND_STDOUT = 3,
+    GUEST_EXEC_SEND_OUTPUT = 2,
     /**
      * TODO
      */
-    GUEST_EXEC_SEND_STDERR = 4,
-    /**
-     * TODO
-     */
-    GUEST_EXEC_SEND_STATUS = 5
+    GUEST_EXEC_SEND_STATUS = 3
 };
 
@@ -162,9 +175,14 @@
      * or starting a program.
      */
-    GETHOSTMSG_EXEC_CMD = 1,
+    GETHOSTMSG_EXEC_START_PROCESS = 1,
     /**
      * Sends input data for stdin to a running process executed by HOST_EXEC_CMD.
      */
-    GETHOSTMSG_EXEC_STDIN = 2
+    GETHOSTMSG_EXEC_SEND_INPUT = 2,
+    /**
+     * Host requests the so far collected stdout/stderr output
+     * from a running process executed by HOST_EXEC_CMD.
+     */
+    GETHOSTMSG_EXEC_GET_OUTPUT = 3
 };
 
@@ -220,4 +238,20 @@
 
 } VBoxGuestCtrlHGCMMsgExecCmd;
+
+typedef struct _VBoxGuestCtrlHGCMMsgExecOut
+{
+    VBoxGuestHGCMCallInfo hdr;
+    /** Context ID. */
+    HGCMFunctionParameter context;
+    /** The process ID (PID). */
+    HGCMFunctionParameter pid;
+    /** The pipe handle ID. */
+    HGCMFunctionParameter handle;
+    /** Optional flags. */
+    HGCMFunctionParameter flags;
+    /** Data buffer. */
+    HGCMFunctionParameter data;
+
+} VBoxGuestCtrlHGCMMsgExecOut;
 
 typedef struct _VBoxGuestCtrlHGCMMsgExecStatus
@@ -241,4 +275,5 @@
 typedef struct _VBoxGuestCtrlParamBuffer
 {
+    uint32_t uMsg;
     uint32_t uParmCount;
     VBOXHGCMSVCPARM *pParms;
Index: trunk/include/VBox/VBoxGuestLib.h
===================================================================
--- trunk/include/VBox/VBoxGuestLib.h	(revision 28441)
+++ trunk/include/VBox/VBoxGuestLib.h	(revision 28557)
@@ -526,4 +526,7 @@
                                                   char     *pszPassword,    uint32_t  cbPassword,
                                                   uint32_t *puTimeLimit);
+VBGLR3DECL(int) VbglR3GuestCtrlExecGetHostCmdOutput(uint32_t  u32ClientId,    uint32_t  uNumParms,
+                                                    uint32_t *puContext,      uint32_t *puPID,
+                                                    uint32_t *puHandle,       uint32_t *puFlags);
 VBGLR3DECL(int)     VbglR3GuestCtrlExecReportStatus(uint32_t  u32ClientId,
                                                     uint32_t  u32Context,
@@ -533,4 +536,11 @@
                                                     void     *pvData,
                                                     uint32_t  cbData);
+VBGLR3DECL(int)     VbglR3GuestCtrlExecSendOut(uint32_t     u32ClientId,
+                                               uint32_t     u32Context,
+                                               uint32_t     u32PID,
+                                               uint32_t     u32Handle,
+                                               uint32_t     u32Flags,
+                                               void        *pvData,
+                                               uint32_t     cbData);
 /** @}  */
 # endif /* VBOX_WITH_GUEST_CONTROL defined */
