Index: /trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp	(revision 55644)
+++ /trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp	(revision 55645)
@@ -51,5 +51,11 @@
 #include <VBox/log.h>
 
+
+/*
+ * This #ifdef goes almost to the end of the file where there are a couple of
+ * IGuest method implementations.
+ */
 #ifdef VBOX_WITH_GUEST_CONTROL
+
 
 // public methods only for internal purposes
Index: /trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp	(revision 55644)
+++ /trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp	(revision 55645)
@@ -1,3 +1,2 @@
-
 /* $Id$ */
 /** @file
@@ -6,5 +5,5 @@
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -21,4 +20,7 @@
 *   Header Files                                                               *
 *******************************************************************************/
+#ifndef VBOX_WITH_GUEST_CONTROL
+# error "VBOX_WITH_GUEST_CONTROL must defined in this file"
+#endif
 #include "GuestDirectoryImpl.h"
 #include "GuestSessionImpl.h"
@@ -73,8 +75,4 @@
     AssertReturn(autoInitSpan.isOk(), E_FAIL);
 
-#ifndef VBOX_WITH_GUEST_CONTROL
-    autoInitSpan.setSucceeded();
-    return VINF_SUCCESS;
-#else
     int vrc = bindToSession(pConsole, pSession, uDirID /* Object ID */);
     if (RT_SUCCESS(vrc))
@@ -124,5 +122,4 @@
 
     return vrc;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -265,7 +262,4 @@
 HRESULT GuestDirectory::close()
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -305,12 +299,8 @@
     LogFlowThisFunc(("Returning rc=%Rrc\n", rc));
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestDirectory::read(ComPtr<IFsObjInfo> &aObjInfo)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -407,5 +397,4 @@
     LogFlowThisFunc(("Returning rc=%Rrc\n", rc));
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
+}
+
Index: /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp	(revision 55644)
+++ /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp	(revision 55645)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -20,4 +20,7 @@
 *   Header Files                                                               *
 *******************************************************************************/
+#ifndef VBOX_WITH_GUEST_CONTROL
+# error "VBOX_WITH_GUEST_CONTROL must defined in this file"
+#endif
 #include "GuestFileImpl.h"
 #include "GuestSessionImpl.h"
@@ -146,8 +149,4 @@
     AssertReturn(autoInitSpan.isOk(), VERR_OBJECT_DESTROYED);
 
-#ifndef VBOX_WITH_GUEST_CONTROL
-    autoInitSpan.setSucceeded();
-    return VINF_SUCCESS;
-#else
     int vrc = bindToSession(pConsole, pSession, uFileID /* Object ID */);
     if (RT_SUCCESS(vrc))
@@ -216,5 +215,4 @@
     LogFlowFuncLeaveRC(vrc);
     return vrc;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -232,7 +230,5 @@
     LogFlowThisFuncEnter();
 
-#ifdef VBOX_WITH_GUEST_CONTROL
     baseUninit();
-#endif
     LogFlowThisFuncLeave();
 }
@@ -243,7 +239,4 @@
 HRESULT GuestFile::getCreationMode(ULONG *aCreationMode)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -251,12 +244,8 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::getOpenAction(FileOpenAction_T *aOpenAction)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -264,24 +253,16 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::getEventSource(ComPtr<IEventSource> &aEventSource)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     /* No need to lock - lifetime constant. */
     mEventSource.queryInterfaceTo(aEventSource.asOutParam());
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::getFileName(com::Utf8Str &aFileName)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -289,12 +270,8 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::getId(ULONG *aId)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -302,12 +279,8 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::getInitialSize(LONG64 *aInitialSize)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -315,12 +288,8 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::getOffset(LONG64 *aOffset)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -328,12 +297,8 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::getAccessMode(FileAccessMode_T *aAccessMode)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -341,12 +306,8 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::getStatus(FileStatus_T *aStatus)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -356,5 +317,4 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -1224,7 +1184,4 @@
 HRESULT GuestFile::close()
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -1251,30 +1208,18 @@
     LogFlowThisFunc(("Returning rc=%Rrc\n", rc));
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::queryInfo(ComPtr<IFsObjInfo> &aObjInfo)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
     ReturnComNotImplemented();
-#else
+}
+
+HRESULT GuestFile::querySize(LONG64 *aSize)
+{
     ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-HRESULT GuestFile::querySize(LONG64 *aSize)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::read(ULONG aToRead, ULONG aTimeoutMS, std::vector<BYTE> &aData)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     if (aToRead == 0)
         return setError(E_INVALIDARG, tr("The size to read is zero"));
@@ -1309,12 +1254,8 @@
     LogFlowFuncLeaveRC(vrc);
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 HRESULT GuestFile::readAt(LONG64 aOffset, ULONG aToRead, ULONG aTimeoutMS, std::vector<BYTE> &aData)
 
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     if (aToRead == 0)
         return setError(E_INVALIDARG, tr("The size to read is zero"));
@@ -1348,12 +1289,8 @@
     LogFlowFuncLeaveRC(vrc);
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::seek(LONG64 aOffset, FileSeekOrigin_T aWhence, LONG64 *aNewOffset)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -1399,30 +1336,18 @@
     LogFlowFuncLeaveRC(vrc);
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::setACL(const com::Utf8Str &aAcl, ULONG aMode)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
     ReturnComNotImplemented();
-#else
+}
+
+HRESULT GuestFile::setSize(LONG64 aSize)
+{
     ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-HRESULT GuestFile::setSize(LONG64 aSize)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFile::write(const std::vector<BYTE> &aData, ULONG aTimeoutMS, ULONG *aWritten)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -1447,5 +1372,4 @@
     LogFlowFuncLeaveRC(vrc);
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -1453,7 +1377,4 @@
 
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -1478,5 +1399,4 @@
     LogFlowFuncLeaveRC(vrc);
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
+}
+
Index: /trunk/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp	(revision 55644)
+++ /trunk/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp	(revision 55645)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2012-2014 Oracle Corporation
+ * Copyright (C) 2012-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -20,4 +20,7 @@
 *   Header Files                                                               *
 *******************************************************************************/
+#ifndef VBOX_WITH_GUEST_CONTROL
+# error "VBOX_WITH_GUEST_CONTROL must defined in this file"
+#endif
 #include "GuestFsObjInfoImpl.h"
 #include "GuestCtrlImplPrivate.h"
@@ -92,48 +95,28 @@
 HRESULT GuestFsObjInfo::getAccessTime(LONG64 *aAccessTime)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aAccessTime = mData.mAccessTime;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getAllocatedSize(LONG64 *aAllocatedSize)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aAllocatedSize = mData.mAllocatedSize;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getBirthTime(LONG64 *aBirthTime)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aBirthTime = mData.mBirthTime;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getChangeTime(LONG64 *aChangeTime)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aChangeTime = mData.mChangeTime;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -142,179 +125,105 @@
 HRESULT GuestFsObjInfo::getDeviceNumber(ULONG *aDeviceNumber)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aDeviceNumber = mData.mDeviceNumber;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getFileAttributes(com::Utf8Str &aFileAttributes)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     aFileAttributes = mData.mFileAttrs;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getGenerationId(ULONG *aGenerationId)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aGenerationId = mData.mGenerationID;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getGID(ULONG *aGID)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aGID = mData.mGID;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getGroupName(com::Utf8Str &aGroupName)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     aGroupName = mData.mGroupName;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getHardLinks(ULONG *aHardLinks)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aHardLinks = mData.mNumHardLinks;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getModificationTime(LONG64 *aModificationTime)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aModificationTime = mData.mModificationTime;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getName(com::Utf8Str &aName)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     aName = mData.mName;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getNodeId(LONG64 *aNodeId)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aNodeId = mData.mNodeID;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getNodeIdDevice(ULONG *aNodeIdDevice)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aNodeIdDevice = mData.mNodeIDDevice;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getObjectSize(LONG64 *aObjectSize)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aObjectSize = mData.mObjectSize;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getType(FsObjType_T *aType)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aType = mData.mType;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getUID(ULONG *aUID)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aUID = mData.mUID;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getUserFlags(ULONG *aUserFlags)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     *aUserFlags = mData.mUserFlags;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestFsObjInfo::getUserName(com::Utf8Str &aUserName)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     aUserName = mData.mUserName;
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
+}
+
Index: /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp	(revision 55644)
+++ /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp	(revision 55645)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -28,4 +28,7 @@
 *   Header Files                                                               *
 *******************************************************************************/
+#ifndef VBOX_WITH_GUEST_CONTROL
+# error "VBOX_WITH_GUEST_CONTROL must defined in this file"
+#endif
 #include "GuestProcessImpl.h"
 #include "GuestSessionImpl.h"
@@ -175,8 +178,4 @@
     AssertReturn(autoInitSpan.isOk(), VERR_OBJECT_DESTROYED);
 
-#ifndef VBOX_WITH_GUEST_CONTROL
-    autoInitSpan.setSucceeded();
-    return VINF_SUCCESS;
-#else
     HRESULT hr;
 
@@ -254,5 +253,4 @@
     autoInitSpan.setFailed();
     return vrc;
-#endif
 }
 
@@ -268,5 +266,4 @@
         return;
 
-#ifdef VBOX_WITH_GUEST_CONTROL
     LogFlowThisFunc(("mExe=%s, PID=%RU32\n", mData.mProcess.mExecutable.c_str(), mData.mPID));
 
@@ -287,5 +284,4 @@
     LogFlowThisFunc(("Returning rc=%Rrc, guestRc=%Rrc\n",
                      vrc, guestRc));
-#endif
 }
 
@@ -294,7 +290,4 @@
 HRESULT GuestProcess::getArguments(std::vector<com::Utf8Str> &aArguments)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -302,5 +295,4 @@
     aArguments = mData.mProcess.mArguments;
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -339,7 +331,4 @@
 HRESULT GuestProcess::getEventSource(ComPtr<IEventSource> &aEventSource)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -349,12 +338,8 @@
     LogFlowThisFuncLeave();
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestProcess::getExecutablePath(com::Utf8Str &aExecutablePath)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -364,12 +349,8 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestProcess::getExitCode(LONG *aExitCode)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -379,12 +360,8 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestProcess::getName(com::Utf8Str &aName)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -394,12 +371,8 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestProcess::getPID(ULONG *aPID)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -409,12 +382,8 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestProcess::getStatus(ProcessStatus_T *aStatus)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -424,5 +393,4 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -1756,7 +1724,4 @@
 HRESULT GuestProcess::read(ULONG aHandle, ULONG aToRead, ULONG aTimeoutMS, std::vector<BYTE> &aData)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -1797,13 +1762,8 @@
     LogFlowFuncLeaveRC(vrc);
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestProcess::terminate()
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     HRESULT hr = S_OK;
 
@@ -1842,5 +1802,4 @@
     LogFlowFuncLeaveRC(vrc);
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -1849,8 +1808,4 @@
                               ProcessWaitResult_T *aReason)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     /*
      * Note: Do not hold any locks here while waiting!
@@ -1887,5 +1842,4 @@
     LogFlowFuncLeaveRC(vrc);
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -1893,7 +1847,4 @@
                                    ULONG aTimeoutMS, ProcessWaitResult_T *aReason)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     /*
      * Note: Do not hold any locks here while waiting!
@@ -1904,5 +1855,4 @@
 
     return WaitFor(fWaitFor, aTimeoutMS, aReason);
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -1910,7 +1860,4 @@
                             ULONG aTimeoutMS, ULONG *aWritten)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -1943,5 +1890,4 @@
     LogFlowFuncLeaveRC(vrc);
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -1949,7 +1895,4 @@
                                  const std::vector<BYTE> &aData, ULONG aTimeoutMS, ULONG *aWritten)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -1962,5 +1905,4 @@
 
     return write(aHandle, fWrite, aData, aTimeoutMS, aWritten);
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
Index: /trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 55644)
+++ /trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 55645)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2012-2014 Oracle Corporation
+ * Copyright (C) 2012-2015 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -21,4 +21,7 @@
 *******************************************************************************/
 #include "GuestImpl.h"
+#ifndef VBOX_WITH_GUEST_CONTROL
+# error "VBOX_WITH_GUEST_CONTROL must defined in this file"
+#endif
 #include "GuestSessionImpl.h"
 #include "GuestCtrlImplPrivate.h"
@@ -177,8 +180,4 @@
     AssertReturn(autoInitSpan.isOk(), VERR_OBJECT_DESTROYED);
 
-#ifndef VBOX_WITH_GUEST_CONTROL
-    autoInitSpan.setSucceeded();
-    return VINF_SUCCESS;
-#else
     AssertPtrReturn(pGuest, VERR_INVALID_POINTER);
 
@@ -264,5 +263,4 @@
                  mData.mSession.mName.c_str(), mData.mSession.mID, mData.mSession.mIsInternal, rc));
     return rc;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -282,5 +280,4 @@
     int rc = VINF_SUCCESS;
 
-#ifdef VBOX_WITH_GUEST_CONTROL
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -333,5 +330,5 @@
 
     baseUninit();
-#endif /* VBOX_WITH_GUEST_CONTROL */
+
     LogFlowFuncLeaveRC(rc);
 }
@@ -342,8 +339,4 @@
 HRESULT GuestSession::getUser(com::Utf8Str &aUser)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     LogFlowThisFuncEnter();
 
@@ -354,12 +347,8 @@
     LogFlowThisFuncLeave();
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getDomain(com::Utf8Str &aDomain)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -370,12 +359,8 @@
     LogFlowThisFuncLeave();
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getName(com::Utf8Str &aName)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -386,12 +371,8 @@
     LogFlowThisFuncLeave();
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getId(ULONG *aId)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -402,12 +383,8 @@
     LogFlowThisFuncLeave();
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getStatus(GuestSessionStatus_T *aStatus)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -418,12 +395,8 @@
     LogFlowThisFuncLeave();
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getTimeout(ULONG *aTimeout)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -434,12 +407,8 @@
     LogFlowThisFuncLeave();
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::setTimeout(ULONG aTimeout)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -450,12 +419,8 @@
     LogFlowThisFuncLeave();
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getProtocolVersion(ULONG *aProtocolVersion)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -466,12 +431,8 @@
     LogFlowThisFuncLeave();
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getEnvironmentChanges(std::vector<com::Utf8Str> &aEnvironmentChanges)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -482,12 +443,8 @@
     LogFlowFuncLeaveRC(vrc);
     return Global::vboxStatusCodeToCOM(vrc);
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::setEnvironmentChanges(const std::vector<com::Utf8Str> &aEnvironmentChanges)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -499,12 +456,8 @@
     LogFlowFuncLeaveRC(vrc);
     return Global::vboxStatusCodeToCOM(vrc);
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getEnvironmentBase(std::vector<com::Utf8Str> &aEnvironmentBase)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -523,12 +476,8 @@
     LogFlowFuncLeave();
     return hrc;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getProcesses(std::vector<ComPtr<IGuestProcess> > &aProcesses)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -546,12 +495,8 @@
     LogFlowFunc(("mProcesses=%zu\n", aProcesses.size()));
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getPathStyle(PathStyle_T *aPathStyle)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     VBOXOSTYPE enmOsType = mParent->i_getGuestOSType();
     if (    enmOsType < VBOXOSTYPE_DOS)
@@ -571,5 +516,4 @@
     }
     return S_OK;
-#endif
 }
 
@@ -586,7 +530,4 @@
 HRESULT GuestSession::getDirectories(std::vector<ComPtr<IGuestDirectory> > &aDirectories)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -604,12 +545,8 @@
     LogFlowFunc(("mDirectories=%zu\n", aDirectories.size()));
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getFiles(std::vector<ComPtr<IGuestFile> > &aFiles)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -624,12 +561,8 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::getEventSource(ComPtr<IEventSource> &aEventSource)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -639,5 +572,4 @@
     LogFlowThisFuncLeave();
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -2458,7 +2390,4 @@
 HRESULT GuestSession::close()
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -2493,5 +2422,4 @@
 
     return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -2506,8 +2434,4 @@
                                         ComPtr<IProgress> &aProgress)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     LogFlowThisFuncEnter();
 
@@ -2549,5 +2473,4 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -2555,8 +2478,4 @@
                                       const std::vector<FileCopyFlag_T> &aFlags, ComPtr<IProgress> &aProgress)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
     LogFlowThisFuncEnter();
 
@@ -2601,5 +2520,4 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -2625,7 +2543,4 @@
                                       const std::vector<DirectoryCreateFlag_T> &aFlags)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -2672,5 +2587,4 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -2678,7 +2592,4 @@
                                           BOOL aSecure, com::Utf8Str &aDirectory)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -2710,12 +2621,8 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::directoryExists(const com::Utf8Str &aPath, BOOL aFollowSymlinks, BOOL *aExists)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -2747,5 +2654,4 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -2753,7 +2659,4 @@
                                     const std::vector<DirectoryOpenFlag_T> &aFlags, ComPtr<IGuestDirectory> &aDirectory)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -2808,12 +2711,8 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::directoryRemove(const com::Utf8Str &aPath)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -2851,5 +2750,4 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -2857,7 +2755,4 @@
                                                ComPtr<IProgress> &aProgress)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -2919,12 +2814,8 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::environmentScheduleSet(const com::Utf8Str &aName, const com::Utf8Str &aValue)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -2949,12 +2840,8 @@
     LogFlowThisFuncLeave();
     return hrc;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::environmentScheduleUnset(const com::Utf8Str &aName)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
     HRESULT hrc;
@@ -2978,12 +2865,8 @@
     LogFlowThisFuncLeave();
     return hrc;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::environmentGetBaseVariable(const com::Utf8Str &aName, com::Utf8Str &aValue)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
     HRESULT hrc;
@@ -3014,12 +2897,8 @@
     LogFlowThisFuncLeave();
     return hrc;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::environmentDoesBaseVariableExist(const com::Utf8Str &aName, BOOL *aExists)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
     *aExists = FALSE;
@@ -3048,5 +2927,4 @@
     LogFlowThisFuncLeave();
     return hrc;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -3054,19 +2932,9 @@
                                      ComPtr<IGuestFile> &aFile)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
     ReturnComNotImplemented();
-#else
-    LogFlowThisFuncEnter();
-
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::fileExists(const com::Utf8Str &aPath, BOOL aFollowSymlinks, BOOL *aExists)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -3104,5 +2972,4 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -3110,10 +2977,6 @@
                                ULONG aCreationMode, ComPtr<IGuestFile> &aFile)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
     return fileOpenEx(aPath, aAccessMode, aOpenAction, FileSharingMode_All, aCreationMode, 0 /* aOffset */, aFile);
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -3121,7 +2984,4 @@
                                  FileSharingMode_T aSharingMode, ULONG aCreationMode, LONG64 aOffset, ComPtr<IGuestFile> &aFile)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -3213,12 +3073,8 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::fileQuerySize(const com::Utf8Str &aPath, BOOL aFollowSymlinks, LONG64 *aSize)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -3247,12 +3103,8 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::fsObjExists(const com::Utf8Str &aPath, BOOL aFollowSymlinks, BOOL *aExists)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -3280,12 +3132,8 @@
     LogFlowThisFuncLeave();
     return hrc;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::fsObjQueryInfo(const com::Utf8Str &aPath, BOOL aFollowSymlinks, ComPtr<IGuestFsObjInfo> &aInfo)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -3318,12 +3166,8 @@
     LogFlowThisFuncLeave();
     return hrc;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::fsObjRemove(const com::Utf8Str &aPath)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -3351,5 +3195,4 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -3358,7 +3201,4 @@
                                   const std::vector<FsObjRenameFlag_T> &aFlags)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -3413,5 +3253,4 @@
 
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -3433,7 +3272,4 @@
                                     ULONG aTimeoutMS, ComPtr<IGuestProcess> &aGuestProcess)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -3442,5 +3278,4 @@
     return processCreateEx(aExecutable, aArguments, aEnvironment, aFlags, aTimeoutMS, ProcessPriority_Default,
                            affinityIgnored, aGuestProcess);
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -3451,7 +3286,4 @@
                                       ComPtr<IGuestProcess> &aGuestProcess)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -3552,5 +3384,4 @@
     LogFlowFuncLeaveRC(vrc);
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -3558,7 +3389,4 @@
 
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFunc(("PID=%RU32\n", aPid));
 
@@ -3582,28 +3410,15 @@
     LogFlowThisFunc(("aProcess=%p, hr=%Rhrc\n", (IGuestProcess*)aGuestProcess, hr));
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::symlinkCreate(const com::Utf8Str &aSource, const com::Utf8Str &aTarget, SymlinkType_T aType)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
     ReturnComNotImplemented();
-#else
-    LogFlowThisFuncEnter();
-
+}
+
+HRESULT GuestSession::symlinkExists(const com::Utf8Str &aSymlink, BOOL *aExists)
+
+{
     ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-HRESULT GuestSession::symlinkExists(const com::Utf8Str &aSymlink, BOOL *aExists)
-
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    LogFlowThisFuncEnter();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -3611,18 +3426,9 @@
                                   com::Utf8Str &aTarget)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
     ReturnComNotImplemented();
-#else
-    LogFlowThisFuncEnter();
-
-    ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
 HRESULT GuestSession::waitFor(ULONG aWaitFor, ULONG aTimeoutMS, GuestSessionWaitResult_T *aReason)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -3661,5 +3467,4 @@
     LogFlowFuncLeaveRC(vrc);
     return hr;
-#endif /* VBOX_WITH_GUEST_CONTROL */
 }
 
@@ -3667,7 +3472,4 @@
                                    GuestSessionWaitResult_T *aReason)
 {
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
     LogFlowThisFuncEnter();
 
@@ -3680,5 +3482,4 @@
 
     return WaitFor(fWaitFor, aTimeoutMS, aReason);
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
+}
+
