Index: /trunk/include/VBox/err.h
===================================================================
--- /trunk/include/VBox/err.h	(revision 29344)
+++ /trunk/include/VBox/err.h	(revision 29345)
@@ -80,4 +80,8 @@
 /** Too many VCPUs. */
 #define VERR_TOO_MANY_CPUS                  (-1019)
+/** The service was disabled on the host.
+ * Returned by pfnInit in VBoxService to indicated a non-fatal error that
+ * should results in the particular service being disabled. */
+#define VERR_SERVICE_DISABLED               (-1020)
 /** @} */
 
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp	(revision 29344)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp	(revision 29345)
@@ -310,27 +310,5 @@
             if (RT_FAILURE(rc))
             {
-                /*
-                 * HACK ALERT! If a service uses some sort of functionality (like a
-                 * certain HGCM host service which is not available on the host or
-                 * some special OS feature which is not available on the current guest),
-                 * just disable that service here in case the service told us so.
-                 *
-                 * This prevents terminating the whole VBoxService if a (or some) sub service(s) is/are
-                 * not available.
-                 */
-
-                /** @todo r=bird: This a generic thing that isn't necessarily restricted to
-                 *        HGCM.  Also, the service knows best whether a host service is required
-                 *        or optional.  So, there service should either have a way of signalling
-                 *        non-fatal init failure, or simply quietly pretend to work.  (Low
-                 *        prio.) */
-                if (   rc == VERR_NOT_SUPPORTED
-                    || rc == VERR_NOT_IMPLEMENTED)
-                {
-                    VBoxServiceVerbose(0, "Service '%s' disabled because a certain functionality is not implemented or supported, rc=%Rrc\n",
-                                       g_aServices[j].pDesc->pszName, rc);
-                    g_aServices[j].fEnabled = false;
-                }
-                else
+                if (rc != VERR_SERVICE_DISABLED)
                 {
                     VBoxServiceError("Service '%s' failed to initialize: %Rrc\n",
@@ -338,4 +316,8 @@
                     return rc;
                 }
+                g_aServices[j].fEnabled = false;
+                VBoxServiceVerbose(0, "Service '%s' was disabled because of missing functionality\n",
+                                   g_aServices[j].pDesc->pszName);
+
             }
         }
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp	(revision 29344)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp	(revision 29345)
@@ -267,18 +267,25 @@
             g_cMemBalloonChunks = cNewChunks;
     }
-    else
-    {
-        if (rc == VERR_INVALID_PARAMETER) /* Host service is not available. */
+    if (RT_FAILURE(rc))
+    {
+        /* If the service was not found, we disable this service without
+           causing VBoxService to fail. */
+        if (   rc == VERR_NOT_IMPLEMENTED
+#ifdef RT_OS_WINDOWS /** @todo r=bird: Windows kernel driver should return VERR_NOT_IMPLEMENTED,
+                      *  VERR_INVALID_PARAMETER has too many other uses. */
+            || rc == VERR_INVALID_PARAMETER
+#endif
+            )
+        {
             VBoxServiceVerbose(0, "MemBalloon: Memory ballooning support is not available\n");
+            rc = VERR_SERVICE_DISABLED;
+        }
         else
+        {
             VBoxServiceVerbose(3, "MemBalloon: VbglR3MemBalloonRefresh failed with %Rrc\n", rc);
+            rc = VERR_SERVICE_DISABLED; /** @todo Playing safe for now, figure out the exact status codes here. */
+        }
         RTSemEventMultiDestroy(g_MemBalloonEvent);
         g_MemBalloonEvent = NIL_RTSEMEVENTMULTI;
-
-        /* 
-         * Not having the guest control service on the host renders this whole service
-         * unusable, so report that we are not able to continue. 
-         */
-        rc = VERR_NOT_SUPPORTED;
     }
 
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp	(revision 29344)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp	(revision 29345)
@@ -89,16 +89,15 @@
     else
     {
+        /* If the service was not found, we disable this service without
+           causing VBoxService to fail. */
         if (rc == VERR_HGCM_SERVICE_NOT_FOUND) /* Host service is not available. */
+        {
             VBoxServiceVerbose(0, "Control: Guest control service is not available\n");
+            rc = VERR_SERVICE_DISABLED;
+        }
         else
             VBoxServiceError("Control: Failed to connect to the guest control service! Error: %Rrc\n", rc);
         RTSemEventMultiDestroy(g_hControlEvent);
         g_hControlEvent = NIL_RTSEMEVENTMULTI;
-
-        /* 
-         * Not having the guest control service on the host renders this whole service
-         * unusable, so report that we are not able to continue. 
-         */
-        rc = VERR_NOT_SUPPORTED;
     }
     return rc;
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp	(revision 29344)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp	(revision 29345)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2010 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -135,5 +135,5 @@
         {
             VBoxServiceVerbose(3, "VBoxStatsInit: NTDLL.NtQuerySystemInformation not found!\n");
-            return VERR_NOT_IMPLEMENTED;
+            return VERR_SERVICE_DISABLED;
         }
     }
@@ -150,5 +150,5 @@
             /** @todo Now fails in NT4; do we care? */
             VBoxServiceVerbose(3, "VBoxStatsInit: KERNEL32.GlobalMemoryStatusEx not found!\n");
-            return VERR_NOT_IMPLEMENTED;
+            return VERR_SERVICE_DISABLED;
         }
     }
Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp	(revision 29344)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp	(revision 29345)
@@ -108,6 +108,6 @@
 
 #ifdef RT_OS_WINDOWS
-    /** @todo Use RTLdr instead of LoadLibrary/GetProcAddress here! */
-
+    /** @todo r=bird: call a windows specific init function and move
+     *        g_pfnWTSGetActiveConsoleSessionId out of the global scope.  */
     /* Get function pointers. */
     HMODULE hKernel32 = LoadLibrary("kernel32");
@@ -124,16 +124,15 @@
     else
     {
+        /* If the service was not found, we disable this service without
+           causing VBoxService to fail. */
         if (rc == VERR_HGCM_SERVICE_NOT_FOUND) /* Host service is not available. */
-            VBoxServiceVerbose(0, "VMInfo: Guest property service is not available\n");
+        {
+            VBoxServiceVerbose(0, "VMInfo: Guest property service is not available, disabling the service\n");
+            rc = VERR_SERVICE_DISABLED;
+        }
         else
             VBoxServiceError("VMInfo: Failed to connect to the guest property service! Error: %Rrc\n", rc);
         RTSemEventMultiDestroy(g_hVMInfoEvent);
         g_hVMInfoEvent = NIL_RTSEMEVENTMULTI;
-
-        /* 
-         * Not having the guest property service on the host renders this whole service
-         * unusable, so report that we are not able to continue. 
-         */
-        rc = VERR_NOT_SUPPORTED;
     }
 
@@ -142,13 +141,6 @@
         VBoxServicePropCacheCreate(&g_VMInfoPropCache, g_uVMInfoGuestPropSvcClientID);
 
-        /** @todo r=bird: Setting Net/Count to 0 here is wrong and will confuse users.
-         *        Besides, because it is the beacon updating it implies that all the
-         *        other values are up to date too, but they aren't
-         *        (VBoxServiceVMInfoWriteFixedProperties hasn't been called yet for
-         *        instance).  I would suggest changing these statements to
-         *        "declarations" or moving them. */
-
         /*
-         * Initialize some guest properties to have flags and reset values.
+         * Declare some guest properties with flags and reset values.
          */
         VBoxServicePropCacheUpdateEntry(&g_VMInfoPropCache, "/VirtualBox/GuestInfo/OS/LoggedInUsersList",
@@ -496,5 +488,5 @@
 
         /** @todo r=bird: if cInterfaces decreased compared to the previous run, zap
-         *        the stale data. */
+         *        the stale data.  This can probably be encorporated into the cache.  */
 
 
@@ -549,6 +541,6 @@
          *        terminates). [don't remove till implemented]
          */
-        /** @todo r=bird: Drop the VbglR3GuestPropDelSet call here and make the cache
-         *        remember what we've written. */
+        /** @todo r=bird: Drop the VbglR3GuestPropDelSet call here and use the cache
+         *        since it remembers what we've written. */
         /* Delete the "../Net" branch. */
         const char *apszPat[1] = { "/VirtualBox/GuestInfo/Net/*" };
