Index: /trunk/src/VBox/Main/src-server/xpcom/server.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/xpcom/server.cpp	(revision 50368)
+++ /trunk/src/VBox/Main/src-server/xpcom/server.cpp	(revision 50369)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2004-2013 Oracle Corporation
+ * Copyright (C) 2004-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -95,4 +95,12 @@
 # include "NATNetworkImpl.h"
 
+// This needs to stay - it is needed by the service registration below, and
+// is defined in the automatically generated VirtualBoxWrap.cpp
+extern nsIClassInfo *NS_CLASSINFO_NAME(VirtualBoxWrap);
+NS_DECL_CI_INTERFACE_GETTER(VirtualBoxWrap)
+
+// The declarations/implementations of the various XPCOM helper data structures
+// and functions have to be removed bit by bit, as the conversion to the
+// automatically generated wrappers makes them obsolete.
 
 /* implement nsISupports parts of our objects with support for nsIClassInfo */
@@ -834,7 +842,7 @@
         NULL, // deregistration function
         VirtualBoxClassFactory::FactoryDestructor, // factory destructor function
-        NS_CI_INTERFACE_GETTER_NAME(VirtualBox),
+        NS_CI_INTERFACE_GETTER_NAME(VirtualBoxWrap),
         NULL, // language helper
-        &NS_CLASSINFO_NAME(VirtualBox),
+        &NS_CLASSINFO_NAME(VirtualBoxWrap),
         0 // flags
     };
@@ -856,5 +864,5 @@
         }
 
-        nsCOMPtr <nsIComponentRegistrar> registrar;
+        nsCOMPtr<nsIComponentRegistrar> registrar;
         rc = NS_GetComponentRegistrar(getter_AddRefs(registrar));
         if (NS_FAILED(rc))
Index: /trunk/src/VBox/Main/src-server/xpcom/server.h
===================================================================
--- /trunk/src/VBox/Main/src-server/xpcom/server.h	(revision 50368)
+++ /trunk/src/VBox/Main/src-server/xpcom/server.h	(revision 50369)
@@ -35,16 +35,2 @@
 
 #endif /* ____H_LINUX_SERVER */
-
-/**
- * Implements NSGetInterfacesProcPtr (nsIGenericFactory.h)
- * @note: declaration in nsIGenericFactory.h asks for zeroing
- * count and array, if returning of list of interfaces isn't supported.
- */
-HRESULT VirtualBox_GetInterfacesHelper(PRUint32 *count, nsIID** *array) 
-{
-    if (count != NULL) *count = 0;
-    if (array != NULL) *array = NULL;
-
-    return S_OK;
-}
-nsIClassInfo* VirtualBox_classInfoGlobal;
Index: /trunk/src/VBox/Main/src-server/xpcom/server_module.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/xpcom/server_module.cpp	(revision 50368)
+++ /trunk/src/VBox/Main/src-server/xpcom/server_module.cpp	(revision 50369)
@@ -91,4 +91,7 @@
  *  in sync with macros used for VirtualBox in server.cpp for the same purpose.
  */
+
+NS_DECL_CLASSINFO(VirtualBoxWrap)
+NS_IMPL_CI_INTERFACE_GETTER1(VirtualBoxWrap, IVirtualBox)
 
 static nsresult vboxsvcSpawnDaemon(void)
@@ -361,8 +364,8 @@
         NULL, // destructor function
         /// @todo
-        NS_CI_INTERFACE_GETTER_NAME(VirtualBox), // interfaces function
+        NS_CI_INTERFACE_GETTER_NAME(VirtualBoxWrap), // interfaces function
         NULL, // language helper
         /// @todo
-        &NS_CLASSINFO_NAME(VirtualBox) // global class info & flags
+        &NS_CLASSINFO_NAME(VirtualBoxWrap) // global class info & flags
     }
 };
