Index: trunk/src/VBox/Main/include/GuestSessionImpl.h
===================================================================
--- trunk/src/VBox/Main/include/GuestSessionImpl.h	(revision 42089)
+++ trunk/src/VBox/Main/include/GuestSessionImpl.h	(revision 42090)
@@ -25,4 +25,5 @@
 #include "GuestDirectoryImpl.h"
 #include "GuestFileImpl.h"
+#include "GuestFsObjInfoImpl.h"
 
 /**
@@ -52,10 +53,10 @@
     /** @name IGuestSession properties.
      * @{ */
-    STDMETHOD(COMGETTER(User))(BSTR *aName);
-    STDMETHOD(COMGETTER(Domain))(BSTR *aDomain);
-    STDMETHOD(COMGETTER(Name))(BSTR *aName);
+    STDMETHOD(COMGETTER(User))(IN_BSTR *aName);
+    STDMETHOD(COMGETTER(Domain))(IN_BSTR *aDomain);
+    STDMETHOD(COMGETTER(Name))(IN_BSTR *aName);
     STDMETHOD(COMGETTER(Id))(ULONG *aId);
     STDMETHOD(COMGETTER(Timeout))(ULONG *aTimeout);
-    STDMETHOD(COMGETTER(Environment))(ComSafeArrayOut(BSTR, aEnvironment));
+    STDMETHOD(COMGETTER(Environment))(ComSafeArrayOut(IN_BSTR, aEnvironment));
     STDMETHOD(COMGETTER(Processes))(ComSafeArrayOut(IGuestProcess *, aProcesses));
     STDMETHOD(COMGETTER(Directories))(ComSafeArrayOut(IGuestDirectory *, aDirectories));
@@ -66,30 +67,30 @@
      * @{ */
     STDMETHOD(Close)(void);
-    STDMETHOD(CopyFrom)(BSTR aSource, BSTR aDest, ComSafeArrayIn(ULONG, aFlags), IProgress **aProgress);
-    STDMETHOD(CopyTo)(BSTR aSource, BSTR aDest, ComSafeArrayIn(ULONG, aFlags), IProgress **aProgress);
-    STDMETHOD(DirectoryCreate)(BSTR aPath, ULONG aMode, ULONG aFlags, IGuestDirectory **aDirectory);
-    STDMETHOD(DirectoryCreateTemp)(BSTR aTemplate, ULONG aMode, BSTR aName, IGuestDirectory **aDirectory);
-    STDMETHOD(DirectoryExists)(BSTR aPath, BOOL *aExists);
-    STDMETHOD(DirectoryOpen)(BSTR aPath, BSTR aFilter, BSTR aFlags, IGuestDirectory **aDirectory);
-    STDMETHOD(DirectoryQueryInfo)(BSTR aPath, IGuestFsObjInfo **aInfo);
-    STDMETHOD(DirectoryRemove)(BSTR aPath);
-    STDMETHOD(DirectoryRemoveRecursive)(BSTR aPath, ComSafeArrayIn(DirectoryRemoveRecFlag, aFlags), IProgress **aProgress);
-    STDMETHOD(DirectoryRename)(BSTR aSource, BSTR aDest, ComSafeArrayIn(PathRenameFlag, aFlags));
-    STDMETHOD(DirectorySetACL)(BSTR aPath, BSTR aACL);
+    STDMETHOD(CopyFrom)(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(ULONG, aFlags), IProgress **aProgress);
+    STDMETHOD(CopyTo)(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(ULONG, aFlags), IProgress **aProgress);
+    STDMETHOD(DirectoryCreate)(IN_BSTR aPath, ULONG aMode, ULONG aFlags, IGuestDirectory **aDirectory);
+    STDMETHOD(DirectoryCreateTemp)(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aName, IGuestDirectory **aDirectory);
+    STDMETHOD(DirectoryExists)(IN_BSTR aPath, BOOL *aExists);
+    STDMETHOD(DirectoryOpen)(IN_BSTR aPath, IN_BSTR aFilter, IN_BSTR aFlags, IGuestDirectory **aDirectory);
+    STDMETHOD(DirectoryQueryInfo)(IN_BSTR aPath, IGuestFsObjInfo **aInfo);
+    STDMETHOD(DirectoryRemove)(IN_BSTR aPath);
+    STDMETHOD(DirectoryRemoveRecursive)(IN_BSTR aPath, ComSafeArrayIn(DirectoryRemoveRecFlag, aFlags), IProgress **aProgress);
+    STDMETHOD(DirectoryRename)(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(PathRenameFlag, aFlags));
+    STDMETHOD(DirectorySetACL)(IN_BSTR aPath, IN_BSTR aACL);
     STDMETHOD(EnvironmentClear)(void);
-    STDMETHOD(EnvironmentSet)(BSTR aName, BSTR aValue);
-    STDMETHOD(EnvironmentSetArray)(ComSafeArrayIn(BSTR, aValues));
-    STDMETHOD(EnvironmentUnset)(BSTR aName);
-    STDMETHOD(FileCreateTemp)(BSTR aTemplate, ULONG aMode, BSTR aName, IGuestFile **aFile);
-    STDMETHOD(FileExists)(BSTR aPath, BOOL *aExists);
-    STDMETHOD(FileOpen)(BSTR aPath, BSTR aOpenMode, BSTR aDisposition, ULONG aCreationMode, LONG64 aOffset, IGuestFile **aFile);
-    STDMETHOD(FileQueryInfo)(BSTR aPath, IGuestFsObjInfo **aInfo);
-    STDMETHOD(FileQuerySize)(BSTR aPath, LONG64 *aSize);
-    STDMETHOD(FileRemove)(BSTR aPath);
-    STDMETHOD(FileRename)(BSTR aSource, BSTR aDest, ComSafeArrayIn(PathRenameFlag, aFlags));
-    STDMETHOD(FileSetACL)(BSTR aPath, BSTR aACL);
-    STDMETHOD(ProcessCreate)(BSTR aCommand, ComSafeArrayIn(BSTR, aArguments), ComSafeArrayIn(BSTR, aEnvironment),
+    STDMETHOD(EnvironmentSet)(IN_BSTR aName, IN_BSTR aValue);
+    STDMETHOD(EnvironmentSetArray)(ComSafeArrayIn(IN_BSTR, aValues));
+    STDMETHOD(EnvironmentUnset)(IN_BSTR aName);
+    STDMETHOD(FileCreateTemp)(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aName, IGuestFile **aFile);
+    STDMETHOD(FileExists)(IN_BSTR aPath, BOOL *aExists);
+    STDMETHOD(FileOpen)(IN_BSTR aPath, IN_BSTR aOpenMode, IN_BSTR aDisposition, ULONG aCreationMode, LONG64 aOffset, IGuestFile **aFile);
+    STDMETHOD(FileQueryInfo)(IN_BSTR aPath, IGuestFsObjInfo **aInfo);
+    STDMETHOD(FileQuerySize)(IN_BSTR aPath, LONG64 *aSize);
+    STDMETHOD(FileRemove)(IN_BSTR aPath);
+    STDMETHOD(FileRename)(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(PathRenameFlag, aFlags));
+    STDMETHOD(FileSetACL)(IN_BSTR aPath, IN_BSTR aACL);
+    STDMETHOD(ProcessCreate)(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment),
                              ComSafeArrayIn(ProcessCreateFlag, aFlags), ULONG aTimeoutMS, IGuestProcess **IGuestProcess);
-    STDMETHOD(ProcessCreateEx)(BSTR aCommand, ComSafeArrayIn(BSTR, aArguments), ComSafeArrayIn(BSTR, aEnvironment),
+    STDMETHOD(ProcessCreateEx)(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment),
                                ComSafeArrayIn(ProcessCreateFlag, aFlags), ULONG aTimeoutMS,
                                ProcessPriority aPriority, ComSafeArrayIn(ULONG, aAffinity),
@@ -97,9 +98,9 @@
     STDMETHOD(ProcessGet)(ULONG aPID, IGuestProcess **IGuestProcess);
     STDMETHOD(SetTimeout)(ULONG aTimeoutMS);
-    STDMETHOD(SymlinkCreate)(BSTR aSource, BSTR aTarget, SymlinkType aType);
-    STDMETHOD(SymlinkExists)(BSTR aSymlink, BOOL *aExists);
-    STDMETHOD(SymlinkRead)(BSTR aSymlink, ComSafeArrayIn(SymlinkReadFlag, aFlags), BSTR *aTarget);
-    STDMETHOD(SymlinkRemoveDirectory)(BSTR aPath);
-    STDMETHOD(SymlinkRemoveFile)(BSTR aFile);
+    STDMETHOD(SymlinkCreate)(IN_BSTR aSource, IN_BSTR aTarget, SymlinkType aType);
+    STDMETHOD(SymlinkExists)(IN_BSTR aSymlink, BOOL *aExists);
+    STDMETHOD(SymlinkRead)(IN_BSTR aSymlink, ComSafeArrayIn(SymlinkReadFlag, aFlags), IN_BSTR *aTarget);
+    STDMETHOD(SymlinkRemoveDirectory)(IN_BSTR aPath);
+    STDMETHOD(SymlinkRemoveFile)(IN_BSTR aFile);
     /** @}  */
 
Index: trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 42089)
+++ trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 42090)
@@ -84,4 +84,24 @@
     if (autoUninitSpan.uninitDone())
         return;
+
+#ifdef VBOX_WITH_GUEST_CONTROL
+    for (SessionFiles::const_iterator itFiles = mData.mFiles.begin();
+         itFiles != mData.mFiles.end(); ++itFiles)
+    {
+        /** @todo */
+    }
+
+    for (SessionDirectories::const_iterator itDirs = mData.mDirectories.begin();
+         itDirs != mData.mDirectories.end(); ++itDirs)
+    {
+        /** @todo */
+    }
+
+    for (SessionProcesses::const_iterator itProcs = mData.mProcesses.begin();
+         itProcs != mData.mProcesses.end(); ++itProcs)
+    {
+        /** @todo */
+    }
+#endif
 }
 
@@ -89,5 +109,5 @@
 /////////////////////////////////////////////////////////////////////////////
 
-STDMETHODIMP GuestSession::COMGETTER(User)(BSTR *aUser)
+STDMETHODIMP GuestSession::COMGETTER(User)(IN_BSTR *aUser)
 {
 #ifndef VBOX_WITH_GUEST_CONTROL
@@ -107,5 +127,5 @@
 }
 
-STDMETHODIMP GuestSession::COMGETTER(Domain)(BSTR *aDomain)
+STDMETHODIMP GuestSession::COMGETTER(Domain)(IN_BSTR *aDomain)
 {
 #ifndef VBOX_WITH_GUEST_CONTROL
@@ -125,5 +145,5 @@
 }
 
-STDMETHODIMP GuestSession::COMGETTER(Name)(BSTR *aName)
+STDMETHODIMP GuestSession::COMGETTER(Name)(IN_BSTR *aName)
 {
 #ifndef VBOX_WITH_GUEST_CONTROL
@@ -179,5 +199,5 @@
 }
 
-STDMETHODIMP GuestSession::COMGETTER(Environment)(ComSafeArrayOut(BSTR, aEnvironment))
+STDMETHODIMP GuestSession::COMGETTER(Environment)(ComSafeArrayOut(IN_BSTR, aEnvironment))
 {
 #ifndef VBOX_WITH_GUEST_CONTROL
@@ -274,129 +294,129 @@
     if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::CopyFrom(BSTR aSource, BSTR aDest, ComSafeArrayIn(ULONG, aFlags), IProgress **aProgress)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::CopyTo(BSTR aSource, BSTR aDest, ComSafeArrayIn(ULONG, aFlags), IProgress **aProgress)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::DirectoryCreate(BSTR aPath, ULONG aMode, ULONG aFlags, IGuestDirectory **aProgress)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::DirectoryCreateTemp(BSTR aTemplate, ULONG aMode, BSTR aName, IGuestDirectory **aDirectory)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::DirectoryExists(BSTR aPath, BOOL *aExists)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::DirectoryOpen(BSTR aPath, BSTR aFilter, BSTR aFlags, IGuestDirectory **aDirectory)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::DirectoryQueryInfo(BSTR aPath, IGuestFsObjInfo **aInfo)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::DirectoryRemove(BSTR aPath)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::DirectoryRemoveRecursive(BSTR aPath, ComSafeArrayIn(DirectoryRemoveRecFlag, aFlags), IProgress **aProgress)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::DirectoryRename(BSTR aSource, BSTR aDest, ComSafeArrayIn(PathRenameFlag, aFlags))
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::DirectorySetACL(BSTR aPath, BSTR aACL)
+    uninit();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::CopyFrom(IN_BSTR aSource, BSTR aDest, ComSafeArrayIn(ULONG, aFlags), IProgress **aProgress)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::CopyTo(IN_BSTR aSource, BSTR aDest, ComSafeArrayIn(ULONG, aFlags), IProgress **aProgress)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::DirectoryCreate(IN_BSTR aPath, ULONG aMode, ULONG aFlags, IGuestDirectory **aProgress)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::DirectoryCreateTemp(IN_BSTR aTemplate, ULONG aMode, BSTR aName, IGuestDirectory **aDirectory)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::DirectoryExists(IN_BSTR aPath, BOOL *aExists)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::DirectoryOpen(IN_BSTR aPath, BSTR aFilter, BSTR aFlags, IGuestDirectory **aDirectory)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::DirectoryQueryInfo(IN_BSTR aPath, IGuestFsObjInfo **aInfo)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::DirectoryRemove(IN_BSTR aPath)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::DirectoryRemoveRecursive(IN_BSTR aPath, ComSafeArrayIn(DirectoryRemoveRecFlag, aFlags), IProgress **aProgress)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::DirectoryRename(IN_BSTR aSource, BSTR aDest, ComSafeArrayIn(PathRenameFlag, aFlags))
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::DirectorySetACL(IN_BSTR aPath, BSTR aACL)
 {
 #ifndef VBOX_WITH_GUEST_CONTROL
@@ -422,137 +442,137 @@
 }
 
-STDMETHODIMP GuestSession::EnvironmentSet(BSTR aName, BSTR aValue)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::EnvironmentSetArray(ComSafeArrayIn(BSTR, aValues))
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::EnvironmentUnset(BSTR aName)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::FileCreateTemp(BSTR aTemplate, ULONG aMode, BSTR aName, IGuestFile **aFile)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::FileExists(BSTR aPath, BOOL *aExists)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::FileOpen(BSTR aPath, BSTR aOpenMode, BSTR aDisposition, ULONG aCreationMode, LONG64 aOffset, IGuestFile **aFile)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::FileQueryInfo(BSTR aPath, IGuestFsObjInfo **aInfo)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::FileQuerySize(BSTR aPath, LONG64 *aSize)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::FileRemove(BSTR aPath)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::FileRename(BSTR aSource, BSTR aDest, ComSafeArrayIn(PathRenameFlag, aFlags))
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::FileSetACL(BSTR aPath, BSTR aACL)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::ProcessCreate(BSTR aCommand, ComSafeArrayIn(BSTR, aArguments), ComSafeArrayIn(BSTR, aEnvironment),
+STDMETHODIMP GuestSession::EnvironmentSet(IN_BSTR aName, BSTR aValue)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::EnvironmentSetArray(ComSafeArrayIn(IN_BSTR, aValues))
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::EnvironmentUnset(IN_BSTR aName)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::FileCreateTemp(IN_BSTR aTemplate, ULONG aMode, BSTR aName, IGuestFile **aFile)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::FileExists(IN_BSTR aPath, BOOL *aExists)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::FileOpen(IN_BSTR aPath, BSTR aOpenMode, BSTR aDisposition, ULONG aCreationMode, LONG64 aOffset, IGuestFile **aFile)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::FileQueryInfo(IN_BSTR aPath, IGuestFsObjInfo **aInfo)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::FileQuerySize(IN_BSTR aPath, LONG64 *aSize)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::FileRemove(IN_BSTR aPath)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::FileRename(IN_BSTR aSource, BSTR aDest, ComSafeArrayIn(PathRenameFlag, aFlags))
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::FileSetACL(IN_BSTR aPath, BSTR aACL)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::ProcessCreate(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment),
                                          ComSafeArrayIn(ProcessCreateFlag, aFlags), ULONG aTimeoutMS, IGuestProcess **IGuestProcess)
 {
@@ -567,5 +587,5 @@
 }
 
-STDMETHODIMP GuestSession::ProcessCreateEx(BSTR aCommand, ComSafeArrayIn(BSTR, aArguments), ComSafeArrayIn(BSTR, aEnvironment),
+STDMETHODIMP GuestSession::ProcessCreateEx(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment),
                                            ComSafeArrayIn(ProcessCreateFlag, aFlags), ULONG aTimeoutMS,
                                            ProcessPriority aPriority, ComSafeArrayIn(ULONG, aAffinity),
@@ -606,62 +626,62 @@
 }
 
-STDMETHODIMP GuestSession::SymlinkCreate(BSTR aSource, BSTR aTarget, SymlinkType aType)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::SymlinkExists(BSTR aSymlink, BOOL *aExists)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::SymlinkRead(BSTR aSymlink, ComSafeArrayIn(SymlinkReadFlag, aFlags), BSTR *aTarget)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::SymlinkRemoveDirectory(BSTR aPath)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestSession::SymlinkRemoveFile(BSTR aFile)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
+STDMETHODIMP GuestSession::SymlinkCreate(IN_BSTR aSource, BSTR aTarget, SymlinkType aType)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::SymlinkExists(IN_BSTR aSymlink, BOOL *aExists)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::SymlinkRead(IN_BSTR aSymlink, ComSafeArrayIn(SymlinkReadFlag, aFlags), BSTR *aTarget)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::SymlinkRemoveDirectory(IN_BSTR aPath)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+STDMETHODIMP GuestSession::SymlinkRemoveFile(IN_BSTR aFile)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    ReturnComNotImplemented();
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
