Index: /trunk/src/VBox/Main/src-client/SessionImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/SessionImpl.cpp	(revision 48298)
+++ /trunk/src/VBox/Main/src-client/SessionImpl.cpp	(revision 48299)
@@ -289,4 +289,5 @@
 
 #else  /* VBOX_COM_INPROC_API_CLIENT */
+    AssertFailed();
     return VBOX_E_INVALID_OBJECT_STATE;
 #endif /* VBOX_COM_INPROC_API_CLIENT */
@@ -322,6 +323,4 @@
     }
 
-    HRESULT rc = E_FAIL;
-
     /* query IInternalMachineControl interface */
     mControl = aMachine;
@@ -329,9 +328,12 @@
 
 #ifndef VBOX_COM_INPROC_API_CLIENT
-    rc = mConsole.createObject();
+    HRESULT rc = mConsole.createObject();
     AssertComRCReturn(rc, rc);
 
     rc = mConsole->init(aMachine, mControl, aLockType);
     AssertComRCReturn(rc, rc);
+#else
+    HRESULT rc = S_OK;
+    mRemoteMachine = aMachine;
 #endif
 
@@ -900,5 +902,6 @@
                                           BOOL aIsSetter, BSTR *aRetValue, LONG64 *aRetTimestamp, BSTR *aRetFlags)
 {
-#if defined(VBOX_WITH_GUEST_PROPS) && !defined(VBOX_COM_INPROC_API_CLIENT)
+#ifdef VBOX_WITH_GUEST_PROPS
+# ifndef VBOX_COM_INPROC_API_CLIENT
     AutoCaller autoCaller(this);
     AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
@@ -932,7 +935,15 @@
     else
         return mConsole->setGuestProperty(aName, aValue, aFlags);
-#else /* VBOX_WITH_GUEST_PROPS not defined */
+
+# else  /* VBOX_COM_INPROC_API_CLIENT */
+    /** @todo This is nonsense, non-VM API users shouldn't need to deal with this
+     *        method call, VBoxSVC should be clever enough to see that the
+     *        session doesn't have a console! */
+    return E_ACCESSDENIED;
+# endif /* VBOX_COM_INPROC_API_CLIENT */
+
+#else  /* VBOX_WITH_GUEST_PROPS */
     ReturnComNotImplemented();
-#endif /* VBOX_WITH_GUEST_PROPS not defined */
+#endif /* VBOX_WITH_GUEST_PROPS */
 }
 
@@ -998,4 +1009,5 @@
                                        aProgress);
 #else
+    AssertFailed();
     return E_NOTIMPL;
 #endif
@@ -1017,4 +1029,5 @@
     return S_OK;
 #else
+    AssertFailed();
     return E_NOTIMPL;
 #endif
@@ -1034,4 +1047,5 @@
     return mConsole->pause(aReason);
 #else
+    AssertFailed();
     return E_NOTIMPL;
 #endif
@@ -1051,4 +1065,5 @@
     return mConsole->resume(aReason);
 #else
+    AssertFailed();
     return E_NOTIMPL;
 #endif
@@ -1068,4 +1083,5 @@
     return mConsole->saveState(aReason, aProgress);
 #else
+    AssertFailed();
     return E_NOTIMPL;
 #endif
@@ -1131,4 +1147,6 @@
             mConsole.setNull();
         }
+#else
+        mRemoteMachine.setNull();
 #endif
     }
@@ -1136,7 +1154,5 @@
     {
         mRemoteMachine.setNull();
-#ifndef VBOX_COM_INPROC_API_CLIENT
         mRemoteConsole.setNull();
-#endif
     }
 
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 48298)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 48299)
@@ -5935,4 +5935,7 @@
      * silly race condition. */
 
+    /** @todo This code is bothering API clients (like python script clients) with
+     *        the AccessGuestProperty call, creating unncessary IPC.  Need to
+     *        have a way of figuring out which kind of direct session it is... */
     if (!directControl)
         rc = E_ACCESSDENIED;
