Index: /trunk/src/VBox/Main/include/VirtualBoxImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/VirtualBoxImpl.h	(revision 50354)
+++ /trunk/src/VBox/Main/include/VirtualBoxImpl.h	(revision 50355)
@@ -21,4 +21,5 @@
 #include "VirtualBoxBase.h"
 #include "objectslist.h"
+#include "VirtualBoxWrap.h"
 
 #ifdef RT_OS_WINDOWS
@@ -58,6 +59,5 @@
 }
 class ATL_NO_VTABLE VirtualBox :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(IVirtualBox)
+    public VirtualBoxWrap
 #ifdef RT_OS_WINDOWS
     , public CComCoClass<VirtualBox, &CLSID_VirtualBox>
@@ -73,20 +73,7 @@
     friend class CallbackEvent;
 
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(VirtualBox, IVirtualBox)
-
-    DECLARE_CLASSFACTORY_SINGLETON(VirtualBox)
-
-    DECLARE_REGISTRY_RESOURCEID(IDR_VIRTUALBOX)
-    DECLARE_NOT_AGGREGATABLE(VirtualBox)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(VirtualBox)
-        VBOX_DEFAULT_INTERFACE_ENTRIES(IVirtualBox)
-    END_COM_MAP()
 
     // to postpone generation of the default ctor/dtor
-    VirtualBox();
-    ~VirtualBox();
+    DECLARE_EMPTY_CTOR_DTOR(VirtualBox)
 
     HRESULT FinalConstruct();
@@ -100,73 +87,4 @@
                       const Utf8Str &strMachineFolder);
     void uninit();
-
-    /* IVirtualBox properties */
-    STDMETHOD(COMGETTER(Version))(BSTR *aVersion);
-    STDMETHOD(COMGETTER(VersionNormalized))(BSTR *aVersionNormalized);
-    STDMETHOD(COMGETTER(Revision))(ULONG *aRevision);
-    STDMETHOD(COMGETTER(PackageType))(BSTR *aPackageType);
-    STDMETHOD(COMGETTER(APIVersion))(BSTR *aAPIVersion);
-    STDMETHOD(COMGETTER(HomeFolder))(BSTR *aHomeFolder);
-    STDMETHOD(COMGETTER(SettingsFilePath))(BSTR *aSettingsFilePath);
-    STDMETHOD(COMGETTER(Host))(IHost **aHost);
-    STDMETHOD(COMGETTER(SystemProperties))(ISystemProperties **aSystemProperties);
-    STDMETHOD(COMGETTER(Machines))(ComSafeArrayOut(IMachine *, aMachines));
-    STDMETHOD(COMGETTER(MachineGroups))(ComSafeArrayOut(BSTR, aMachineGroups));
-    STDMETHOD(COMGETTER(HardDisks))(ComSafeArrayOut(IMedium *, aHardDisks));
-    STDMETHOD(COMGETTER(DVDImages))(ComSafeArrayOut(IMedium *, aDVDImages));
-    STDMETHOD(COMGETTER(FloppyImages))(ComSafeArrayOut(IMedium *, aFloppyImages));
-    STDMETHOD(COMGETTER(ProgressOperations))(ComSafeArrayOut(IProgress *, aOperations));
-    STDMETHOD(COMGETTER(GuestOSTypes))(ComSafeArrayOut(IGuestOSType *, aGuestOSTypes));
-    STDMETHOD(COMGETTER(SharedFolders))(ComSafeArrayOut(ISharedFolder *, aSharedFolders));
-    STDMETHOD(COMGETTER(PerformanceCollector))(IPerformanceCollector **aPerformanceCollector);
-    STDMETHOD(COMGETTER(DHCPServers))(ComSafeArrayOut(IDHCPServer *, aDHCPServers));
-    STDMETHOD(COMGETTER(NATNetworks))(ComSafeArrayOut(INATNetwork *, aNATNetworks));
-    STDMETHOD(COMGETTER(EventSource))(IEventSource ** aEventSource);
-    STDMETHOD(COMGETTER(ExtensionPackManager))(IExtPackManager **aExtPackManager);
-    STDMETHOD(COMGETTER(InternalNetworks))(ComSafeArrayOut(BSTR, aInternalNetworks));
-    STDMETHOD(COMGETTER(GenericNetworkDrivers))(ComSafeArrayOut(BSTR, aGenericNetworkDrivers));
-
-    /* IVirtualBox methods */
-    STDMETHOD(ComposeMachineFilename)(IN_BSTR aName, IN_BSTR aGroup, IN_BSTR aCreateFlags, IN_BSTR aBaseFolder, BSTR *aFilename);
-    STDMETHOD(CreateMachine)(IN_BSTR aSettingsFile,
-                             IN_BSTR aName,
-                             ComSafeArrayIn(IN_BSTR, aGroups),
-                             IN_BSTR aOsTypeId,
-                             IN_BSTR aCreateFlags,
-                             IMachine **aMachine);
-    STDMETHOD(OpenMachine)(IN_BSTR aSettingsFile, IMachine **aMachine);
-    STDMETHOD(RegisterMachine)(IMachine *aMachine);
-    STDMETHOD(FindMachine)(IN_BSTR aNameOrId, IMachine **aMachine);
-    STDMETHOD(GetMachinesByGroups)(ComSafeArrayIn(IN_BSTR, aGroups), ComSafeArrayOut(IMachine *, aMachines));
-    STDMETHOD(GetMachineStates)(ComSafeArrayIn(IMachine *, aMachines), ComSafeArrayOut(MachineState_T, aStates));
-    STDMETHOD(CreateAppliance)(IAppliance **anAppliance);
-
-    STDMETHOD(CreateHardDisk)(IN_BSTR aFormat,
-                              IN_BSTR aLocation,
-                              IMedium **aHardDisk);
-    STDMETHOD(OpenMedium)(IN_BSTR aLocation,
-                          DeviceType_T deviceType,
-                          AccessMode_T accessMode,
-                          BOOL fForceNewUuid,
-                          IMedium **aMedium);
-
-    STDMETHOD(GetGuestOSType)(IN_BSTR aId, IGuestOSType **aType);
-    STDMETHOD(CreateSharedFolder)(IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable, BOOL aAutoMount);
-    STDMETHOD(RemoveSharedFolder)(IN_BSTR aName);
-    STDMETHOD(GetExtraDataKeys)(ComSafeArrayOut(BSTR, aKeys));
-    STDMETHOD(GetExtraData)(IN_BSTR aKey, BSTR *aValue);
-    STDMETHOD(SetExtraData)(IN_BSTR aKey, IN_BSTR aValue);
-    STDMETHOD(SetSettingsSecret)(IN_BSTR aKey);
-
-    STDMETHOD(CreateDHCPServer)(IN_BSTR aName, IDHCPServer ** aServer);
-    STDMETHOD(FindDHCPServerByNetworkName)(IN_BSTR aName, IDHCPServer ** aServer);
-    STDMETHOD(RemoveDHCPServer)(IDHCPServer * aServer);
-
-    STDMETHOD(CreateNATNetwork)(IN_BSTR aName, INATNetwork ** aNATNetworks);
-    STDMETHOD(FindNATNetworkByName)(IN_BSTR aName, INATNetwork ** aNATNetworks);
-    STDMETHOD(RemoveNATNetwork)(INATNetwork * aNATNetwork);
-
-    STDMETHOD(CheckFirmwarePresent)(FirmwareType_T aFirmwareType, IN_BSTR aVersion,
-                                    BSTR * aUrl, BSTR * aFile, BOOL * aResult);
 
     /* public methods only for internal purposes */
@@ -182,187 +100,261 @@
 
 #ifdef DEBUG
-    void dumpAllBackRefs();
-#endif
-
-    HRESULT postEvent(Event *event);
-
-    HRESULT addProgress(IProgress *aProgress);
-    HRESULT removeProgress(IN_GUID aId);
+    void i_dumpAllBackRefs();
+#endif
+
+    HRESULT i_postEvent(Event *event);
+
+    HRESULT i_addProgress(IProgress *aProgress);
+    HRESULT i_removeProgress(IN_GUID aId);
 
 #ifdef RT_OS_WINDOWS
     typedef DECLCALLBACKPTR(HRESULT, SVCHelperClientFunc)
         (SVCHlpClient *aClient, Progress *aProgress, void *aUser, int *aVrc);
-    HRESULT startSVCHelperClient(bool aPrivileged,
-                                 SVCHelperClientFunc aFunc,
-                                 void *aUser, Progress *aProgress);
-#endif
-
-    void addProcessToReap(RTPROCESS pid);
-    void updateClientWatcher();
-
-    void onMachineStateChange(const Guid &aId, MachineState_T aState);
-    void onMachineDataChange(const Guid &aId, BOOL aTemporary = FALSE);
-    BOOL onExtraDataCanChange(const Guid &aId, IN_BSTR aKey, IN_BSTR aValue,
-                              Bstr &aError);
-    void onExtraDataChange(const Guid &aId, IN_BSTR aKey, IN_BSTR aValue);
-    void onMachineRegistered(const Guid &aId, BOOL aRegistered);
-    void onSessionStateChange(const Guid &aId, SessionState_T aState);
-
-    void onSnapshotTaken(const Guid &aMachineId, const Guid &aSnapshotId);
-    void onSnapshotDeleted(const Guid &aMachineId, const Guid &aSnapshotId);
-    void onSnapshotChange(const Guid &aMachineId, const Guid &aSnapshotId);
-    void onGuestPropertyChange(const Guid &aMachineId, IN_BSTR aName, IN_BSTR aValue,
-                               IN_BSTR aFlags);
-    void onNatRedirectChange(const Guid &aMachineId, ULONG ulSlot, bool fRemove, IN_BSTR aName,
-                                   NATProtocol_T aProto, IN_BSTR aHostIp, uint16_t aHostPort,
-                                   IN_BSTR aGuestIp, uint16_t aGuestPort);
-    void onNATNetworkChange(IN_BSTR aNetworkName);
-    void onNATNetworkStartStop(IN_BSTR aNetworkName, BOOL aStart);
-    void onNATNetworkSetting(IN_BSTR aNetworkName, BOOL aEnabled, IN_BSTR aNetwork,
-                             IN_BSTR aGateway, BOOL aAdvertiseDefaultIpv6RouteEnabled,
-                             BOOL fNeedDhcpServer);
-    void onNATNetworkPortForward(IN_BSTR aNetworkName, BOOL create, BOOL fIpv6,
-                                 IN_BSTR aRuleName, NATProtocol_T proto,
-                                 IN_BSTR aHostIp, LONG aHostPort,
-                                 IN_BSTR aGuestIp, LONG aGuestPort);
-    void onHostNameResolutionConfigurationChange();
-
-    int natNetworkRefInc(IN_BSTR aNetworkName);
-    int natNetworkRefDec(IN_BSTR aNetworkName);
-
-    ComObjPtr<GuestOSType> getUnknownOSType();
-
-    void getOpenedMachines(SessionMachinesList &aMachines,
+    HRESULT i_startSVCHelperClient(bool aPrivileged,
+                                   SVCHelperClientFunc aFunc,
+                                   void *aUser, Progress *aProgress);
+#endif
+
+    void i_addProcessToReap(RTPROCESS pid);
+    void i_updateClientWatcher();
+
+    void i_onMachineStateChange(const Guid &aId, MachineState_T aState);
+    void i_onMachineDataChange(const Guid &aId, BOOL aTemporary = FALSE);
+    BOOL i_onExtraDataCanChange(const Guid &aId, IN_BSTR aKey, IN_BSTR aValue,
+                                Bstr &aError);
+    void i_onExtraDataChange(const Guid &aId, IN_BSTR aKey, IN_BSTR aValue);
+    void i_onMachineRegistered(const Guid &aId, BOOL aRegistered);
+    void i_onSessionStateChange(const Guid &aId, SessionState_T aState);
+
+    void i_onSnapshotTaken(const Guid &aMachineId, const Guid &aSnapshotId);
+    void i_onSnapshotDeleted(const Guid &aMachineId, const Guid &aSnapshotId);
+    void i_onSnapshotChange(const Guid &aMachineId, const Guid &aSnapshotId);
+    void i_onGuestPropertyChange(const Guid &aMachineId, IN_BSTR aName, IN_BSTR aValue,
+                                 IN_BSTR aFlags);
+    void i_onNatRedirectChange(const Guid &aMachineId, ULONG ulSlot, bool fRemove, IN_BSTR aName,
+                                     NATProtocol_T aProto, IN_BSTR aHostIp, uint16_t aHostPort,
+                                     IN_BSTR aGuestIp, uint16_t aGuestPort);
+    void i_onNATNetworkChange(IN_BSTR aNetworkName);
+    void i_onNATNetworkStartStop(IN_BSTR aNetworkName, BOOL aStart);
+    void i_onNATNetworkSetting(IN_BSTR aNetworkName, BOOL aEnabled, IN_BSTR aNetwork,
+                               IN_BSTR aGateway, BOOL aAdvertiseDefaultIpv6RouteEnabled,
+                               BOOL fNeedDhcpServer);
+    void i_onNATNetworkPortForward(IN_BSTR aNetworkName, BOOL create, BOOL fIpv6,
+                                   IN_BSTR aRuleName, NATProtocol_T proto,
+                                   IN_BSTR aHostIp, LONG aHostPort,
+                                   IN_BSTR aGuestIp, LONG aGuestPort);
+    void i_onHostNameResolutionConfigurationChange();
+
+    int i_natNetworkRefInc(IN_BSTR aNetworkName);
+    int i_natNetworkRefDec(IN_BSTR aNetworkName);
+
+    ComObjPtr<GuestOSType> i_getUnknownOSType();
+
+    void i_getOpenedMachines(SessionMachinesList &aMachines,
                            InternalControlList *aControls = NULL);
-    MachinesOList &getMachinesList();
-
-    HRESULT findMachine(const Guid &aId,
-                        bool fPermitInaccessible,
-                        bool aSetError,
-                        ComObjPtr<Machine> *aMachine = NULL);
-    HRESULT findMachineByName(const Utf8Str &aName,
-                              bool aSetError,
-                              ComObjPtr<Machine> *aMachine = NULL);
-
-    HRESULT validateMachineGroup(const Utf8Str &aGroup, bool fPrimary);
-    HRESULT convertMachineGroups(ComSafeArrayIn(IN_BSTR, aMachineGroups), StringsList *pllMachineGroups);
-
-    HRESULT findHardDiskById(const Guid &id,
-                             bool aSetError,
-                             ComObjPtr<Medium> *aHardDisk = NULL);
-    HRESULT findHardDiskByLocation(const Utf8Str &strLocation,
+    MachinesOList &i_getMachinesList();
+
+    HRESULT i_findMachine(const Guid &aId,
+                          bool fPermitInaccessible,
+                          bool aSetError,
+                          ComObjPtr<Machine> *aMachine = NULL);
+
+    HRESULT i_findMachineByName(const Utf8Str &aName,
+                                bool aSetError,
+                                ComObjPtr<Machine> *aMachine = NULL);
+
+    HRESULT i_validateMachineGroup(const Utf8Str &aGroup, bool fPrimary);
+    HRESULT i_convertMachineGroups(const std::vector<com::Utf8Str> aMachineGroups, StringsList *pllMachineGroups);
+
+    HRESULT i_findHardDiskById(const Guid &id,
+                               bool aSetError,
+                               ComObjPtr<Medium> *aHardDisk = NULL);
+    HRESULT i_findHardDiskByLocation(const Utf8Str &strLocation,
+                                     bool aSetError,
+                                     ComObjPtr<Medium> *aHardDisk = NULL);
+    HRESULT i_findDVDOrFloppyImage(DeviceType_T mediumType,
+                                   const Guid *aId,
+                                   const Utf8Str &aLocation,
                                    bool aSetError,
-                                   ComObjPtr<Medium> *aHardDisk = NULL);
-    HRESULT findDVDOrFloppyImage(DeviceType_T mediumType,
-                                 const Guid *aId,
-                                 const Utf8Str &aLocation,
-                                 bool aSetError,
-                                 ComObjPtr<Medium> *aImage = NULL);
-    HRESULT findRemoveableMedium(DeviceType_T mediumType,
-                                 const Guid &uuid,
-                                 bool fRefresh,
-                                 bool aSetError,
-                                 ComObjPtr<Medium> &pMedium);
-
-    HRESULT findGuestOSType(const Bstr &bstrOSType,
-                            GuestOSType*& pGuestOSType);
-
-    const Guid &getGlobalRegistryId() const;
-
-    const ComObjPtr<Host>& host() const;
-    SystemProperties* getSystemProperties() const;
+                                   ComObjPtr<Medium> *aImage = NULL);
+    HRESULT i_findRemoveableMedium(DeviceType_T mediumType,
+                                   const Guid &uuid,
+                                   bool fRefresh,
+                                   bool aSetError,
+                                   ComObjPtr<Medium> &pMedium);
+
+    HRESULT i_findGuestOSType(const Bstr &bstrOSType,
+                              GuestOSType*& pGuestOSType);
+
+    const Guid &i_getGlobalRegistryId() const;
+
+    const ComObjPtr<Host>& i_host() const;
+    SystemProperties* i_getSystemProperties() const;
 #ifdef VBOX_WITH_EXTPACK
-    ExtPackManager* getExtPackManager() const;
+    ExtPackManager* i_getExtPackManager() const;
 #endif
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
-    const ComObjPtr<PerformanceCollector>& performanceCollector() const;
+    const ComObjPtr<PerformanceCollector>& i_performanceCollector() const;
 #endif /* VBOX_WITH_RESOURCE_USAGE_API */
 
-    void getDefaultMachineFolder(Utf8Str &str) const;
-    void getDefaultHardDiskFormat(Utf8Str &str) const;
+    void i_getDefaultMachineFolder(Utf8Str &str) const;
+    void i_getDefaultHardDiskFormat(Utf8Str &str) const;
 
     /** Returns the VirtualBox home directory */
-    const Utf8Str& homeDir() const;
-
-    int calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult);
-    void copyPathRelativeToConfig(const Utf8Str &strSource, Utf8Str &strTarget);
-
-    HRESULT registerMedium(const ComObjPtr<Medium> &pMedium, ComObjPtr<Medium> *ppMedium, DeviceType_T argType);
-    HRESULT unregisterMedium(Medium *pMedium);
-
-    void pushMediumToListWithChildren(MediaList &llMedia, Medium *pMedium);
-    HRESULT unregisterMachineMedia(const Guid &id);
-
-    HRESULT unregisterMachine(Machine *pMachine, const Guid &id);
-
-    void rememberMachineNameChangeForMedia(const Utf8Str &strOldConfigDir,
-                                           const Utf8Str &strNewConfigDir);
-
-    void saveMediaRegistry(settings::MediaRegistry &mediaRegistry,
-                           const Guid &uuidRegistry,
-                           const Utf8Str &strMachineFolder);
-    HRESULT saveSettings();
-
-    void markRegistryModified(const Guid &uuid);
-    void saveModifiedRegistries();
-
-    static const Bstr &getVersionNormalized();
-
-    static HRESULT ensureFilePathExists(const Utf8Str &strFileName, bool fCreate);
-
-    const Utf8Str& settingsFilePath();
-
-    AutostartDb* getAutostartDb() const;
-
-    RWLockHandle& getMachinesListLockHandle();
-    RWLockHandle& getMediaTreeLockHandle();
-
-    int  encryptSetting(const Utf8Str &aPlaintext, Utf8Str *aCiphertext);
-    int  decryptSetting(Utf8Str *aPlaintext, const Utf8Str &aCiphertext);
-    void storeSettingsKey(const Utf8Str &aKey);
-
-    bool isMediaUuidInUse(const Guid &aId, DeviceType_T deviceType);
+    const Utf8Str& i_homeDir() const;
+    int i_calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult);
+    void i_copyPathRelativeToConfig(const Utf8Str &strSource, Utf8Str &strTarget);
+    HRESULT i_registerMedium(const ComObjPtr<Medium> &pMedium, ComObjPtr<Medium> *ppMedium, DeviceType_T argType);
+    HRESULT i_unregisterMedium(Medium *pMedium);
+    void i_pushMediumToListWithChildren(MediaList &llMedia, Medium *pMedium);
+    HRESULT i_unregisterMachineMedia(const Guid &id);
+    HRESULT i_unregisterMachine(Machine *pMachine, const Guid &id);
+    void i_rememberMachineNameChangeForMedia(const Utf8Str &strOldConfigDir,
+                                             const Utf8Str &strNewConfigDir);
+    void i_saveMediaRegistry(settings::MediaRegistry &mediaRegistry,
+                             const Guid &uuidRegistry,
+                             const Utf8Str &strMachineFolder);
+    HRESULT i_saveSettings();
+    void i_markRegistryModified(const Guid &uuid);
+    void i_saveModifiedRegistries();
+    static const com::Utf8Str &i_getVersionNormalized();
+    static HRESULT i_ensureFilePathExists(const Utf8Str &strFileName, bool fCreate);
+    const Utf8Str& i_settingsFilePath();
+    AutostartDb* i_getAutostartDb() const;
+    RWLockHandle& i_getMachinesListLockHandle();
+    RWLockHandle& i_getMediaTreeLockHandle();
+    int  i_encryptSetting(const Utf8Str &aPlaintext, Utf8Str *aCiphertext);
+    int  i_decryptSetting(Utf8Str *aPlaintext, const Utf8Str &aCiphertext);
+    void i_storeSettingsKey(const Utf8Str &aKey);
+    bool i_isMediaUuidInUse(const Guid &aId, DeviceType_T deviceType);
 
 private:
     class ClientWatcher;
 
-    static HRESULT setErrorStatic(HRESULT aResultCode,
-                                  const Utf8Str &aText)
+    // wrapped IVirtualBox properties
+    HRESULT getVersion(com::Utf8Str &aVersion);
+    HRESULT getVersionNormalized(com::Utf8Str &aVersionNormalized);
+    HRESULT getRevision(ULONG *aRevision);
+    HRESULT getPackageType(com::Utf8Str &aPackageType);
+    HRESULT getAPIVersion(com::Utf8Str &aAPIVersion);
+    HRESULT getHomeFolder(com::Utf8Str &aHomeFolder);
+    HRESULT getSettingsFilePath(com::Utf8Str &aSettingsFilePath);
+    HRESULT getHost(ComPtr<IHost> &aHost);
+    HRESULT getSystemProperties(ComPtr<ISystemProperties> &aSystemProperties);
+    HRESULT getMachines(std::vector<ComPtr<IMachine> > &aMachines);
+    HRESULT getMachineGroups(std::vector<com::Utf8Str> &aMachineGroups);
+    HRESULT getHardDisks(std::vector<ComPtr<IMedium> > &aHardDisks);
+    HRESULT getDVDImages(std::vector<ComPtr<IMedium> > &aDVDImages);
+    HRESULT getFloppyImages(std::vector<ComPtr<IMedium> > &aFloppyImages);
+    HRESULT getProgressOperations(std::vector<ComPtr<IProgress> > &aProgressOperations);
+    HRESULT getGuestOSTypes(std::vector<ComPtr<IGuestOSType> > &aGuestOSTypes);
+    HRESULT getSharedFolders(std::vector<ComPtr<ISharedFolder> > &aSharedFolders);
+    HRESULT getPerformanceCollector(ComPtr<IPerformanceCollector> &aPerformanceCollector);
+    HRESULT getDHCPServers(std::vector<ComPtr<IDHCPServer> > &aDHCPServers);
+    HRESULT getNATNetworks(std::vector<ComPtr<INATNetwork> > &aNATNetworks);
+    HRESULT getEventSource(ComPtr<IEventSource> &aEventSource);
+    HRESULT getExtensionPackManager(ComPtr<IExtPackManager> &aExtensionPackManager);
+    HRESULT getInternalNetworks(std::vector<com::Utf8Str> &aInternalNetworks);
+    HRESULT getGenericNetworkDrivers(std::vector<com::Utf8Str> &aGenericNetworkDrivers);
+
+   // wrapped IVirtualBox methods
+    HRESULT composeMachineFilename(const com::Utf8Str &aName,
+                                   const com::Utf8Str &aGroup,
+                                   const com::Utf8Str &aCreateFlags,
+                                   const com::Utf8Str &aBaseFolder,
+                                   com::Utf8Str &aFile);
+    HRESULT createMachine(const com::Utf8Str &aSettingsFile,
+                          const com::Utf8Str &aName,
+                          const std::vector<com::Utf8Str> &aGroups,
+                          const com::Utf8Str &aOsTypeId,
+                          const com::Utf8Str &aFlags,
+                          ComPtr<IMachine> &aMachine);
+    HRESULT openMachine(const com::Utf8Str &aSettingsFile,
+                        ComPtr<IMachine> &aMachine);
+    HRESULT registerMachine(const ComPtr<IMachine> &aMachine);
+    HRESULT findMachine(const com::Utf8Str &aNameOrId,
+                        ComPtr<IMachine> &aMachine);
+    HRESULT getMachinesByGroups(const std::vector<com::Utf8Str> &aGroups,
+                                std::vector<ComPtr<IMachine> > &aMachines);
+    HRESULT getMachineStates(const std::vector<ComPtr<IMachine> > &aMachines,
+                             std::vector<MachineState_T> &aStates);
+    HRESULT createAppliance(ComPtr<IAppliance> &aAppliance);
+    HRESULT createHardDisk(const com::Utf8Str &aFormat,
+                           const com::Utf8Str &aLocation,
+                           ComPtr<IMedium> &aMedium);
+    HRESULT openMedium(const com::Utf8Str &aLocation,
+                       DeviceType_T aDeviceType,
+                       AccessMode_T aAccessMode,
+                       BOOL aForceNewUuid,
+                       ComPtr<IMedium> &aMedium);
+    HRESULT getGuestOSType(const com::Guid &aId,
+                           ComPtr<IGuestOSType> &aType);
+    HRESULT createSharedFolder(const com::Utf8Str &aName,
+                               const com::Utf8Str &aHostPath,
+                               BOOL aWritable,
+                               BOOL aAutomount);
+    HRESULT removeSharedFolder(const com::Utf8Str &aName);
+    HRESULT getExtraDataKeys(std::vector<com::Utf8Str> &aKeys);
+    HRESULT getExtraData(const com::Utf8Str &aKey,
+                         com::Utf8Str &aValue);
+    HRESULT setExtraData(const com::Utf8Str &aKey,
+                         const com::Utf8Str &aValue);
+    HRESULT setSettingsSecret(const com::Utf8Str &aPassword);
+    HRESULT createDHCPServer(const com::Utf8Str &aName,
+                             ComPtr<IDHCPServer> &aServer);
+    HRESULT findDHCPServerByNetworkName(const com::Utf8Str &aName,
+                                        ComPtr<IDHCPServer> &aServer);
+    HRESULT removeDHCPServer(const ComPtr<IDHCPServer> &aServer);
+    HRESULT createNATNetwork(const com::Utf8Str &aNetworkName,
+                             ComPtr<INATNetwork> &aNetwork);
+    HRESULT findNATNetworkByName(const com::Utf8Str &aNetworkName,
+                                 ComPtr<INATNetwork> &aNetwork);
+    HRESULT removeNATNetwork(const ComPtr<INATNetwork> &aNetwork);
+    HRESULT checkFirmwarePresent(FirmwareType_T aFirmwareType,
+                                 const com::Utf8Str &aVersion,
+                                 com::Utf8Str &aUrl,
+                                 com::Utf8Str &aFile,
+                                 BOOL *aResult);
+
+    static HRESULT i_setErrorStatic(HRESULT aResultCode,
+                                    const Utf8Str &aText)
     {
         return setErrorInternal(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, false, true);
     }
 
-    HRESULT registerMachine(Machine *aMachine);
-
-    HRESULT registerDHCPServer(DHCPServer *aDHCPServer,
-                               bool aSaveRegistry = true);
-    HRESULT unregisterDHCPServer(DHCPServer *aDHCPServer,
+    HRESULT i_registerMachine(Machine *aMachine);
+    HRESULT i_registerDHCPServer(DHCPServer *aDHCPServer,
                                  bool aSaveRegistry = true);
-    HRESULT registerNATNetwork(NATNetwork *aNATNetwork,
-                               bool aSaveRegistry = true);
-    HRESULT unregisterNATNetwork(NATNetwork *aNATNetwork,
+    HRESULT i_unregisterDHCPServer(DHCPServer *aDHCPServer,
+                                   bool aSaveRegistry = true);
+    HRESULT i_registerNATNetwork(NATNetwork *aNATNetwork,
                                  bool aSaveRegistry = true);
-    HRESULT checkMediaForConflicts(const Guid &aId,
-                                   const Utf8Str &aLocation,
-                                   Utf8Str &aConflictType,
-                                   ComObjPtr<Medium> *pDupMedium);
-
-    int  decryptSettings();
-    int  decryptMediumSettings(Medium *pMedium);
-    int  decryptSettingBytes(uint8_t *aPlaintext, const uint8_t *aCiphertext,
-                             size_t aCiphertextSize) const;
-    int  encryptSettingBytes(const uint8_t *aPlaintext, uint8_t *aCiphertext,
-                             size_t aPlaintextSize, size_t aCiphertextSize) const;
+    HRESULT i_unregisterNATNetwork(NATNetwork *aNATNetwork,
+                                   bool aSaveRegistry = true);
+    HRESULT i_checkMediaForConflicts(const Guid &aId,
+                                     const Utf8Str &aLocation,
+                                     Utf8Str &aConflictType,
+                                     ComObjPtr<Medium> *pDupMedium);
+    int  i_decryptSettings();
+    int  i_decryptMediumSettings(Medium *pMedium);
+    int  i_decryptSettingBytes(uint8_t *aPlaintext,
+                               const uint8_t *aCiphertext,
+                               size_t aCiphertextSize) const;
+    int  i_encryptSettingBytes(const uint8_t *aPlaintext,
+                               uint8_t *aCiphertext,
+                               size_t aPlaintextSize,
+                               size_t aCiphertextSize) const;
 
     struct Data;            // opaque data structure, defined in VirtualBoxImpl.cpp
+
     Data *m;
 
     /* static variables (defined in VirtualBoxImpl.cpp) */
-    static Bstr sVersion;
-    static Bstr sVersionNormalized;
+    static com::Utf8Str sVersion;
+    static com::Utf8Str sVersionNormalized;
     static ULONG sRevision;
-    static Bstr sPackageType;
-    static Bstr sAPIVersion;
-    static std::map<Bstr, int> sNatNetworkNameToRefCount;
+    static com::Utf8Str sPackageType;
+    static com::Utf8Str sAPIVersion;
+    static std::map<com::Utf8Str, int> sNatNetworkNameToRefCount;
     static RWLockHandle* spMtxNatNetworkNameToRefCountLock;
 
Index: /trunk/src/VBox/Main/src-all/ProgressImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-all/ProgressImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-all/ProgressImpl.cpp	(revision 50355)
@@ -580,5 +580,5 @@
     /* add to the global collection of progress operations (note: after
  *      * creating mId) */
-    mParent->addProgress(this);
+    mParent->i_addProgress(this);
 #endif
 
@@ -702,5 +702,5 @@
         /* remove the added progress on failure to complete the initialization */
         if (autoUninitSpan.initFailed() && mId.isValid() && !mId.isZero())
-            mParent->removeProgress(mId.ref());
+            mParent->i_removeProgress(mId.ref());
 
         unconst(mParent) = NULL;
@@ -1129,5 +1129,5 @@
     /* remove from the global collection of pending progress operations */
     if (mParent)
-        mParent->removeProgress(mId.ref());
+        mParent->i_removeProgress(mId.ref());
 #endif
 
@@ -1203,5 +1203,5 @@
     /* remove from the global collection of pending progress operations */
     if (mParent)
-        mParent->removeProgress(mId.ref());
+        mParent->i_removeProgress(mId.ref());
 #endif
 
Index: /trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/ApplianceImpl.cpp	(revision 50355)
@@ -372,5 +372,5 @@
  * @return S_OK or error.
  */
-STDMETHODIMP VirtualBox::CreateAppliance(IAppliance** anAppliance)
+HRESULT VirtualBox::createAppliance(ComPtr<IAppliance> &aAppliance)
 {
     HRESULT rc;
@@ -381,5 +381,5 @@
 
     if (SUCCEEDED(rc))
-        appliance.queryInterfaceTo(anAppliance);
+        appliance.queryInterfaceTo(aAppliance.asOutParam());
 
     return rc;
@@ -613,5 +613,5 @@
 
     /* Get the system properties. */
-    SystemProperties *pSysProps = mVirtualBox->getSystemProperties();
+    SystemProperties *pSysProps = mVirtualBox->i_getSystemProperties();
     {
         ComObjPtr<MediumFormat> trgFormat = pSysProps->i_mediumFormatFromExtension("iso");
@@ -729,5 +729,5 @@
 
     /* Get the system properties. */
-    SystemProperties *pSysProps = mVirtualBox->getSystemProperties();
+    SystemProperties *pSysProps = mVirtualBox->i_getSystemProperties();
 
     /* We need a proper source format description */
Index: /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp	(revision 50355)
@@ -1872,5 +1872,5 @@
     // Lock the media tree early to make sure nobody else tries to make changes
     // to the tree. Also lock the IAppliance object for writing.
-    AutoMultiWriteLock2 multiLock(&mVirtualBox->getMediaTreeLockHandle(), this->lockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoMultiWriteLock2 multiLock(&mVirtualBox->i_getMediaTreeLockHandle(), this->lockHandle() COMMA_LOCKVAL_SRC_POS);
     // Additional protect the IAppliance object, cause we leave the lock
     // when starting the disk export and we don't won't block other
@@ -2055,5 +2055,5 @@
         // Scope for the AutoReadLock
         {
-            SystemProperties *pSysProps = mVirtualBox->getSystemProperties();
+            SystemProperties *pSysProps = mVirtualBox->i_getSystemProperties();
             AutoReadLock propsLock(pSysProps COMMA_LOCKVAL_SRC_POS);
             // We are always exporting to VMDK stream optimized for now
@@ -2092,14 +2092,14 @@
             if (pDiskEntry->type == VirtualSystemDescriptionType_HardDiskImage)
             {
-                rc = mVirtualBox->findHardDiskByLocation(strSrcFilePath, true, &pSourceDisk);
+                rc = mVirtualBox->i_findHardDiskByLocation(strSrcFilePath, true, &pSourceDisk);
                 if (FAILED(rc)) throw rc;
             }
             else//may be CD or DVD
             {
-                rc = mVirtualBox->findDVDOrFloppyImage(DeviceType_DVD,
-                                                       NULL,
-                                                       strSrcFilePath,
-                                                       true,
-                                                       &pSourceDisk);
+                rc = mVirtualBox->i_findDVDOrFloppyImage(DeviceType_DVD,
+                                                         NULL,
+                                                         strSrcFilePath,
+                                                         true,
+                                                         &pSourceDisk);
                 if (FAILED(rc)) throw rc;
             }
Index: /trunk/src/VBox/Main/src-server/ApplianceImplIO.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImplIO.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/ApplianceImplIO.cpp	(revision 50355)
@@ -1689,5 +1689,5 @@
              * Any existing file will be overwritten.
              */
-            rc = VirtualBox::ensureFilePathExists(Utf8Str(pcszFullFilenameOut), true /*fCreate*/);
+            rc = VirtualBox::i_ensureFilePathExists(Utf8Str(pcszFullFilenameOut), true /*fCreate*/);
             if (RT_SUCCESS(rc))
             {
@@ -1758,5 +1758,5 @@
          * Any existing file will be overwritten.
          */
-        rc = VirtualBox::ensureFilePathExists(Utf8Str(pcszTargetFilename), true /*fCreate*/);
+        rc = VirtualBox::i_ensureFilePathExists(Utf8Str(pcszTargetFilename), true /*fCreate*/);
         if (RT_SUCCESS(rc))
         {
Index: /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 50355)
@@ -2212,5 +2212,5 @@
 
     /* Get the system properties. */
-    SystemProperties *pSysProps = mVirtualBox->getSystemProperties();
+    SystemProperties *pSysProps = mVirtualBox->i_getSystemProperties();
 
     /*
@@ -2241,5 +2241,5 @@
     if (vrc == VINF_SUCCESS)
     {
-        rc = mVirtualBox->findHardDiskById(Guid(uuid), true, &pTargetHD);
+        rc = mVirtualBox->i_findHardDiskById(Guid(uuid), true, &pTargetHD);
         if (FAILED(rc)) throw rc;
     }
Index: /trunk/src/VBox/Main/src-server/ClientWatcher.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ClientWatcher.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/ClientWatcher.cpp	(revision 50355)
@@ -235,5 +235,5 @@
 
                 // get reference to the machines list in VirtualBox
-                VirtualBox::MachinesOList &allMachines = that->mVirtualBox->getMachinesList();
+                VirtualBox::MachinesOList &allMachines = that->mVirtualBox->i_getMachinesList();
 
                 // lock the machines list for reading
@@ -440,5 +440,5 @@
             {
                 // get reference to the machines list in VirtualBox
-                VirtualBox::MachinesOList &allMachines = that->mVirtualBox->getMachinesList();
+                VirtualBox::MachinesOList &allMachines = that->mVirtualBox->i_getMachinesList();
 
                 // lock the machines list for reading
@@ -574,5 +574,5 @@
 
                 // get reference to the machines list in VirtualBox
-                VirtualBox::MachinesOList &allMachines = that->mVirtualBox->getMachinesList();
+                VirtualBox::MachinesOList &allMachines = that->mVirtualBox->i_getMachinesList();
 
                 // lock the machines list for reading
@@ -743,5 +743,5 @@
 
                 // get reference to the machines list in VirtualBox
-                VirtualBox::MachinesOList &allMachines = that->mVirtualBox->getMachinesList();
+                VirtualBox::MachinesOList &allMachines = that->mVirtualBox->i_getMachinesList();
 
                 // lock the machines list for reading
Index: /trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp	(revision 50355)
@@ -200,5 +200,5 @@
     alock.release();
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = mVirtualBox->saveSettings();
+    HRESULT rc = mVirtualBox->i_saveSettings();
 
     return rc;
@@ -258,5 +258,5 @@
     alock.release();
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    return mVirtualBox->saveSettings();
+    return mVirtualBox->i_saveSettings();
 }
 
@@ -275,5 +275,5 @@
 
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    return mVirtualBox->saveSettings();
+    return mVirtualBox->i_saveSettings();
 }
 
@@ -318,5 +318,5 @@
 
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    return mVirtualBox->saveSettings();
+    return mVirtualBox->i_saveSettings();
 }
 
@@ -331,5 +331,5 @@
 
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    return mVirtualBox->saveSettings();
+    return mVirtualBox->i_saveSettings();
 }
 
Index: /trunk/src/VBox/Main/src-server/HostDnsService.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostDnsService.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/HostDnsService.cpp	(revision 50355)
@@ -262,5 +262,5 @@
 {
     m->fModified = true;
-    const_cast<VirtualBox *>(m->virtualbox)->onHostNameResolutionConfigurationChange();
+    const_cast<VirtualBox *>(m->virtualbox)->i_onHostNameResolutionConfigurationChange();
 }
 
Index: /trunk/src/VBox/Main/src-server/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 50355)
@@ -295,5 +295,5 @@
 
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
-    i_registerMetrics(aParent->performanceCollector());
+    i_registerMetrics(aParent->i_performanceCollector());
 #endif /* VBOX_WITH_RESOURCE_USAGE_API */
     /* Create the list of network interfaces so their metrics get registered. */
@@ -470,5 +470,5 @@
 
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
-    PerformanceCollector *aCollector = m->pParent->performanceCollector();
+    PerformanceCollector *aCollector = m->pParent->i_performanceCollector();
     i_unregisterMetrics(aCollector);
 #endif /* VBOX_WITH_RESOURCE_USAGE_API */
@@ -522,5 +522,5 @@
 HRESULT Host::getDVDDrives(std::vector<ComPtr<IMedium> > &aDVDDrives)
 {
-    AutoWriteLock alock(m->pParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock alock(m->pParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     MediaList *pList;
@@ -545,5 +545,5 @@
 HRESULT Host::getFloppyDrives(std::vector<ComPtr<IMedium> > &aFloppyDrives)
 {
-    AutoWriteLock alock(m->pParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock alock(m->pParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     MediaList *pList;
@@ -1418,5 +1418,5 @@
     alock.release();
     AutoWriteLock vboxLock(m->pParent COMMA_LOCKVAL_SRC_POS);
-    return rc = m->pParent->saveSettings();
+    return rc = m->pParent->i_saveSettings();
 #else
 
@@ -1473,5 +1473,5 @@
     alock.release();
     AutoWriteLock vboxLock(m->pParent COMMA_LOCKVAL_SRC_POS);
-    return rc = m->pParent->saveSettings();
+    return rc = m->pParent->i_saveSettings();
 #else
     /* Note: The GUI depends on this method returning E_NOTIMPL with no
@@ -1803,5 +1803,5 @@
 {
     HRESULT rc = S_OK;
-    Assert(m->pParent->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    Assert(m->pParent->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
 
     MediaList llNew;
@@ -1928,5 +1928,5 @@
     MediaList *pllMedia;
 
-    AutoWriteLock wlock(m->pParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock wlock(m->pParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
     HRESULT rc = i_getDrives(mediumType, fRefresh, pllMedia);
     if (SUCCEEDED(rc))
@@ -1968,5 +1968,5 @@
     MediaList *pllMedia;
 
-    AutoWriteLock wlock(m->pParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock wlock(m->pParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
     HRESULT rc = i_getDrives(mediumType, fRefresh, pllMedia);
     if (SUCCEEDED(rc))
@@ -2004,5 +2004,5 @@
                                         ComObjPtr<Medium> &pMedium)
 {
-    AutoWriteLock wlock(m->pParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock wlock(m->pParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     Guid uuid(strNameOrId);
@@ -2023,5 +2023,5 @@
     HRESULT rc = S_OK;
 
-    Assert(m->pParent->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    Assert(m->pParent->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
 
     try
@@ -2105,5 +2105,5 @@
     HRESULT rc = S_OK;
 
-    Assert(m->pParent->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    Assert(m->pParent->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
 
     try
@@ -2247,5 +2247,5 @@
         alock.release();
         AutoWriteLock vboxLock(m->pParent COMMA_LOCKVAL_SRC_POS);
-        return m->pParent->saveSettings();
+        return m->pParent->i_saveSettings();
     }
 
@@ -2978,5 +2978,5 @@
     HostNetworkInterfaceList::iterator itOld, itNew;
 # ifdef VBOX_WITH_RESOURCE_USAGE_API
-    PerformanceCollector *aCollector = m->pParent->performanceCollector();
+    PerformanceCollector *aCollector = m->pParent->i_performanceCollector();
 # endif
     for (itOld = m->llNetIfs.begin(); itOld != m->llNetIfs.end(); ++itOld)
Index: /trunk/src/VBox/Main/src-server/HostPower.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostPower.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/HostPower.cpp	(revision 50355)
@@ -57,10 +57,10 @@
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
             /* Suspend performance sampling to avoid unnecessary callbacks due to jumps in time. */
-            PerformanceCollector *perfcollector = mVirtualBox->performanceCollector();
+            PerformanceCollector *perfcollector = mVirtualBox->i_performanceCollector();
 
             if (perfcollector)
                 perfcollector->suspendSampling();
 #endif
-            mVirtualBox->getOpenedMachines(machines, &controls);
+            mVirtualBox->i_getOpenedMachines(machines, &controls);
 
             /* pause running VMs */
@@ -109,5 +109,5 @@
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
             /* Resume the performance sampling. */
-            PerformanceCollector *perfcollector = mVirtualBox->performanceCollector();
+            PerformanceCollector *perfcollector = mVirtualBox->i_performanceCollector();
 
             if (perfcollector)
@@ -135,5 +135,5 @@
             }
 
-            mVirtualBox->getOpenedMachines(machines, &controls);
+            mVirtualBox->i_getOpenedMachines(machines, &controls);
             size_t saved = 0;
 
Index: /trunk/src/VBox/Main/src-server/HostVideoInputDeviceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostVideoInputDeviceImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/HostVideoInputDeviceImpl.cpp	(revision 50355)
@@ -182,5 +182,5 @@
 
 #ifdef VBOX_WITH_EXTPACK
-    ExtPackManager *pExtPackMgr = pVirtualBox->getExtPackManager();
+    ExtPackManager *pExtPackMgr = pVirtualBox->i_getExtPackManager();
     hr = pExtPackMgr->getLibraryPathForExtPack("VBoxHostWebcam", &strExtPackPuel, &strLibrary);
 #else
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 50355)
@@ -440,8 +440,8 @@
                 // reject VM UUID duplicates, they can happen if someone
                 // tries to register an already known VM config again
-                if (aParent->findMachine(mData->pMachineConfigFile->uuid,
-                                         true /* fPermitInaccessible */,
-                                         false /* aDoSetError */,
-                                         NULL) != VBOX_E_OBJECT_NOT_FOUND)
+                if (aParent->i_findMachine(mData->pMachineConfigFile->uuid,
+                                           true /* fPermitInaccessible */,
+                                           false /* aDoSetError */,
+                                           NULL) != VBOX_E_OBJECT_NOT_FOUND)
                 {
                     throw setError(E_FAIL,
@@ -486,5 +486,5 @@
             // uninit media from this machine's media registry, or else
             // reloading the settings will fail
-            mParent->unregisterMachineMedia(getId());
+            mParent->i_unregisterMachineMedia(getId());
         }
     }
@@ -522,5 +522,5 @@
 
     Utf8Str strConfigFile;
-    aParent->getDefaultMachineFolder(strConfigFile);
+    aParent->i_getDefaultMachineFolder(strConfigFile);
     strConfigFile.append(RTPATH_DELIMITER);
     strConfigFile.append(strName);
@@ -576,5 +576,5 @@
             // uninit media from this machine's media registry, or else
             // reloading the settings will fail
-            mParent->unregisterMachineMedia(getId());
+            mParent->i_unregisterMachineMedia(getId());
         }
     }
@@ -616,5 +616,5 @@
 
     /* get the full file name */
-    int vrc1 = mParent->calculateFullPath(strConfigFile, mData->m_strConfigFileFull);
+    int vrc1 = mParent->i_calculateFullPath(strConfigFile, mData->m_strConfigFileFull);
     if (RT_FAILURE(vrc1))
         return setError(VBOX_E_FILE_ERROR,
@@ -712,5 +712,5 @@
                                mData->m_strConfigFileFull.c_str(),
                                mData->mUuid.toString().c_str(),
-                               mParent->settingsFilePath().c_str());
+                               mParent->i_settingsFilePath().c_str());
 
             rc = loadMachineDataFromSettings(*mData->pMachineConfigFile,
@@ -760,5 +760,5 @@
         // uninit media from this machine's media registry, or else
         // reloading the settings will fail
-        mParent->unregisterMachineMedia(getId());
+        mParent->i_unregisterMachineMedia(getId());
 
         /* uninitialize the common part to make sure all data is reset to
@@ -859,5 +859,5 @@
 
     if (uuidMachine.isValid() && !uuidMachine.isZero())     // can be empty if we're called from a failure of Machine::init
-        mParent->unregisterMachineMedia(uuidMachine);
+        mParent->i_unregisterMachineMedia(uuidMachine);
 
     // has machine been modified?
@@ -906,5 +906,5 @@
      * go through the list of all machines. Happens when an inaccessible VM
      * has a sensible medium registry. */
-    AutoReadLock mllock(mParent->getMachinesListLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoReadLock mllock(mParent->i_getMachinesListLockHandle() COMMA_LOCKVAL_SRC_POS);
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -920,5 +920,5 @@
 #ifdef DEBUG
         LogFlowThisFunc(("Dumping media backreferences\n"));
-        mParent->dumpAllBackRefs();
+        mParent->i_dumpAllBackRefs();
 #endif
 
@@ -939,6 +939,6 @@
             /* make sure interesting parties will notice the accessibility
              * state change */
-            mParent->onMachineStateChange(mData->mUuid, mData->mMachineState);
-            mParent->onMachineDataChange(mData->mUuid);
+            mParent->i_onMachineStateChange(mData->mUuid, mData->mMachineState);
+            mParent->i_onMachineDataChange(mData->mUuid);
         }
     }
@@ -1098,7 +1098,12 @@
     AutoCaller autoCaller(this);
     if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    std::vector<com::Utf8Str> tmplist;
+    SafeArray<IN_BSTR> tmp(ComSafeArrayInArg(aGroups));
+    tmplist.resize(tmp.size());
+    for (size_t i = 0; i < tmp.size(); ++i)
+        tmplist[i] = Utf8Str(tmp[i]);
 
     StringsList llGroups;
-    HRESULT rc = mParent->convertMachineGroups(ComSafeArrayInArg(aGroups), &llGroups);
+    HRESULT rc = mParent->i_convertMachineGroups(tmplist, &llGroups);
     if (FAILED(rc))
         return rc;
@@ -2231,5 +2236,5 @@
                     if (SUCCEEDED(hrc2) && fIs64Bit)
                     {
-                        ComObjPtr<Host> ptrHost = mParent->host();
+                        ComObjPtr<Host> ptrHost = mParent->i_host();
                         alock.release();
 
@@ -2709,5 +2714,5 @@
 
 # ifdef VBOX_WITH_USB
-    rc = mParent->host()->i_checkUSBProxyService();
+    rc = mParent->i_host()->i_checkUSBProxyService();
     if (FAILED(rc)) return rc;
 # endif
@@ -2739,5 +2744,5 @@
 
 # ifdef VBOX_WITH_USB
-    rc = mParent->host()->i_checkUSBProxyService();
+    rc = mParent->i_host()->i_checkUSBProxyService();
     if (FAILED(rc)) return rc;
 # endif
@@ -3828,9 +3833,9 @@
          *  machines that have open sessions
          */
-        mParent->updateClientWatcher();
+        mParent->i_updateClientWatcher();
 
         if (oldState != SessionState_Locked)
             /* fire an event */
-            mParent->onSessionStateChange(getId(), SessionState_Locked);
+            mParent->i_onSessionStateChange(getId(), SessionState_Locked);
     }
 
@@ -3931,8 +3936,8 @@
 
                 /* signal the client watcher thread */
-                mParent->updateClientWatcher();
+                mParent->i_updateClientWatcher();
 
                 /* fire an event */
-                mParent->onSessionStateChange(getId(), SessionState_Spawning);
+                mParent->i_onSessionStateChange(getId(), SessionState_Spawning);
             }
         }
@@ -3963,5 +3968,5 @@
         /* signal the client watcher thread, as most likely the client has
          * been terminated */
-        mParent->updateClientWatcher();
+        mParent->i_updateClientWatcher();
     }
 
@@ -4028,6 +4033,6 @@
     // request the host lock first, since might be calling Host methods for getting host drives;
     // next, protect the media tree all the while we're in here, as well as our member variables
-    AutoMultiWriteLock2 alock(mParent->host(), this COMMA_LOCKVAL_SRC_POS);
-    AutoWriteLock treeLock(&mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoMultiWriteLock2 alock(mParent->i_host(), this COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock treeLock(&mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     HRESULT rc = checkStateDependency(MutableStateDep);
@@ -4135,5 +4140,5 @@
             // As a result, we can only use these two new types if the medium is NOT in the
             // global registry:
-            const Guid &uuidGlobalRegistry = mParent->getGlobalRegistryId();
+            const Guid &uuidGlobalRegistry = mParent->i_getGlobalRegistryId();
             if (    medium->i_isInRegistry(uuidGlobalRegistry)
                  || !mData->pMachineConfigFile->canHaveOwnMediaRegistry()
@@ -4581,5 +4586,5 @@
     }
 
-    mParent->saveModifiedRegistries();
+    mParent->i_saveModifiedRegistries();
 
     return rc;
@@ -4666,5 +4671,5 @@
     alock.release();
 
-    mParent->saveModifiedRegistries();
+    mParent->i_saveModifiedRegistries();
 
     return rc;
@@ -5038,7 +5043,7 @@
     // request the host lock first, since might be calling Host methods for getting host drives;
     // next, protect the media tree all the while we're in here, as well as our member variables
-    AutoMultiWriteLock3 multiLock(mParent->host()->lockHandle(),
+    AutoMultiWriteLock3 multiLock(mParent->i_host()->lockHandle(),
                                   this->lockHandle(),
-                                  &mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+                                  &mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     ComObjPtr<MediumAttachment> pAttach = findAttachment(mMediaData->mAttachments,
@@ -5138,5 +5143,5 @@
     multiLock.release();
 
-    mParent->saveModifiedRegistries();
+    mParent->i_saveModifiedRegistries();
 
     return rc;
@@ -5309,10 +5314,10 @@
     {
         // ask for permission from all listeners outside the locks;
-        // onExtraDataCanChange() only briefly requests the VirtualBox
+        // i_onExtraDataCanChange() only briefly requests the VirtualBox
         // lock to copy the list of callbacks to invoke
         Bstr error;
         Bstr bstrValue(aValue);
 
-        if (!mParent->onExtraDataCanChange(mData->mUuid, aKey, bstrValue.raw(), error))
+        if (!mParent->i_onExtraDataCanChange(mData->mUuid, aKey, bstrValue.raw(), error))
         {
             const char *sep = error.isEmpty() ? "" : ": ";
@@ -5351,5 +5356,5 @@
             alock.release();
             AutoWriteLock vboxlock(mParent COMMA_LOCKVAL_SRC_POS);
-            mParent->saveSettings();
+            mParent->i_saveSettings();
         }
     }
@@ -5357,5 +5362,5 @@
     // fire notification outside the lock
     if (fChanged)
-        mParent->onExtraDataChange(mData->mUuid, aKey, aValue);
+        mParent->i_onExtraDataChange(mData->mUuid, aKey, aValue);
 
     return S_OK;
@@ -5398,5 +5403,5 @@
         // save the global settings; for that we should hold only the VirtualBox lock
         AutoWriteLock vlock(mParent COMMA_LOCKVAL_SRC_POS);
-        rc = mParent->saveSettings();
+        rc = mParent->i_saveSettings();
     }
 
@@ -5454,5 +5459,5 @@
         uninit();
 
-        mParent->unregisterMachine(this, id);
+        mParent->i_unregisterMachine(this, id);
             // calls VirtualBox::saveSettings()
 
@@ -5551,6 +5556,6 @@
     sfaMedia.detachTo(ComSafeArrayOutArg(aMedia));
 
-    mParent->unregisterMachine(this, id);
-            // calls VirtualBox::saveSettings() and VirtualBox::saveModifiedRegistries()
+    mParent->i_unregisterMachine(this, id);
+            // calls VirtualBox::saveSettings() and VirtualBox::i_saveModifiedRegistries()
 
     return S_OK;
@@ -5817,5 +5822,5 @@
         alock.release();
 
-        mParent->saveModifiedRegistries();
+        mParent->i_saveModifiedRegistries();
     }
     catch (HRESULT aRC) { rc = aRC; }
@@ -6159,7 +6164,7 @@
             alock.release();
 
-            mParent->onGuestPropertyChange(mData->mUuid, aName,
-                                           aValue ? aValue : Bstr("").raw(),
-                                           aFlags ? aFlags : Bstr("").raw());
+            mParent->i_onGuestPropertyChange(mData->mUuid, aName,
+                                             aValue ? aValue : Bstr("").raw(),
+                                             aFlags ? aFlags : Bstr("").raw());
         }
     }
@@ -6659,5 +6664,5 @@
     /* Check that we don't exceed the maximum number of USB controllers for the given type. */
     ULONG maxInstances;
-    rc = mParent->getSystemProperties()->GetMaxInstancesOfUSBControllerType(mHWData->mChipsetType, aType, &maxInstances);
+    rc = mParent->i_getSystemProperties()->GetMaxInstancesOfUSBControllerType(mHWData->mChipsetType, aType, &maxInstances);
     if (FAILED(rc))
         return rc;
@@ -7484,5 +7489,5 @@
             && mHWData->mAutostart.fAutostartEnabled != !!fEnabled)
         {
-            AutostartDb *autostartDb = mParent->getAutostartDb();
+            AutostartDb *autostartDb = mParent->i_getAutostartDb();
             int vrc;
 
@@ -7575,5 +7580,5 @@
             && mHWData->mAutostart.enmAutostopType != enmAutostopType)
         {
-            AutostartDb *autostartDb = mParent->getAutostartDb();
+            AutostartDb *autostartDb = mParent->i_getAutostartDb();
             int vrc;
 
@@ -8217,5 +8222,5 @@
         mData->mSession.mState = SessionState_Unlocked;
         alock.release();
-        mParent->addProcessToReap(pid);
+        mParent->i_addProcessToReap(pid);
         /* The failure may occur w/o any error info (from RPC), so provide one */
         return setError(VBOX_E_VM_ERROR,
@@ -8232,5 +8237,5 @@
 
     alock.release();
-    mParent->addProcessToReap(pid);
+    mParent->i_addProcessToReap(pid);
 
     LogFlowThisFuncLeave();
@@ -8391,5 +8396,5 @@
         mData->mSession.mPID = NIL_RTPROCESS;
 
-        mParent->onSessionStateChange(mData->mUuid, SessionState_Unlocked);
+        mParent->i_onSessionStateChange(mData->mUuid, SessionState_Unlocked);
         return true;
     }
@@ -8689,5 +8694,5 @@
 
     /* initialize mOSTypeId */
-    mUserData->s.strOsType = mParent->getUnknownOSType()->i_id();
+    mUserData->s.strOsType = mParent->i_getUnknownOSType()->i_id();
 
     /* create associated BIOS settings object */
@@ -8947,5 +8952,5 @@
         RTTimeNow(&mData->mLastStateChange);
 
-        mParent->onMachineStateChange(mData->mUuid, aMachineState);
+        mParent->i_onMachineStateChange(mData->mUuid, aMachineState);
     }
 
@@ -9673,11 +9678,11 @@
             case DeviceType_DVD:
                 if (dev.strHostDriveSrc.isNotEmpty())
-                    rc = mParent->host()->i_findHostDriveByName(dev.deviceType, dev.strHostDriveSrc, false /* fRefresh */, medium);
+                    rc = mParent->i_host()->i_findHostDriveByName(dev.deviceType, dev.strHostDriveSrc, false /* fRefresh */, medium);
                 else
-                    rc = mParent->findRemoveableMedium(dev.deviceType,
-                                                       dev.uuid,
-                                                       false /* fRefresh */,
-                                                       false /* aSetError */,
-                                                       medium);
+                    rc = mParent->i_findRemoveableMedium(dev.deviceType,
+                                                         dev.uuid,
+                                                         false /* fRefresh */,
+                                                         false /* aSetError */,
+                                                         medium);
                 if (rc == VBOX_E_OBJECT_NOT_FOUND)
                     // This is not an error. The host drive or UUID might have vanished, so just go ahead without this removeable medium attachment
@@ -9688,5 +9693,5 @@
             {
                 /* find a hard disk by UUID */
-                rc = mParent->findHardDiskById(dev.uuid, true /* aDoSetError */, &medium);
+                rc = mParent->i_findHardDiskById(dev.uuid, true /* aDoSetError */, &medium);
                 if (FAILED(rc))
                 {
@@ -10179,5 +10184,5 @@
             mData->m_strConfigFileFull = newConfigFile;
             // compute the relative path too
-            mParent->copyPathRelativeToConfig(newConfigFile, mData->m_strConfigFile);
+            mParent->i_copyPathRelativeToConfig(newConfigFile, mData->m_strConfigFile);
 
             // store the old and new so that VirtualBox::saveSettings() can update
@@ -10186,5 +10191,5 @@
                  && configDir != newConfigDir)
             {
-                mParent->rememberMachineNameChangeForMedia(configDir, newConfigDir);
+                mParent->i_rememberMachineNameChangeForMedia(configDir, newConfigDir);
 
                 if (pfNeedsGlobalSaveSettings)
@@ -10382,5 +10387,5 @@
          * inform callbacks. */
         if (isSessionMachine())
-            mParent->onMachineDataChange(mData->mUuid);
+            mParent->i_onMachineDataChange(mData->mUuid);
     }
 
@@ -10487,7 +10492,7 @@
         Utf8Str strMachineFolder = getSettingsFileFull();
         strMachineFolder.stripFilename();
-        mParent->saveMediaRegistry(config.mediaRegistry,
-                                   getId(),             // only media with registry ID == machine UUID
-                                   strMachineFolder);
+        mParent->i_saveMediaRegistry(config.mediaRegistry,
+                                     getId(),             // only media with registry ID == machine UUID
+                                     strMachineFolder);
             // this throws HRESULT
     }
@@ -11009,9 +11014,9 @@
     /* Paranoia checks: do not hold machine or media tree locks. */
     AssertReturnVoid(!isWriteLockOnCurrentThread());
-    AssertReturnVoid(!mParent->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    AssertReturnVoid(!mParent->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
 
     ComObjPtr<Medium> pBase;
     {
-        AutoReadLock treeLock(&mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoReadLock treeLock(&mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
         pBase = pMedium->i_getBase();
     }
@@ -11027,8 +11032,8 @@
         uuid = getId();     // machine UUID
     else
-        uuid = mParent->getGlobalRegistryId(); // VirtualBox global registry UUID
+        uuid = mParent->i_getGlobalRegistryId(); // VirtualBox global registry UUID
 
     if (pMedium->i_addRegistry(uuid, false /* fRecurse */))
-        mParent->markRegistryModified(uuid);
+        mParent->i_markRegistryModified(uuid);
 
     /* For more complex hard disk structures it can happen that the base
@@ -11037,5 +11042,5 @@
     {
         if (pBase->i_addRegistry(uuid, true /* fRecurse */))
-            mParent->markRegistryModified(uuid);
+            mParent->i_markRegistryModified(uuid);
     }
 }
@@ -11082,5 +11087,5 @@
 
     AutoMultiWriteLock2 alock(this->lockHandle(),
-                              &mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+                              &mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     /* must be in a protective state because we release the lock below */
@@ -11300,5 +11305,5 @@
 
     AutoMultiWriteLock2 alock(this->lockHandle(),
-                              &mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+                              &mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     /* We absolutely must have backed up state. */
@@ -12878,5 +12883,5 @@
                         mUserData->s.strName.c_str(), name.raw()));
                 aMachine->lockHandle()->unlockWrite();
-                mParent->natNetworkRefInc(name.raw());
+                mParent->i_natNetworkRefInc(name.raw());
 #ifdef RT_LOCK_STRICT
                 aMachine->lockHandle()->lockWrite(RT_SRC_POS);
@@ -12978,5 +12983,5 @@
         NOREF(rc);
 
-        USBProxyService *service = mParent->host()->i_usbProxyService();
+        USBProxyService *service = mParent->i_host()->i_usbProxyService();
         if (service)
             service->detachAllDevicesFromVM(this, true /* aDone */, true /* aAbnormal */);
@@ -12987,5 +12992,5 @@
     // with mPeer (as well as data we modify below). mParent lock is needed
     // by several calls to it, and USB needs host lock.
-    AutoMultiWriteLock3 multilock(mParent, mParent->host(), this COMMA_LOCKVAL_SRC_POS);
+    AutoMultiWriteLock3 multilock(mParent, mParent->i_host(), this COMMA_LOCKVAL_SRC_POS);
 
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
@@ -12995,5 +13000,5 @@
      * holding the lock.
      */
-    unregisterMetrics(mParent->performanceCollector(), mPeer);
+    unregisterMetrics(mParent->i_performanceCollector(), mPeer);
     /* The guest must be unregistered after its metrics (@bugref{5949}). */
     LogAleksey(("{%p} " LOG_FN_FMT ": mCollectorGuest=%p\n",
@@ -13001,5 +13006,5 @@
     if (mCollectorGuest)
     {
-        mParent->performanceCollector()->unregisterGuest(mCollectorGuest);
+        mParent->i_performanceCollector()->unregisterGuest(mCollectorGuest);
         // delete mCollectorGuest; => CollectorGuestManager::destroyUnregistered()
         mCollectorGuest = NULL;
@@ -13054,5 +13059,5 @@
          * client watcher thread to update the set of machines that have open
          * sessions. */
-        mParent->updateClientWatcher();
+        mParent->i_updateClientWatcher();
     }
 
@@ -13093,5 +13098,5 @@
                 LogRel(("VM '%s' stops using NAT network '%ls'\n",
                         mUserData->s.strName.c_str(), name.raw()));
-                mParent->natNetworkRefDec(name.raw());
+                mParent->i_natNetworkRefDec(name.raw());
                 multilock.acquire();
             }
@@ -13154,5 +13159,5 @@
 
     /* fire an event */
-    mParent->onSessionStateChange(mData->mUuid, SessionState_Unlocked);
+    mParent->i_onSessionStateChange(mData->mUuid, SessionState_Unlocked);
 
     uninitDataAndChildObjects();
@@ -13297,5 +13302,5 @@
          * now to offer the performance metrics for a running machine
          * object. Doing it earlier wouldn't be safe. */
-        registerMetrics(mParent->performanceCollector(), mPeer,
+        registerMetrics(mParent->i_performanceCollector(), mPeer,
                         mData->mSession.mPID);
 #endif /* VBOX_WITH_RESOURCE_USAGE_API */
@@ -13435,8 +13440,8 @@
     /* if captureDeviceForVM() fails, it must have set extended error info */
     clearError();
-    MultiResult rc = mParent->host()->i_checkUSBProxyService();
+    MultiResult rc = mParent->i_host()->i_checkUSBProxyService();
     if (FAILED(rc)) return rc;
 
-    USBProxyService *service = mParent->host()->i_usbProxyService();
+    USBProxyService *service = mParent->i_host()->i_usbProxyService();
     AssertReturn(service, E_FAIL);
     return service->captureDeviceForVM(this, Guid(aId).ref());
@@ -13458,5 +13463,5 @@
 
 #ifdef VBOX_WITH_USB
-    USBProxyService *service = mParent->host()->i_usbProxyService();
+    USBProxyService *service = mParent->i_host()->i_usbProxyService();
     AssertReturn(service, E_FAIL);
     return service->detachDeviceFromVM(this, Guid(aId).ref(), !!aDone);
@@ -13488,5 +13493,5 @@
     NOREF(rc);
 
-    USBProxyService *service = mParent->host()->i_usbProxyService();
+    USBProxyService *service = mParent->i_host()->i_usbProxyService();
     AssertReturn(service, E_FAIL);
     return service->autoCaptureDevicesForVM(this);
@@ -13518,5 +13523,5 @@
     NOREF(rc);
 
-    USBProxyService *service = mParent->host()->i_usbProxyService();
+    USBProxyService *service = mParent->i_host()->i_usbProxyService();
     AssertReturn(service, E_FAIL);
     return service->detachAllDevicesFromVM(this, !!aDone, false /* aAbnormal */);
@@ -13618,5 +13623,5 @@
 
     /* signal the client watcher thread, because the client is going away */
-    mParent->updateClientWatcher();
+    mParent->i_updateClientWatcher();
 
     LogFlowThisFuncLeave();
@@ -13886,8 +13891,8 @@
             alock.release();
 
-            mParent->onGuestPropertyChange(mData->mUuid,
-                                           aName,
-                                           aValue,
-                                           aFlags);
+            mParent->i_onGuestPropertyChange(mData->mUuid,
+                                             aName,
+                                             aValue,
+                                             aFlags);
         }
     }
@@ -13908,5 +13913,5 @@
 
     AutoMultiWriteLock2 alock(this->lockHandle(),
-                              &mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+                              &mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     AssertReturn(   mData->mMachineState == MachineState_Starting
@@ -13936,7 +13941,7 @@
     // request the host lock first, since might be calling Host methods for getting host drives;
     // next, protect the media tree all the while we're in here, as well as our member variables
-    AutoMultiWriteLock3 multiLock(mParent->host()->lockHandle(),
+    AutoMultiWriteLock3 multiLock(mParent->i_host()->lockHandle(),
                                   this->lockHandle(),
-                                  &mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+                                  &mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     ComObjPtr<MediumAttachment> pAttach = static_cast<MediumAttachment *>(aAttachment);
@@ -14150,5 +14155,5 @@
      */
 
-    mParent->onNatRedirectChange(getId(), ulSlot, RT_BOOL(aNatRuleRemove), aRuleName, aProto, aHostIp, (uint16_t)aHostPort, aGuestIp, (uint16_t)aGuestPort);
+    mParent->i_onNatRedirectChange(getId(), ulSlot, RT_BOOL(aNatRuleRemove), aRuleName, aProto, aHostIp, (uint16_t)aHostPort, aGuestIp, (uint16_t)aGuestPort);
     return S_OK;
 }
@@ -14692,5 +14697,5 @@
 
     AutoMultiWriteLock2 alock(this->lockHandle(),
-                              &mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+                              &mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     /* bail out if trying to lock things with already set up locking */
Index: /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp	(revision 50355)
@@ -1102,5 +1102,5 @@
                         /* Default format? */
                         Utf8Str strDefaultFormat;
-                        p->mParent->getDefaultHardDiskFormat(strDefaultFormat);
+                        p->mParent->i_getDefaultHardDiskFormat(strDefaultFormat);
                         Bstr bstrSrcFormat(strDefaultFormat);
 
@@ -1221,6 +1221,6 @@
                         /* register the new harddisk */
                         {
-                            AutoWriteLock tlock(p->mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
-                            rc = p->mParent->registerMedium(pTarget, &pTarget,
+                            AutoWriteLock tlock(p->mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+                            rc = p->mParent->i_registerMedium(pTarget, &pTarget,
                                                             DeviceType_HardDisk);
                             if (FAILED(rc)) throw rc;
@@ -1304,5 +1304,5 @@
                         trgLock.release();
                         srcLock.release();
-                        p->mParent->markRegistryModified(uuid);
+                        p->mParent->i_markRegistryModified(uuid);
                         srcLock.acquire();
                         trgLock.acquire();
@@ -1373,5 +1373,5 @@
                  * VirtualBox lock */
                 AutoWriteLock vlock(p->mParent COMMA_LOCKVAL_SRC_POS);
-                rc = p->mParent->saveSettings();
+                rc = p->mParent->i_saveSettings();
                 if (FAILED(rc)) throw rc;
             }
@@ -1379,5 +1379,5 @@
 
         /* Any additional machines need saving? */
-        p->mParent->saveModifiedRegistries();
+        p->mParent->i_saveModifiedRegistries();
     }
     catch (HRESULT rc2)
@@ -1418,5 +1418,5 @@
 
         /* Must save the modified registries */
-        p->mParent->saveModifiedRegistries();
+        p->mParent->i_saveModifiedRegistries();
     }
 
Index: /trunk/src/VBox/Main/src-server/MediumImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 50355)
@@ -110,5 +110,5 @@
     VirtualBox * const pVirtualBox;
 
-    // pParent and llChildren are protected by VirtualBox::getMediaTreeLockHandle()
+    // pParent and llChildren are protected by VirtualBox::i_getMediaTreeLockHandle()
     ComObjPtr<Medium> pParent;
     MediaList llChildren;           // to add a child, just call push_back; to remove a child, call child->deparent() which does a lookup
@@ -946,5 +946,5 @@
         unconst(m->id).create();
 
-        AutoWriteLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoWriteLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
         ComObjPtr<Medium> pMedium;
 
@@ -959,5 +959,5 @@
             bool fInUse;
 
-            fInUse = m->pVirtualBox->isMediaUuidInUse(m->id, DeviceType_HardDisk);
+            fInUse = m->pVirtualBox->i_isMediaUuidInUse(m->id, DeviceType_HardDisk);
             if (fInUse)
             {
@@ -969,5 +969,5 @@
         }
 
-        rc = m->pVirtualBox->registerMedium(this, &pMedium, DeviceType_HardDisk);
+        rc = m->pVirtualBox->i_registerMedium(this, &pMedium, DeviceType_HardDisk);
         Assert(this == pMedium || FAILED(rc));
     }
@@ -1145,5 +1145,5 @@
     {
         // differencing medium: add to parent
-        AutoWriteLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoWriteLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
         m->pParent = aParent;
         aParent->m->llChildren.push_back(this);
@@ -1208,5 +1208,5 @@
     {
         Utf8Str strPlaintext;
-        int vrc = m->pVirtualBox->decryptSetting(&strPlaintext, itCph->second);
+        int vrc = m->pVirtualBox->i_decryptSetting(&strPlaintext, itCph->second);
         if (RT_SUCCESS(vrc))
             m->mapProperties["InitiatorSecret"] = strPlaintext;
@@ -1230,5 +1230,5 @@
         {
             // Otherwise use the old VirtualBox "make absolute path" logic:
-            rc = m->pVirtualBox->calculateFullPath(data.strLocation, strFull);
+            rc = m->pVirtualBox->i_calculateFullPath(data.strLocation, strFull);
             if (FAILED(rc)) return rc;
         }
@@ -1264,5 +1264,5 @@
      * COMGETTER(State). */
 
-    AutoWriteLock treeLock(aVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock treeLock(aVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     /* load all children */
@@ -1283,5 +1283,5 @@
         if (FAILED(rc)) break;
 
-        rc = m->pVirtualBox->registerMedium(pHD, &pHD, DeviceType_HardDisk);
+        rc = m->pVirtualBox->i_registerMedium(pHD, &pHD, DeviceType_HardDisk);
         if (FAILED(rc)) break;
     }
@@ -1576,5 +1576,5 @@
 {
     // we access mParent and members
-    AutoWriteLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
     AutoWriteLock mlock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1683,5 +1683,5 @@
         // As a result, we can only use these two new types if the medium is NOT in the
         // global registry:
-        const Guid &uuidGlobalRegistry = m->pVirtualBox->getGlobalRegistryId();
+        const Guid &uuidGlobalRegistry = m->pVirtualBox->i_getGlobalRegistryId();
         if (i_isInRegistry(uuidGlobalRegistry))
             return setError(VBOX_E_INVALID_OBJECT_STATE,
@@ -1697,5 +1697,5 @@
     treeLock.release();
     i_markRegistriesModified();
-    m->pVirtualBox->saveModifiedRegistries();
+    m->pVirtualBox->i_saveModifiedRegistries();
 
     return S_OK;
@@ -1713,5 +1713,5 @@
 {
     /* we access mParent */
-    AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoReadLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     m->pParent.queryInterfaceTo(aParent.asOutParam());
@@ -1723,5 +1723,5 @@
 {
     /* we access children */
-    AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoReadLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     MediaList children(this->i_getChildren());
@@ -1786,5 +1786,5 @@
         mlock.release();
         i_markRegistriesModified();
-        m->pVirtualBox->saveModifiedRegistries();
+        m->pVirtualBox->i_saveModifiedRegistries();
     }
 
@@ -1940,5 +1940,5 @@
         /* Must not hold the media tree lock, as Medium::queryInfo needs this
          * lock and thus we would run into a deadlock here. */
-        Assert(!m->pVirtualBox->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+        Assert(!m->pVirtualBox->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
         while (m->queryInfoRunning)
         {
@@ -2057,5 +2057,5 @@
         /* Must not hold the media tree lock, as Medium::queryInfo needs this
          * lock and thus we would run into a deadlock here. */
-        Assert(!m->pVirtualBox->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+        Assert(!m->pVirtualBox->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
         while (m->queryInfoRunning)
         {
@@ -2154,5 +2154,5 @@
     MultiResult mrc = i_close(aAutoCaller);
 
-    pVirtualBox->saveModifiedRegistries();
+    pVirtualBox->i_saveModifiedRegistries();
 
     return mrc;
@@ -2222,5 +2222,5 @@
     mlock.release();
     i_markRegistriesModified();
-    m->pVirtualBox->saveModifiedRegistries();
+    m->pVirtualBox->i_saveModifiedRegistries();
 
     return S_OK;
@@ -2299,5 +2299,5 @@
     mlock.release();
     i_markRegistriesModified();
-    m->pVirtualBox->saveModifiedRegistries();
+    m->pVirtualBox->i_saveModifiedRegistries();
 
     return S_OK;
@@ -2387,5 +2387,5 @@
                                       false /* aWait */);
     /* Must save the registries in any case, since an entry was removed. */
-    m->pVirtualBox->saveModifiedRegistries();
+    m->pVirtualBox->i_saveModifiedRegistries();
 
     if (SUCCEEDED(mrc))
@@ -2403,5 +2403,5 @@
 
     // locking: we need the tree lock first because we access parent pointers
-    AutoMultiWriteLock3 alock(&m->pVirtualBox->getMediaTreeLockHandle(),
+    AutoMultiWriteLock3 alock(&m->pVirtualBox->i_getMediaTreeLockHandle(),
                               this->lockHandle(), diff->lockHandle() COMMA_LOCKVAL_SRC_POS);
 
@@ -2545,5 +2545,5 @@
         // and we need to write-lock the media involved
         uint32_t    cHandles    = 3;
-        LockHandle* pHandles[4] = { &m->pVirtualBox->getMediaTreeLockHandle(),
+        LockHandle* pHandles[4] = { &m->pVirtualBox->i_getMediaTreeLockHandle(),
                                     this->lockHandle(),
                                     pTarget->lockHandle() };
@@ -2824,5 +2824,5 @@
     {
         /* canClose() needs the tree lock */
-        AutoMultiWriteLock2 multilock(&m->pVirtualBox->getMediaTreeLockHandle(),
+        AutoMultiWriteLock2 multilock(&m->pVirtualBox->i_getMediaTreeLockHandle(),
                                       this->lockHandle()
                                       COMMA_LOCKVAL_SRC_POS);
@@ -3230,5 +3230,5 @@
          ++it)
     {
-        m->pVirtualBox->markRegistryModified(*it);
+        m->pVirtualBox->i_markRegistryModified(*it);
     }
 }
@@ -3523,5 +3523,5 @@
 
     /* we access mParent */
-    AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoReadLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     pBase = this;
@@ -3562,5 +3562,5 @@
 
     /* we access children */
-    AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoReadLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -3622,5 +3622,5 @@
 
     /* we access mParent */
-    AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoReadLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -3658,5 +3658,5 @@
         /* Encrypt the plain secret. If that does not work (i.e. no or wrong settings key
          * specified), just use the encrypted secret (if there is any). */
-        int rc = m->pVirtualBox->encryptSetting(itPln->second, &strCiphertext);
+        int rc = m->pVirtualBox->i_encryptSetting(itPln->second, &strCiphertext);
         if (RT_SUCCESS(rc))
             fHaveInitiatorSecretEncrypted = true;
@@ -3715,5 +3715,5 @@
                                        MediumLockList &mediumLockList)
 {
-    Assert(!m->pVirtualBox->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    Assert(!m->pVirtualBox->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
     Assert(!isWriteLockOnCurrentThread());
 
@@ -3941,5 +3941,5 @@
         /* use the default format if not */
         Utf8Str tmp;
-        m->pVirtualBox->getDefaultHardDiskFormat(tmp);
+        m->pVirtualBox->i_getDefaultHardDiskFormat(tmp);
         return tmp;
     }
@@ -3964,5 +3964,5 @@
 {
     // we're accessing parent/child and backrefs, so lock the tree first, then ourselves
-    AutoMultiWriteLock2 multilock(&m->pVirtualBox->getMediaTreeLockHandle(),
+    AutoMultiWriteLock2 multilock(&m->pVirtualBox->i_getMediaTreeLockHandle(),
                                   this->lockHandle()
                                   COMMA_LOCKVAL_SRC_POS);
@@ -4006,9 +4006,9 @@
         // Needs to be done before saving the registry, as otherwise there
         // may be a deadlock with someone else closing this object while we're
-        // in saveModifiedRegistries(), which needs the media tree lock, which
+        // in i_saveModifiedRegistries(), which needs the media tree lock, which
         // the other thread holds until after uninit() below.
         /// @todo redesign the locking here, as holding the locks over uninit causes lock order trouble which the lock validator can't detect
         autoCaller.release();
-        m->pVirtualBox->saveModifiedRegistries();
+        m->pVirtualBox->i_saveModifiedRegistries();
         multilock.acquire();
     }
@@ -4065,5 +4065,5 @@
     {
         /* we're accessing the media tree, and canClose() needs it too */
-        AutoMultiWriteLock2 multilock(&m->pVirtualBox->getMediaTreeLockHandle(),
+        AutoMultiWriteLock2 multilock(&m->pVirtualBox->i_getMediaTreeLockHandle(),
                                       this->lockHandle()
                                       COMMA_LOCKVAL_SRC_POS);
@@ -4329,5 +4329,5 @@
     {
         // locking: we need the tree lock first because we access parent pointers
-        AutoWriteLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoWriteLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
         /* more sanity checking and figuring out the current merge direction */
@@ -4459,5 +4459,5 @@
     {
         // locking: we need the tree lock first because we access parent pointers
-        AutoWriteLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoWriteLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
         /* more sanity checking and figuring out the merge direction */
@@ -4936,5 +4936,5 @@
 {
     Assert(!isWriteLockOnCurrentThread());
-    Assert(!m->pVirtualBox->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    Assert(!m->pVirtualBox->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
     MediumLockList mediumLockList;
     HRESULT rc = i_createMediumLockList(true /* fFailIfInaccessible */,
@@ -5126,5 +5126,5 @@
         // and we need to write-lock the media involved
         uint32_t    cHandles    = 2;
-        LockHandle* pHandles[3] = { &m->pVirtualBox->getMediaTreeLockHandle(),
+        LockHandle* pHandles[3] = { &m->pVirtualBox->i_getMediaTreeLockHandle(),
                                     this->lockHandle() };
         /* Only add parent to the lock if it is not null */
@@ -5224,5 +5224,5 @@
         // and we need to write-lock the media involved
         uint32_t    cHandles    = 3;
-        LockHandle* pHandles[4] = { &m->pVirtualBox->getMediaTreeLockHandle(),
+        LockHandle* pHandles[4] = { &m->pVirtualBox->i_getMediaTreeLockHandle(),
                                     this->lockHandle(),
                                     aTarget->lockHandle() };
@@ -5443,6 +5443,6 @@
     alock.release();
     Assert(!isWriteLockOnCurrentThread());
-    Assert(!m->pVirtualBox->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
-    AutoWriteLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    Assert(!m->pVirtualBox->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    AutoWriteLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
     treeLock.release();
 
@@ -5544,5 +5544,5 @@
                                 location.c_str(),
                                 mediumId.raw(),
-                                m->pVirtualBox->settingsFilePath().c_str());
+                                m->pVirtualBox->i_settingsFilePath().c_str());
                         throw S_OK;
                     }
@@ -5610,5 +5610,5 @@
                         rc = VBOX_E_OBJECT_NOT_FOUND;
                     else
-                        rc = m->pVirtualBox->findHardDiskById(Guid(parentId), false /* aSetError */, &pParent);
+                        rc = m->pVirtualBox->i_findHardDiskById(Guid(parentId), false /* aSetError */, &pParent);
                     if (FAILED(rc))
                     {
@@ -5632,5 +5632,5 @@
                             lastAccessError = Utf8StrFmt(tr("Parent medium with UUID {%RTuuid} of the medium '%s' is not found in the media registry ('%s')"),
                                                          &parentId, location.c_str(),
-                                                         m->pVirtualBox->settingsFilePath().c_str());
+                                                         m->pVirtualBox->i_settingsFilePath().c_str());
                             throw S_OK;
                         }
@@ -5688,5 +5688,5 @@
                                     &parentId, location.c_str(),
                                     m->pParent->i_getId().raw(),
-                                    m->pVirtualBox->settingsFilePath().c_str());
+                                    m->pVirtualBox->i_settingsFilePath().c_str());
                             parentLock.release();
                             treeLock.release();
@@ -5824,5 +5824,5 @@
 HRESULT Medium::i_canClose()
 {
-    Assert(m->pVirtualBox->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    Assert(m->pVirtualBox->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
 
     if (i_getChildren().size() != 0)
@@ -5845,5 +5845,5 @@
 
     /* we modify mParent and access children */
-    Assert(m->pVirtualBox->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    Assert(m->pVirtualBox->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
 
     Medium *pParentBackup = m->pParent;
@@ -5852,5 +5852,5 @@
         i_deparent();
 
-    HRESULT rc = m->pVirtualBox->unregisterMedium(this);
+    HRESULT rc = m->pVirtualBox->i_unregisterMedium(this);
     if (FAILED(rc))
     {
@@ -6157,5 +6157,5 @@
     /* get the format object first */
     {
-        SystemProperties *pSysProps = m->pVirtualBox->getSystemProperties();
+        SystemProperties *pSysProps = m->pVirtualBox->i_getSystemProperties();
         AutoReadLock propsLock(pSysProps COMMA_LOCKVAL_SRC_POS);
 
@@ -6584,5 +6584,5 @@
             if (capabilities & MediumFormatCapabilities_File)
             {
-                rc = VirtualBox::ensureFilePathExists(location, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
+                rc = VirtualBox::i_ensureFilePathExists(location, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
                 if (FAILED(rc))
                     throw rc;
@@ -6626,7 +6626,7 @@
          * Created state only on success (leaving an orphan file is
          * better than breaking media registry consistency) */
-        AutoWriteLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoWriteLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
         ComObjPtr<Medium> pMedium;
-        rc = m->pVirtualBox->registerMedium(this, &pMedium, DeviceType_HardDisk);
+        rc = m->pVirtualBox->i_registerMedium(this, &pMedium, DeviceType_HardDisk);
         Assert(this == pMedium);
     }
@@ -6648,5 +6648,5 @@
         {
             // in asynchronous mode, save settings now
-            m->pVirtualBox->saveModifiedRegistries();
+            m->pVirtualBox->i_saveModifiedRegistries();
         }
     }
@@ -6760,5 +6760,5 @@
             if (capabilities & MediumFormatCapabilities_File)
             {
-                HRESULT rc = VirtualBox::ensureFilePathExists(targetLocation, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
+                HRESULT rc = VirtualBox::i_ensureFilePathExists(targetLocation, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
                 if (FAILED(rc))
                     throw rc;
@@ -6797,5 +6797,5 @@
     if (SUCCEEDED(mrc))
     {
-        AutoWriteLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoWriteLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
         Assert(pTarget->m->pParent.isNull());
@@ -6814,5 +6814,5 @@
          * better than breaking media registry consistency) */
         ComObjPtr<Medium> pMedium;
-        mrc = m->pVirtualBox->registerMedium(pTarget, &pMedium, DeviceType_HardDisk);
+        mrc = m->pVirtualBox->i_registerMedium(pTarget, &pMedium, DeviceType_HardDisk);
         Assert(pTarget == pMedium);
 
@@ -6853,5 +6853,5 @@
     {
         // in asynchronous mode, save settings now
-        m->pVirtualBox->saveModifiedRegistries();
+        m->pVirtualBox->i_saveModifiedRegistries();
     }
 
@@ -7027,5 +7027,5 @@
          * VDMerge; reparent the last one and uninitialize deleted media. */
 
-        AutoWriteLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoWriteLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
         if (task.mfMergeForward)
@@ -7033,5 +7033,5 @@
             /* first, unregister the target since it may become a base
              * medium which needs re-registration */
-            rc2 = m->pVirtualBox->unregisterMedium(pTarget);
+            rc2 = m->pVirtualBox->i_unregisterMedium(pTarget);
             AssertComRC(rc2);
 
@@ -7048,5 +7048,5 @@
             /* then, register again */
             ComObjPtr<Medium> pMedium;
-            rc2 = m->pVirtualBox->registerMedium(pTarget, &pMedium,
+            rc2 = m->pVirtualBox->i_registerMedium(pTarget, &pMedium,
                                                  DeviceType_HardDisk);
             AssertComRC(rc2);
@@ -7104,5 +7104,5 @@
             }
 
-            rc2 = pMedium->m->pVirtualBox->unregisterMedium(pMedium);
+            rc2 = pMedium->m->pVirtualBox->i_unregisterMedium(pMedium);
             AssertComRC(rc2);
 
@@ -7142,5 +7142,5 @@
         // in asynchronous mode, save settings now
         eik.restore();
-        m->pVirtualBox->saveModifiedRegistries();
+        m->pVirtualBox->i_saveModifiedRegistries();
         eik.fetch();
     }
@@ -7259,5 +7259,5 @@
             if (capabilities & MediumFormatCapabilities_File)
             {
-                HRESULT rc = VirtualBox::ensureFilePathExists(targetLocation, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
+                HRESULT rc = VirtualBox::i_ensureFilePathExists(targetLocation, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
                 if (FAILED(rc))
                     throw rc;
@@ -7376,5 +7376,5 @@
     {
         /* we set mParent & children() */
-        AutoWriteLock alock2(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoWriteLock alock2(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
         Assert(pTarget->m->pParent.isNull());
@@ -7392,5 +7392,5 @@
             eik.restore();
             ComObjPtr<Medium> pMedium;
-            mrc = pParent->m->pVirtualBox->registerMedium(pTarget, &pMedium,
+            mrc = pParent->m->pVirtualBox->i_registerMedium(pTarget, &pMedium,
                                                           DeviceType_HardDisk);
             Assert(   FAILED(mrc)
@@ -7407,5 +7407,5 @@
             eik.restore();
             ComObjPtr<Medium> pMedium;
-            mrc = m->pVirtualBox->registerMedium(pTarget, &pMedium,
+            mrc = m->pVirtualBox->i_registerMedium(pTarget, &pMedium,
                                                  DeviceType_HardDisk);
             Assert(   FAILED(mrc)
@@ -7445,5 +7445,5 @@
         /* collect multiple errors */
         eik.restore();
-        m->pVirtualBox->saveModifiedRegistries();
+        m->pVirtualBox->i_saveModifiedRegistries();
         eik.fetch();
     }
@@ -7940,5 +7940,5 @@
             if (capabilities & MediumFormatCapabilities_File)
             {
-                rc = VirtualBox::ensureFilePathExists(targetLocation, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
+                rc = VirtualBox::i_ensureFilePathExists(targetLocation, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
                 if (FAILED(rc))
                     throw rc;
@@ -8028,5 +8028,5 @@
         {
             targetId.create();
-            /* VirtualBox::registerMedium() will need UUID */
+            /* VirtualBox::i_registerMedium() will need UUID */
             unconst(m->id) = targetId;
         }
@@ -8066,5 +8066,5 @@
             if (capabilities & MediumFormatCapabilities_File)
             {
-                HRESULT rc = VirtualBox::ensureFilePathExists(targetLocation, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
+                HRESULT rc = VirtualBox::i_ensureFilePathExists(targetLocation, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);
                 if (FAILED(rc))
                     throw rc;
@@ -8162,5 +8162,5 @@
     {
         /* we set mParent & children() */
-        AutoWriteLock alock2(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoWriteLock alock2(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
         Assert(m->pParent.isNull());
@@ -8178,5 +8178,5 @@
             eik.restore();
             ComObjPtr<Medium> pMedium;
-            mrc = pParent->m->pVirtualBox->registerMedium(this, &pMedium,
+            mrc = pParent->m->pVirtualBox->i_registerMedium(this, &pMedium,
                                                           DeviceType_HardDisk);
             Assert(this == pMedium);
@@ -8192,5 +8192,5 @@
             eik.restore();
             ComObjPtr<Medium> pMedium;
-            mrc = m->pVirtualBox->registerMedium(this, &pMedium, DeviceType_HardDisk);
+            mrc = m->pVirtualBox->i_registerMedium(this, &pMedium, DeviceType_HardDisk);
             Assert(this == pMedium);
             eik.fetch();
@@ -8227,5 +8227,5 @@
         /* collect multiple errors */
         eik.restore();
-        m->pVirtualBox->saveModifiedRegistries();
+        m->pVirtualBox->i_saveModifiedRegistries();
         eik.fetch();
     }
Index: /trunk/src/VBox/Main/src-server/NATNetworkImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/NATNetworkImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/NATNetworkImpl.cpp	(revision 50355)
@@ -248,10 +248,10 @@
                                          m->maNATLoopbackOffsetList.end());
 
-    mVirtualBox->onNATNetworkSetting(Bstr(mName).raw(),
-                                     data.fEnabled ? TRUE : FALSE,
-                                     Bstr(m->IPv4NetworkCidr).raw(),
-                                     Bstr(m->IPv4Gateway).raw(),
-                                     data.fAdvertiseDefaultIPv6Route ? TRUE : FALSE,
-                                     data.fNeedDhcpServer ? TRUE : FALSE);
+    mVirtualBox->i_onNATNetworkSetting(Bstr(mName).raw(),
+                                       data.fEnabled ? TRUE : FALSE,
+                                       Bstr(m->IPv4NetworkCidr).raw(),
+                                       Bstr(m->IPv4Gateway).raw(),
+                                       data.fAdvertiseDefaultIPv6Route ? TRUE : FALSE,
+                                       data.fNeedDhcpServer ? TRUE : FALSE);
 
     /* Notify listerners listening on this network only */
@@ -290,5 +290,5 @@
     }
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = mVirtualBox->saveSettings();
+    HRESULT rc = mVirtualBox->i_saveSettings();
     ComAssertComRCRetRC(rc);
 
@@ -314,5 +314,5 @@
 
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = mVirtualBox->saveSettings();
+    HRESULT rc = mVirtualBox->i_saveSettings();
     ComAssertComRCRetRC(rc);
     return S_OK;
@@ -354,5 +354,5 @@
 
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = mVirtualBox->saveSettings();
+    HRESULT rc = mVirtualBox->i_saveSettings();
     ComAssertComRCRetRC(rc);
     return S_OK;
@@ -380,5 +380,5 @@
 
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = mVirtualBox->saveSettings();
+    HRESULT rc = mVirtualBox->i_saveSettings();
     ComAssertComRCRetRC(rc);
 
@@ -413,5 +413,5 @@
 
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = mVirtualBox->saveSettings();
+    HRESULT rc = mVirtualBox->i_saveSettings();
     ComAssertComRCRetRC(rc);
 
@@ -441,5 +441,5 @@
 
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = mVirtualBox->saveSettings();
+    HRESULT rc = mVirtualBox->i_saveSettings();
     ComAssertComRCRetRC(rc);
 
@@ -470,5 +470,5 @@
 
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = mVirtualBox->saveSettings();
+    HRESULT rc = mVirtualBox->i_saveSettings();
     ComAssertComRCRetRC(rc);
 
@@ -535,5 +535,5 @@
 
         AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-        return mVirtualBox->saveSettings();
+        return mVirtualBox->i_saveSettings();
     }
 
@@ -552,5 +552,5 @@
 
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    return mVirtualBox->saveSettings();
+    return mVirtualBox->i_saveSettings();
 }
 
@@ -580,5 +580,5 @@
 
     AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-    return mVirtualBox->saveSettings();
+    return mVirtualBox->i_saveSettings();
 }
 
@@ -653,12 +653,12 @@
     {
         AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-        HRESULT rc = mVirtualBox->saveSettings();
+        HRESULT rc = mVirtualBox->i_saveSettings();
         ComAssertComRCRetRC(rc);
     }
 
-    mVirtualBox->onNATNetworkPortForward(Bstr(mName).raw(), TRUE, aIsIpv6,
-                                         Bstr(aPortForwardRuleName).raw(), aProto,
-                                         Bstr(aHostIp).raw(), aHostPort,
-                                         Bstr(aGuestIp).raw(), aGuestPort);
+    mVirtualBox->i_onNATNetworkPortForward(Bstr(mName).raw(), TRUE, aIsIpv6,
+                                           Bstr(aPortForwardRuleName).raw(), aProto,
+                                           Bstr(aHostIp).raw(), aHostPort,
+                                           Bstr(aGuestIp).raw(), aGuestPort);
 
     /* Notify listerners listening on this network only */
@@ -698,12 +698,12 @@
     {
         AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
-        HRESULT rc = mVirtualBox->saveSettings();
+        HRESULT rc = mVirtualBox->i_saveSettings();
         ComAssertComRCRetRC(rc);
     }
 
-    mVirtualBox->onNATNetworkPortForward(Bstr(mName).raw(), FALSE, aIsIpv6,
-                                         Bstr(aPortForwardRuleName).raw(), proto,
-                                         Bstr(strHostIP).raw(), u16HostPort,
-                                         Bstr(strGuestIP).raw(), u16GuestPort);
+    mVirtualBox->i_onNATNetworkPortForward(Bstr(mName).raw(), FALSE, aIsIpv6,
+                                           Bstr(aPortForwardRuleName).raw(), proto,
+                                           Bstr(strHostIP).raw(), u16HostPort,
+                                           Bstr(strGuestIP).raw(), u16GuestPort);
 
     /* Notify listerners listening on this network only */
@@ -799,5 +799,5 @@
     if (RT_SUCCESS(m->NATRunner.start()))
     {
-        mVirtualBox->onNATNetworkStartStop(Bstr(mName).raw(), TRUE);
+        mVirtualBox->i_onNATNetworkStartStop(Bstr(mName).raw(), TRUE);
         return S_OK;
     }
@@ -818,5 +818,5 @@
     if (RT_SUCCESS(m->NATRunner.stop()))
     {
-        mVirtualBox->onNATNetworkStartStop(Bstr(mName).raw(), FALSE);
+        mVirtualBox->i_onNATNetworkStartStop(Bstr(mName).raw(), FALSE);
         return S_OK;
     }
Index: /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp	(revision 50355)
@@ -1402,5 +1402,5 @@
         hrc = mParent->COMGETTER(Name)(bstrName.asOutParam());
         LogRel(("VM '%ls' stops using NAT network '%ls'\n", bstrName.raw(), Bstr(networkName).raw()));
-        int natCount = mParent->getVirtualBox()->natNetworkRefDec(Bstr(networkName).raw());
+        int natCount = mParent->getVirtualBox()->i_natNetworkRefDec(Bstr(networkName).raw());
         if (natCount == -1)
             return E_INVALIDARG; /* no such network */
@@ -1425,5 +1425,5 @@
         hrc = mParent->COMGETTER(Name)(bstrName.asOutParam());
         LogRel(("VM '%ls' starts using NAT network '%ls'\n", bstrName.raw(), Bstr(aNatNetworkName).raw()));
-        int natCount = mParent->getVirtualBox()->natNetworkRefInc(Bstr(aNatNetworkName).raw());
+        int natCount = mParent->getVirtualBox()->i_natNetworkRefInc(Bstr(aNatNetworkName).raw());
         if (natCount == -1)
             return E_INVALIDARG; /* not found */
Index: /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp	(revision 50355)
@@ -1253,9 +1253,9 @@
         // save the global settings
         AutoWriteLock vboxlock(mParent COMMA_LOCKVAL_SRC_POS);
-        rc = mParent->saveSettings();
+        rc = mParent->i_saveSettings();
     }
 
     /* inform callbacks */
-    mParent->onSnapshotChange(uuidMachine, uuidSnapshot);
+    mParent->i_onSnapshotChange(uuidMachine, uuidSnapshot);
 
     return rc;
@@ -1463,5 +1463,5 @@
     {
         // ensure the directory for the saved state file exists
-        HRESULT rc = VirtualBox::ensureFilePathExists(strStateFilePath, true /* fCreate */);
+        HRESULT rc = VirtualBox::i_ensureFilePathExists(strStateFilePath, true /* fCreate */);
         if (FAILED(rc)) return rc;
     }
@@ -1625,6 +1625,6 @@
 
         /* inform callbacks */
-        mParent->onSnapshotTaken(mData->mUuid,
-                                 mConsoleTaskData.mSnapshot->i_getId());
+        mParent->i_onSnapshotTaken(mData->mUuid,
+                                   mConsoleTaskData.mSnapshot->i_getId());
         machineLock.release();
     }
@@ -1660,5 +1660,5 @@
     /* machineLock has been released already */
 
-    mParent->saveModifiedRegistries();
+    mParent->i_saveModifiedRegistries();
 
     return rc;
@@ -1994,5 +1994,5 @@
         alock.release();
 
-        mParent->markRegistryModified(mParent->getGlobalRegistryId());
+        mParent->i_markRegistryModified(mParent->i_getGlobalRegistryId());
 
         // from here on we cannot roll back on failure any more
@@ -2033,5 +2033,5 @@
     }
 
-    mParent->saveModifiedRegistries();
+    mParent->i_saveModifiedRegistries();
 
     /* set the result (this will try to fetch current error info on failure) */
@@ -2039,5 +2039,5 @@
 
     if (SUCCEEDED(rc))
-        mParent->onSnapshotDeleted(mData->mUuid, Guid());
+        mParent->i_onSnapshotDeleted(mData->mUuid, Guid());
 
     LogFlowThisFunc(("Done restoring snapshot (rc=%08X)\n", rc));
@@ -2361,5 +2361,5 @@
         // has exited after setting the machine state to MachineState_DeletingSnapshot
 
-        AutoWriteLock treeLock(mParent->getMediaTreeLockHandle()
+        AutoWriteLock treeLock(mParent->i_getMediaTreeLockHandle()
                                COMMA_LOCKVAL_SRC_POS);
 
@@ -2661,5 +2661,5 @@
                 // machine will need saving now
                 machineLock.release();
-                mParent->markRegistryModified(getId());
+                mParent->i_markRegistryModified(getId());
             }
         }
@@ -2692,5 +2692,5 @@
                 /* no real merge needed, just updating state and delete
                  * diff files if necessary */
-                AutoMultiWriteLock2 mLock(&mParent->getMediaTreeLockHandle(), pMedium->lockHandle() COMMA_LOCKVAL_SRC_POS);
+                AutoMultiWriteLock2 mLock(&mParent->i_getMediaTreeLockHandle(), pMedium->lockHandle() COMMA_LOCKVAL_SRC_POS);
 
                 Assert(   !it->mfMergeForward
@@ -2840,5 +2840,5 @@
 
             // One attachment is merged, must save the settings
-            mParent->markRegistryModified(getId());
+            mParent->i_markRegistryModified(getId());
 
             // prevent calling cancelDeleteSnapshotMedium() for this attachment
@@ -2860,5 +2860,5 @@
 
             machineLock.release();
-            mParent->markRegistryModified(getId());
+            mParent->i_markRegistryModified(getId());
         }
     }
@@ -2874,5 +2874,5 @@
 
         AutoMultiWriteLock2 multiLock(this->lockHandle(),                   // machine
-                                      &mParent->getMediaTreeLockHandle()    // media tree
+                                      &mParent->i_getMediaTreeLockHandle()    // media tree
                                       COMMA_LOCKVAL_SRC_POS);
 
@@ -2902,5 +2902,5 @@
         updateMachineStateOnClient();
 
-        mParent->saveModifiedRegistries();
+        mParent->i_saveModifiedRegistries();
     }
 
@@ -2909,5 +2909,5 @@
 
     if (SUCCEEDED(rc))
-        mParent->onSnapshotDeleted(mData->mUuid, snapshotId);
+        mParent->i_onSnapshotDeleted(mData->mUuid, snapshotId);
 
     LogFlowThisFunc(("Done deleting snapshot (rc=%08X)\n", rc));
@@ -2965,5 +2965,5 @@
                                                     ComPtr<IToken> &aHDLockToken)
 {
-    Assert(!mParent->getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    Assert(!mParent->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
     Assert(!fOnlineMergePossible || VALID_PTR(aVMMALockList));
 
@@ -3255,5 +3255,5 @@
     if (aMediumLockList == NULL)
     {
-        AutoMultiWriteLock2 mLock(&mParent->getMediaTreeLockHandle(), aHD->lockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoMultiWriteLock2 mLock(&mParent->i_getMediaTreeLockHandle(), aHD->lockHandle() COMMA_LOCKVAL_SRC_POS);
 
         Assert(aHD->i_getChildren().size() == 0);
@@ -3446,5 +3446,5 @@
     // the merge; reparent target if necessary and uninitialize media
 
-    AutoWriteLock treeLock(mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock treeLock(mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     // Declare this here to make sure the object does not get uninitialized
@@ -3457,5 +3457,5 @@
         // first, unregister the target since it may become a base
         // hard disk which needs re-registration
-        rc = mParent->unregisterMedium(pDeleteRec->mpTarget);
+        rc = mParent->i_unregisterMedium(pDeleteRec->mpTarget);
         AssertComRC(rc);
 
@@ -3468,5 +3468,5 @@
 
         // then, register again
-        rc = mParent->registerMedium(pDeleteRec->mpTarget, &pDeleteRec->mpTarget, DeviceType_HardDisk);
+        rc = mParent->i_registerMedium(pDeleteRec->mpTarget, &pDeleteRec->mpTarget, DeviceType_HardDisk);
         AssertComRC(rc);
     }
@@ -3540,5 +3540,5 @@
         else
         {
-            rc = mParent->unregisterMedium(pMedium);
+            rc = mParent->i_unregisterMedium(pMedium);
             AssertComRC(rc);
 
Index: /trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp	(revision 50355)
@@ -91,5 +91,5 @@
     {
         unconst(pVirtualBox) = aMachine->getVirtualBox();
-        unconst(pSystemProperties) = pVirtualBox->getSystemProperties();
+        unconst(pSystemProperties) = pVirtualBox->i_getSystemProperties();
     }
 
@@ -147,5 +147,5 @@
     if (FAILED(rc))
         return rc;
-    rc = aParent->getVirtualBox()->getSystemProperties()->GetMaxInstancesOfStorageBus(chipsetType, aStorageBus, &maxInstances);
+    rc = aParent->getVirtualBox()->i_getSystemProperties()->GetMaxInstancesOfStorageBus(chipsetType, aStorageBus, &maxInstances);
     if (FAILED(rc))
         return rc;
Index: /trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp	(revision 50355)
@@ -292,7 +292,7 @@
     alock.release();
 
-    // VirtualBox::saveSettings() needs vbox write lock
+    // VirtualBox::i_saveSettings() needs vbox write lock
     AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = mParent->saveSettings();
+    HRESULT rc = mParent->i_saveSettings();
 
     return rc;
@@ -602,7 +602,7 @@
     if (SUCCEEDED(rc))
     {
-        // VirtualBox::saveSettings() needs vbox write lock
+        // VirtualBox::i_saveSettings() needs vbox write lock
         AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-        rc = mParent->saveSettings();
+        rc = mParent->i_saveSettings();
     }
 
@@ -632,5 +632,5 @@
     {
         AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-        rc = mParent->saveSettings();
+        rc = mParent->i_saveSettings();
     }
     else
@@ -665,7 +665,7 @@
     if (SUCCEEDED(rc))
     {
-        // VirtualBox::saveSettings() needs vbox write lock
+        // VirtualBox::i_saveSettings() needs vbox write lock
         AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-        rc = mParent->saveSettings();
+        rc = mParent->i_saveSettings();
     }
 
@@ -733,7 +733,7 @@
     if (SUCCEEDED(rc))
     {
-        // VirtualBox::saveSettings() needs vbox write lock
+        // VirtualBox::i_saveSettings() needs vbox write lock
         AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-        rc = mParent->saveSettings();
+        rc = mParent->i_saveSettings();
     }
 
@@ -758,7 +758,7 @@
     if (SUCCEEDED(rc))
     {
-        // VirtualBox::saveSettings() needs vbox write lock
+        // VirtualBox::i_saveSettings() needs vbox write lock
         AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-        rc = mParent->saveSettings();
+        rc = mParent->i_saveSettings();
     }
 
@@ -777,5 +777,5 @@
         else
 #ifdef VBOX_WITH_EXTPACK
-            hrc = mParent->getExtPackManager()->checkVrdeExtPack(&strExtPack);
+            hrc = mParent->i_getExtPackManager()->checkVrdeExtPack(&strExtPack);
 #else
             hrc = setError(E_FAIL, tr("The extension pack '%s' does not exist"), strExtPack.c_str());
@@ -785,5 +785,5 @@
     {
 #ifdef VBOX_WITH_EXTPACK
-        hrc = mParent->getExtPackManager()->getDefaultVrdeExtPack(&strExtPack);
+        hrc = mParent->i_getExtPackManager()->getDefaultVrdeExtPack(&strExtPack);
 #endif
         if (strExtPack.isEmpty())
@@ -823,5 +823,5 @@
         else
 #ifdef VBOX_WITH_EXTPACK
-            hrc = mParent->getExtPackManager()->checkVrdeExtPack(&aExtPack);
+            hrc = mParent->i_getExtPackManager()->checkVrdeExtPack(&aExtPack);
 #else
             hrc = setError(E_FAIL, tr("The extension pack '%s' does not exist"), aExtPack.c_str());
@@ -834,8 +834,8 @@
         if (SUCCEEDED(hrc))
         {
-            /* VirtualBox::saveSettings() needs the VirtualBox write lock. */
+            /* VirtualBox::i_saveSettings() needs the VirtualBox write lock. */
             alock.release();
             AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-            hrc = mParent->saveSettings();
+            hrc = mParent->i_saveSettings();
         }
     }
@@ -861,7 +861,7 @@
     alock.release();
 
-    // VirtualBox::saveSettings() needs vbox write lock
+    // VirtualBox::i_saveSettings() needs vbox write lock
     AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = mParent->saveSettings();
+    HRESULT rc = mParent->i_saveSettings();
 
     return rc;
@@ -894,7 +894,7 @@
     if (SUCCEEDED(rc))
     {
-        // VirtualBox::saveSettings() needs vbox write lock
+        // VirtualBox::i_saveSettings() needs vbox write lock
         AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-        rc = mParent->saveSettings();
+        rc = mParent->i_saveSettings();
     }
 
@@ -933,7 +933,7 @@
     if (SUCCEEDED(rc))
     {
-        // VirtualBox::saveSettings() needs vbox write lock
+        // VirtualBox::i_saveSettings() needs vbox write lock
         AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-        rc = mParent->saveSettings();
+        rc = mParent->i_saveSettings();
     }
 
@@ -958,7 +958,7 @@
     if (SUCCEEDED(rc))
     {
-        // VirtualBox::saveSettings() needs vbox write lock
+        // VirtualBox::i_saveSettings() needs vbox write lock
         AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-        rc = mParent->saveSettings();
+        rc = mParent->i_saveSettings();
     }
 
@@ -1216,5 +1216,5 @@
 {
     HRESULT rc = S_OK;
-    AutostartDb *autostartDb = this->mParent->getAutostartDb();
+    AutostartDb *autostartDb = this->mParent->i_getAutostartDb();
 
     if (!aPath.isEmpty())
@@ -1259,5 +1259,5 @@
         vrc = RTPathUserHome(strTemp, sizeof(strTemp));
         AssertRC(vrc);
-        Utf8Str strSrc3 = Utf8StrFmt("%s/VBoxGuestAdditions_%ls.iso", strTemp, Bstr(VirtualBox::getVersionNormalized()).raw());
+        Utf8Str strSrc3 = Utf8StrFmt("%s/VBoxGuestAdditions_%ls.iso", strTemp, Bstr(VirtualBox::i_getVersionNormalized()).raw());
 
         /* Check the standard image locations */
Index: /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp	(revision 50355)
@@ -51,5 +51,5 @@
     Data(Machine *pMachine)
         : pParent(pMachine),
-          pHost(pMachine->getVirtualBox()->host())
+          pHost(pMachine->getVirtualBox()->i_host())
     { }
 
Index: /trunk/src/VBox/Main/src-server/USBProxyService.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBProxyService.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/USBProxyService.cpp	(revision 50355)
@@ -218,5 +218,5 @@
     // (getOpenedMachines requests locks which are incompatible with the lock of the machines list)
     SessionMachinesList llOpenedMachines;
-    mHost->i_parent()->getOpenedMachines(llOpenedMachines);
+    mHost->i_parent()->i_getOpenedMachines(llOpenedMachines);
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -329,5 +329,5 @@
     // (getOpenedMachines requests locks which are incompatible with the host object lock)
     SessionMachinesList llOpenedMachines;
-    mHost->i_parent()->getOpenedMachines(llOpenedMachines);
+    mHost->i_parent()->i_getOpenedMachines(llOpenedMachines);
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -862,5 +862,5 @@
     // (getOpenedMachines requests higher priority locks)
     SessionMachinesList llOpenedMachines;
-    mHost->i_parent()->getOpenedMachines(llOpenedMachines);
+    mHost->i_parent()->i_getOpenedMachines(llOpenedMachines);
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
Index: /trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp	(revision 50355)
@@ -537,5 +537,5 @@
 #ifdef VBOX_WITH_EXTPACK
         VirtualBox *pVirtualBox = mParent->getVirtualBox();
-        ExtPackManager *pExtPackMgr = pVirtualBox->getExtPackManager();
+        ExtPackManager *pExtPackMgr = pVirtualBox->i_getExtPackManager();
         vrc = pExtPackMgr->getVrdeLibraryPathForExtPack(&strExtPack, &strVrdeLibrary);
 #else
@@ -806,5 +806,5 @@
         {
 #ifdef VBOX_WITH_EXTPACK
-            ExtPackManager *pExtPackMgr = mParent->getVirtualBox()->getExtPackManager();
+            ExtPackManager *pExtPackMgr = mParent->getVirtualBox()->i_getExtPackManager();
             hrc = pExtPackMgr->checkVrdeExtPack(&strExtPack);
 #else
@@ -851,5 +851,5 @@
             {
 #ifdef VBOX_WITH_EXTPACK
-                ExtPackManager *pExtPackMgr = mParent->getVirtualBox()->getExtPackManager();
+                ExtPackManager *pExtPackMgr = mParent->getVirtualBox()->i_getExtPackManager();
                 hrc = pExtPackMgr->checkVrdeExtPack(&aExtPack);
 #else
Index: /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp	(revision 50355)
@@ -69,5 +69,4 @@
 #endif /* VBOX_WITH_RESOURCE_USAGE_API */
 #include "EventImpl.h"
-// #include "VBoxEvents.h"
 #ifdef VBOX_WITH_EXTPACK
 # include "ExtPackManagerImpl.h"
@@ -99,8 +98,8 @@
 
 // static
-Bstr VirtualBox::sVersion;
+com::Utf8Str VirtualBox::sVersion;
 
 // static
-Bstr VirtualBox::sVersionNormalized;
+com::Utf8Str VirtualBox::sVersionNormalized;
 
 // static
@@ -108,11 +107,11 @@
 
 // static
-Bstr VirtualBox::sPackageType;
+com::Utf8Str VirtualBox::sPackageType;
 
 // static
-Bstr VirtualBox::sAPIVersion;
+com::Utf8Str VirtualBox::sAPIVersion;
 
 // static
-std::map<Bstr, int> VirtualBox::sNatNetworkNameToRefCount;
+std::map<com::Utf8Str, int> VirtualBox::sNatNetworkNameToRefCount;
 
 // static leaked (todo: find better place to free it.)
@@ -306,9 +305,5 @@
 /////////////////////////////////////////////////////////////////////////////
 
-VirtualBox::VirtualBox()
-{}
-
-VirtualBox::~VirtualBox()
-{}
+DEFINE_EMPTY_CTOR_DTOR(VirtualBox)
 
 HRESULT VirtualBox::FinalConstruct()
@@ -374,5 +369,5 @@
         spMtxNatNetworkNameToRefCountLock = new RWLockHandle(LOCKCLASS_VIRTUALBOXOBJECT);
 
-    LogFlowThisFunc(("Version: %ls, Package: %ls, API Version: %ls\n", sVersion.raw(), sPackageType.raw(), sAPIVersion.raw()));
+    LogFlowThisFunc(("Version: %ls, Package: %ls, API Version: %ls\n", Bstr(sVersion).raw(), Bstr(sPackageType).raw(), Bstr(sAPIVersion).raw()));
 
     /* Get the VirtualBox home directory. */
@@ -471,5 +466,5 @@
 #ifdef DEBUG
         LogFlowThisFunc(("Dumping media backreferences\n"));
-        dumpAllBackRefs();
+        i_dumpAllBackRefs();
 #endif
 
@@ -486,5 +481,5 @@
             if (FAILED(rc)) throw rc;
 
-            rc = registerDHCPServer(pDhcpServer, false /* aSaveRegistry */);
+            rc = i_registerDHCPServer(pDhcpServer, false /* aSaveRegistry */);
             if (FAILED(rc)) throw rc;
         }
@@ -504,5 +499,5 @@
             }
 
-            rc = registerNATNetwork(pNATNetwork, false /* aSaveRegistry */);
+            rc = i_registerNATNetwork(pNATNetwork, false /* aSaveRegistry */);
             AssertComRCReturnRC(rc);
         }
@@ -611,5 +606,5 @@
                                             &uuid);
             if (SUCCEEDED(rc))
-                rc = registerMachine(pMachine);
+                rc = i_registerMachine(pMachine);
             if (FAILED(rc))
                 return rc;
@@ -650,5 +645,5 @@
              strMachineFolder.c_str()));
 
-    AutoWriteLock treeLock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock treeLock(i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     HRESULT rc = S_OK;
@@ -670,5 +665,5 @@
         if (FAILED(rc)) return rc;
 
-        rc = registerMedium(pHardDisk, &pHardDisk, DeviceType_HardDisk);
+        rc = i_registerMedium(pHardDisk, &pHardDisk, DeviceType_HardDisk);
         if (FAILED(rc)) return rc;
     }
@@ -690,5 +685,5 @@
         if (FAILED(rc)) return rc;
 
-        rc = registerMedium(pImage, &pImage, DeviceType_DVD);
+        rc = i_registerMedium(pImage, &pImage, DeviceType_DVD);
         if (FAILED(rc)) return rc;
     }
@@ -710,5 +705,5 @@
         if (FAILED(rc)) return rc;
 
-        rc = registerMedium(pImage, &pImage, DeviceType_Floppy);
+        rc = i_registerMedium(pImage, &pImage, DeviceType_Floppy);
         if (FAILED(rc)) return rc;
     }
@@ -723,5 +718,5 @@
     Assert(!m->uRegistryNeedsSaving);
     if (m->uRegistryNeedsSaving)
-        saveSettings();
+        i_saveSettings();
 
     /* Enclose the state transition Ready->InUninit->NotReady */
@@ -831,135 +826,78 @@
 }
 
-// IVirtualBox properties
+// Wrapped IVirtualBox properties
 /////////////////////////////////////////////////////////////////////////////
-
-STDMETHODIMP VirtualBox::COMGETTER(Version)(BSTR *aVersion)
-{
-    CheckComArgNotNull(aVersion);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    sVersion.cloneTo(aVersion);
+HRESULT VirtualBox::getVersion(com::Utf8Str &aVersion)
+{
+    aVersion = sVersion;
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(VersionNormalized)(BSTR *aVersionNormalized)
-{
-    CheckComArgNotNull(aVersionNormalized);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    sVersionNormalized.cloneTo(aVersionNormalized);
+HRESULT VirtualBox::getVersionNormalized(com::Utf8Str &aVersionNormalized)
+{
+    aVersionNormalized = sVersionNormalized;
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(Revision)(ULONG *aRevision)
-{
-    CheckComArgNotNull(aRevision);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getRevision(ULONG *aRevision)
+{
     *aRevision = sRevision;
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(PackageType)(BSTR *aPackageType)
-{
-    CheckComArgNotNull(aPackageType);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    sPackageType.cloneTo(aPackageType);
+HRESULT VirtualBox::getPackageType(com::Utf8Str &aPackageType)
+{
+    aPackageType = sPackageType;
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(APIVersion)(BSTR *aAPIVersion)
-{
-    CheckComArgNotNull(aAPIVersion);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    sAPIVersion.cloneTo(aAPIVersion);
+HRESULT VirtualBox::getAPIVersion(com::Utf8Str &aAPIVersion)
+{
+    aAPIVersion = sAPIVersion;
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(HomeFolder)(BSTR *aHomeFolder)
-{
-    CheckComArgNotNull(aHomeFolder);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getHomeFolder(com::Utf8Str &aHomeFolder)
+{
     /* mHomeDir is const and doesn't need a lock */
-    m->strHomeDir.cloneTo(aHomeFolder);
+    aHomeFolder = m->strHomeDir;
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(SettingsFilePath)(BSTR *aSettingsFilePath)
-{
-    CheckComArgNotNull(aSettingsFilePath);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getSettingsFilePath(com::Utf8Str &aSettingsFilePath)
+{
     /* mCfgFile.mName is const and doesn't need a lock */
-    m->strSettingsFilePath.cloneTo(aSettingsFilePath);
+    aSettingsFilePath = m->strSettingsFilePath;
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(Host)(IHost **aHost)
-{
-    CheckComArgOutPointerValid(aHost);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getHost(ComPtr<IHost> &aHost)
+{
     /* mHost is const, no need to lock */
-    m->pHost.queryInterfaceTo(aHost);
+    m->pHost.queryInterfaceTo(aHost.asOutParam());
     return S_OK;
 }
 
-STDMETHODIMP
-VirtualBox::COMGETTER(SystemProperties)(ISystemProperties **aSystemProperties)
-{
-    CheckComArgOutPointerValid(aSystemProperties);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getSystemProperties(ComPtr<ISystemProperties> &aSystemProperties)
+{
     /* mSystemProperties is const, no need to lock */
-    m->pSystemProperties.queryInterfaceTo(aSystemProperties);
+    m->pSystemProperties.queryInterfaceTo(aSystemProperties.asOutParam());
     return S_OK;
 }
 
-STDMETHODIMP
-VirtualBox::COMGETTER(Machines)(ComSafeArrayOut(IMachine *, aMachines))
-{
-    CheckComArgOutSafeArrayPointerValid(aMachines);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getMachines(std::vector<ComPtr<IMachine> > &aMachines)
+{
     AutoReadLock al(m->allMachines.getLockHandle() COMMA_LOCKVAL_SRC_POS);
-    SafeIfaceArray<IMachine> machines(m->allMachines.getList());
-    machines.detachTo(ComSafeArrayOutArg(aMachines));
-
+    aMachines.resize(m->allMachines.size());
+    size_t i = 0;
+    for (MachinesOList::const_iterator it= m->allMachines.begin();
+         it!= m->allMachines.end(); ++it, ++i)
+        (*it).queryInterfaceTo(aMachines[i].asOutParam());
     return S_OK;
 }
 
-STDMETHODIMP
-VirtualBox::COMGETTER(MachineGroups)(ComSafeArrayOut(BSTR, aMachineGroups))
-{
-    CheckComArgOutSafeArrayPointerValid(aMachineGroups);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    std::list<Bstr> allGroups;
+HRESULT VirtualBox::getMachineGroups(std::vector<com::Utf8Str> &aMachineGroups)
+{
+    std::list<com::Utf8Str> allGroups;
 
     /* get copy of all machine references, to avoid holding the list lock */
@@ -983,6 +921,5 @@
             const StringsList &thisGroups = pMachine->getGroups();
             for (StringsList::const_iterator it2 = thisGroups.begin();
-                 it2 != thisGroups.end();
-                 ++it2)
+                 it2 != thisGroups.end(); ++it2)
                 allGroups.push_back(*it2);
         }
@@ -992,114 +929,83 @@
     allGroups.sort();
     allGroups.unique();
-    com::SafeArray<BSTR> machineGroups(allGroups.size());
+    aMachineGroups.resize(allGroups.size());
     size_t i = 0;
-    for (std::list<Bstr>::const_iterator it = allGroups.begin();
-         it != allGroups.end();
-         ++it, i++)
-    {
-        const Bstr &tmp = *it;
-        tmp.cloneTo(&machineGroups[i]);
-    }
-    machineGroups.detachTo(ComSafeArrayOutArg(aMachineGroups));
-
+    for (std::list<com::Utf8Str>::const_iterator it = allGroups.begin();
+         it != allGroups.end(); ++it, ++i)
+        aMachineGroups[i] = (*it);
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(HardDisks)(ComSafeArrayOut(IMedium *, aHardDisks))
-{
-    CheckComArgOutSafeArrayPointerValid(aHardDisks);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getHardDisks(std::vector<ComPtr<IMedium> > &aHardDisks)
+{
     AutoReadLock al(m->allHardDisks.getLockHandle() COMMA_LOCKVAL_SRC_POS);
-    SafeIfaceArray<IMedium> hardDisks(m->allHardDisks.getList());
-    hardDisks.detachTo(ComSafeArrayOutArg(aHardDisks));
-
+    aHardDisks.resize(m->allHardDisks.size());
+    size_t i = 0;
+    for (MediaOList::const_iterator it = m->allHardDisks.begin();
+         it !=  m->allHardDisks.end(); ++it, ++i)
+        (*it).queryInterfaceTo(aHardDisks[i].asOutParam());
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(DVDImages)(ComSafeArrayOut(IMedium *, aDVDImages))
-{
-    CheckComArgOutSafeArrayPointerValid(aDVDImages);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getDVDImages(std::vector<ComPtr<IMedium> > &aDVDImages)
+{
     AutoReadLock al(m->allDVDImages.getLockHandle() COMMA_LOCKVAL_SRC_POS);
-    SafeIfaceArray<IMedium> images(m->allDVDImages.getList());
-    images.detachTo(ComSafeArrayOutArg(aDVDImages));
-
+    aDVDImages.resize(m->allDVDImages.size());
+    size_t i = 0;
+    for (MediaOList::const_iterator it = m->allDVDImages.begin();
+         it!= m->allDVDImages.end(); ++it, ++i)
+        (*it).queryInterfaceTo(aDVDImages[i].asOutParam());
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(FloppyImages)(ComSafeArrayOut(IMedium *, aFloppyImages))
-{
-    CheckComArgOutSafeArrayPointerValid(aFloppyImages);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getFloppyImages(std::vector<ComPtr<IMedium> > &aFloppyImages)
+{
     AutoReadLock al(m->allFloppyImages.getLockHandle() COMMA_LOCKVAL_SRC_POS);
-    SafeIfaceArray<IMedium> images(m->allFloppyImages.getList());
-    images.detachTo(ComSafeArrayOutArg(aFloppyImages));
-
+    aFloppyImages.resize(m->allFloppyImages.size());
+    size_t i = 0;
+    for (MediaOList::const_iterator it = m->allFloppyImages.begin();
+         it != m->allFloppyImages.end(); ++it, ++i)
+        (*it).queryInterfaceTo(aFloppyImages[i].asOutParam());
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(ProgressOperations)(ComSafeArrayOut(IProgress *, aOperations))
-{
-    CheckComArgOutPointerValid(aOperations);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getProgressOperations(std::vector<ComPtr<IProgress> > &aProgressOperations)
+{
     /* protect mProgressOperations */
     AutoReadLock safeLock(m->mtxProgressOperations COMMA_LOCKVAL_SRC_POS);
-    SafeIfaceArray<IProgress> progress(m->mapProgressOperations);
-    progress.detachTo(ComSafeArrayOutArg(aOperations));
-
+    ProgressMap pmap(m->mapProgressOperations);
+    aProgressOperations.resize(pmap.size());
+    size_t i = 0;
+    for (ProgressMap::iterator it = pmap.begin(); it != pmap.end(); ++it, ++i)
+        it->second.queryInterfaceTo(aProgressOperations[i].asOutParam());
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(GuestOSTypes)(ComSafeArrayOut(IGuestOSType *, aGuestOSTypes))
-{
-    CheckComArgOutSafeArrayPointerValid(aGuestOSTypes);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getGuestOSTypes(std::vector<ComPtr<IGuestOSType> > &aGuestOSTypes)
+{
     AutoReadLock al(m->allGuestOSTypes.getLockHandle() COMMA_LOCKVAL_SRC_POS);
-    SafeIfaceArray<IGuestOSType> ostypes(m->allGuestOSTypes.getList());
-    ostypes.detachTo(ComSafeArrayOutArg(aGuestOSTypes));
-
+    aGuestOSTypes.resize(m->allGuestOSTypes.size());
+    size_t i = 0;
+    for (GuestOSTypesOList::const_iterator it = m->allGuestOSTypes.begin();
+         it != m->allGuestOSTypes.end(); ++it, ++i)
+         (*it).queryInterfaceTo(aGuestOSTypes[i].asOutParam());
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(SharedFolders)(ComSafeArrayOut(ISharedFolder *, aSharedFolders))
-{
-#ifndef RT_OS_WINDOWS
-    NOREF(aSharedFoldersSize);
-#endif /* RT_OS_WINDOWS */
-
-    CheckComArgOutSafeArrayPointerValid(aSharedFolders);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT VirtualBox::getSharedFolders(std::vector<ComPtr<ISharedFolder> > &aSharedFolders)
+{
+ #ifndef RT_OS_WINDOWS
+     NOREF(aSharedFolders);
+ #endif /* RT_OS_WINDOWS */
+     NOREF(aSharedFolders);
 
     return setError(E_NOTIMPL, "Not yet implemented");
 }
 
-STDMETHODIMP
-VirtualBox::COMGETTER(PerformanceCollector)(IPerformanceCollector **aPerformanceCollector)
+HRESULT VirtualBox::getPerformanceCollector(ComPtr<IPerformanceCollector> &aPerformanceCollector)
 {
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
-    CheckComArgOutPointerValid(aPerformanceCollector);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     /* mPerformanceCollector is const, no need to lock */
-    m->pPerformanceCollector.queryInterfaceTo(aPerformanceCollector);
+    m->pPerformanceCollector.queryInterfaceTo(aPerformanceCollector.asOutParam());
 
     return S_OK;
@@ -1110,86 +1016,59 @@
 }
 
-STDMETHODIMP
-VirtualBox::COMGETTER(DHCPServers)(ComSafeArrayOut(IDHCPServer *, aDHCPServers))
-{
-    CheckComArgOutSafeArrayPointerValid(aDHCPServers);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getDHCPServers(std::vector<ComPtr<IDHCPServer> > &aDHCPServers)
+{
     AutoReadLock al(m->allDHCPServers.getLockHandle() COMMA_LOCKVAL_SRC_POS);
-    SafeIfaceArray<IDHCPServer> svrs(m->allDHCPServers.getList());
-    svrs.detachTo(ComSafeArrayOutArg(aDHCPServers));
-
+    aDHCPServers.resize(m->allDHCPServers.size());
+    size_t i = 0;
+    for (DHCPServersOList::const_iterator it= m->allDHCPServers.begin();
+         it!= m->allDHCPServers.end(); ++it, ++i)
+         (*it).queryInterfaceTo(aDHCPServers[i].asOutParam());
     return S_OK;
 }
 
 
-STDMETHODIMP
-VirtualBox::COMGETTER(NATNetworks)(ComSafeArrayOut(INATNetwork *, aNATNetworks))
+HRESULT VirtualBox::getNATNetworks(std::vector<ComPtr<INATNetwork> > &aNATNetworks)
 {
 #ifdef VBOX_WITH_NAT_SERVICE
-    CheckComArgOutSafeArrayPointerValid(aNATNetworks);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoReadLock al(m->allNATNetworks.getLockHandle() COMMA_LOCKVAL_SRC_POS);
-    SafeIfaceArray<INATNetwork> nets(m->allNATNetworks.getList());
-    nets.detachTo(ComSafeArrayOutArg(aNATNetworks));
-
+    aNATNetworks.resize(m->allNATNetworks.size());
+    size_t i = 0;
+    for (NATNetworksOList::const_iterator it= m->allNATNetworks.begin();
+         it!= m->allNATNetworks.end(); ++it, ++i)
+         (*it).queryInterfaceTo(aNATNetworks[i].asOutParam());
     return S_OK;
 #else
     NOREF(aNATNetworks);
 # ifndef RT_OS_WINDOWS
-    NOREF(aNATNetworksSize);
+    NOREF(aNATNetworks);
 # endif
+    NOREF(aNATNetworks);
     return E_NOTIMPL;
 #endif
 }
 
-
-STDMETHODIMP
-VirtualBox::COMGETTER(EventSource)(IEventSource ** aEventSource)
-{
-    CheckComArgOutPointerValid(aEventSource);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getEventSource(ComPtr<IEventSource> &aEventSource)
+{
     /* event source is const, no need to lock */
-    m->pEventSource.queryInterfaceTo(aEventSource);
-
+    m->pEventSource.queryInterfaceTo(aEventSource.asOutParam());
     return S_OK;
 }
 
-STDMETHODIMP
-VirtualBox::COMGETTER(ExtensionPackManager)(IExtPackManager **aExtPackManager)
-{
-    CheckComArgOutPointerValid(aExtPackManager);
-
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
+HRESULT VirtualBox::getExtensionPackManager(ComPtr<IExtPackManager> &aExtensionPackManager)
+{
+    HRESULT hrc = S_OK;
 #ifdef VBOX_WITH_EXTPACK
-        /* The extension pack manager is const, no need to lock. */
-        hrc = m->ptrExtPackManager.queryInterfaceTo(aExtPackManager);
+    /* The extension pack manager is const, no need to lock. */
+    hrc = m->ptrExtPackManager.queryInterfaceTo(aExtensionPackManager.asOutParam());
 #else
-        hrc = E_NOTIMPL;
+    hrc = E_NOTIMPL;
+    NOREF(aExtensionPackManager);
 #endif
-    }
-
     return hrc;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(InternalNetworks)(ComSafeArrayOut(BSTR, aInternalNetworks))
-{
-    CheckComArgOutSafeArrayPointerValid(aInternalNetworks);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    std::list<Bstr> allInternalNetworks;
+HRESULT VirtualBox::getInternalNetworks(std::vector<com::Utf8Str> &aInternalNetworks)
+{
+    std::list<com::Utf8Str> allInternalNetworks;
 
     /* get copy of all machine references, to avoid holding the list lock */
@@ -1200,6 +1079,5 @@
     }
     for (MachinesOList::MyList::const_iterator it = allMachines.begin();
-         it != allMachines.end();
-         ++it)
+         it != allMachines.end(); ++it)
     {
         const ComObjPtr<Machine> &pMachine = *it;
@@ -1223,5 +1101,5 @@
                     continue;
 
-                allInternalNetworks.push_back(strInternalNetwork);
+                allInternalNetworks.push_back(Utf8Str(strInternalNetwork));
             }
         }
@@ -1231,26 +1109,16 @@
     allInternalNetworks.sort();
     allInternalNetworks.unique();
-    com::SafeArray<BSTR> internalNetworks(allInternalNetworks.size());
     size_t i = 0;
-    for (std::list<Bstr>::const_iterator it = allInternalNetworks.begin();
+    aInternalNetworks.resize(allInternalNetworks.size());
+    for (std::list<com::Utf8Str>::const_iterator it = allInternalNetworks.begin();
          it != allInternalNetworks.end();
-         ++it, i++)
-    {
-        const Bstr &tmp = *it;
-        tmp.cloneTo(&internalNetworks[i]);
-    }
-    internalNetworks.detachTo(ComSafeArrayOutArg(aInternalNetworks));
-
+         ++it, ++i)
+        aInternalNetworks[i] = *it;
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::COMGETTER(GenericNetworkDrivers)(ComSafeArrayOut(BSTR, aGenericNetworkDrivers))
-{
-    CheckComArgOutSafeArrayPointerValid(aGenericNetworkDrivers);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    std::list<Bstr> allGenericNetworkDrivers;
+HRESULT VirtualBox::getGenericNetworkDrivers(std::vector<com::Utf8Str> &aGenericNetworkDrivers)
+{
+    std::list<com::Utf8Str> allGenericNetworkDrivers;
 
     /* get copy of all machine references, to avoid holding the list lock */
@@ -1284,5 +1152,5 @@
                     continue;
 
-                allGenericNetworkDrivers.push_back(strGenericNetworkDriver);
+                allGenericNetworkDrivers.push_back(Utf8Str(strGenericNetworkDriver).c_str());
             }
         }
@@ -1292,30 +1160,19 @@
     allGenericNetworkDrivers.sort();
     allGenericNetworkDrivers.unique();
-    com::SafeArray<BSTR> genericNetworks(allGenericNetworkDrivers.size());
+    aGenericNetworkDrivers.resize(allGenericNetworkDrivers.size());
     size_t i = 0;
-    for (std::list<Bstr>::const_iterator it = allGenericNetworkDrivers.begin();
-         it != allGenericNetworkDrivers.end();
-         ++it, i++)
-    {
-        const Bstr &tmp = *it;
-        tmp.cloneTo(&genericNetworks[i]);
-    }
-    genericNetworks.detachTo(ComSafeArrayOutArg(aGenericNetworkDrivers));
+    for (std::list<com::Utf8Str>::const_iterator it = allGenericNetworkDrivers.begin();
+         it != allGenericNetworkDrivers.end(); ++it, ++i)
+        aGenericNetworkDrivers[i] = *it;
 
     return S_OK;
 }
 
-STDMETHODIMP
-VirtualBox::CheckFirmwarePresent(FirmwareType_T aFirmwareType,
-                                 IN_BSTR        aVersion,
-                                 BSTR           *aUrl,
-                                 BSTR           *aFile,
-                                 BOOL           *aResult)
-{
-    CheckComArgNotNull(aResult);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::checkFirmwarePresent(FirmwareType_T aFirmwareType,
+                                         const com::Utf8Str &aVersion,
+                                         com::Utf8Str &aUrl,
+                                         com::Utf8Str &aFile,
+                                         BOOL *aResult)
+{
     NOREF(aVersion);
 
@@ -1360,11 +1217,10 @@
                                RTPATH_DELIMITER,
                                firmwareDesc[i].fileName);
-        int rc = calculateFullPath(shortName, fullName);
+        int rc = i_calculateFullPath(shortName, fullName);
         AssertRCReturn(rc, rc);
         if (RTFileExists(fullName.c_str()))
         {
             *aResult = TRUE;
-            if (aFile)
-                Utf8Str(fullName).cloneTo(aFile);
+            aFile = fullName;
             break;
         }
@@ -1380,15 +1236,10 @@
         {
             *aResult = TRUE;
-            if (aFile)
-                Utf8Str(fullName).cloneTo(aFile);
+            aFile = fullName;
             break;
         }
 
         /** @todo: account for version in the URL */
-        if (aUrl != NULL)
-        {
-            Utf8Str strUrl(firmwareDesc[i].url);
-            strUrl.cloneTo(aUrl);
-        }
+        aUrl = firmwareDesc[i].url;
         *aResult = FALSE;
 
@@ -1399,5 +1250,5 @@
     return S_OK;
 }
-// IVirtualBox methods
+// Wrapped IVirtualBox methods
 /////////////////////////////////////////////////////////////////////////////
 
@@ -1405,18 +1256,16 @@
 static void sanitiseMachineFilename(Utf8Str &aName);
 
-STDMETHODIMP VirtualBox::ComposeMachineFilename(IN_BSTR aName,
-                                                IN_BSTR aGroup,
-                                                IN_BSTR aCreateFlags,
-                                                IN_BSTR aBaseFolder,
-                                                BSTR *aFilename)
+STDMETHODIMP VirtualBox::composeMachineFilename(const com::Utf8Str &aName,
+                                                const com::Utf8Str &aGroup,
+                                                const com::Utf8Str &aCreateFlags,
+                                                const com::Utf8Str &aBaseFolder,
+                                                com::Utf8Str       &aFile)
 {
     LogFlowThisFuncEnter();
-    LogFlowThisFunc(("aName=\"%ls\",aBaseFolder=\"%ls\"\n", aName, aBaseFolder));
-
-    CheckComArgStrNotEmptyOrNull(aName);
-    CheckComArgOutPointerValid(aFilename);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    Utf8Str strBase = aBaseFolder;
+    Utf8Str strName = aName;
+
+    LogFlowThisFunc(("aName=\"%ls\",aBaseFolder=\"%ls\"\n", strName.c_str(), strBase.c_str()));
 
     Utf8Str strCreateFlags(aCreateFlags);
@@ -1468,5 +1317,5 @@
     if (strGroup.isEmpty())
         strGroup = "/";
-    HRESULT rc = validateMachineGroup(strGroup, true);
+    HRESULT rc = i_validateMachineGroup(strGroup, true);
     if (FAILED(rc))
         return rc;
@@ -1481,6 +1330,4 @@
      * using it.
      */
-    Utf8Str strBase = aBaseFolder;
-    Utf8Str strName = aName;
     Utf8Str strDirName(strName);
     if (fDirectoryIncludesUUID)
@@ -1491,21 +1338,18 @@
     if (strBase.isEmpty())
         /* we use the non-full folder value below to keep the path relative */
-        getDefaultMachineFolder(strBase);
-
-    calculateFullPath(strBase, strBase);
+        i_getDefaultMachineFolder(strBase);
+
+    i_calculateFullPath(strBase, strBase);
 
     /* eliminate toplevel group to avoid // in the result */
     if (strGroup == "/")
         strGroup.setNull();
-    Bstr bstrSettingsFile = BstrFmt("%s%s%c%s%c%s.vbox",
-                                    strBase.c_str(),
-                                    strGroup.c_str(),
-                                    RTPATH_DELIMITER,
-                                    strDirName.c_str(),
-                                    RTPATH_DELIMITER,
-                                    strName.c_str());
-
-    bstrSettingsFile.detachTo(aFilename);
-
+    aFile = com::Utf8StrFmt("%s%s%c%s%c%s.vbox",
+                            strBase.c_str(),
+                            strGroup.c_str(),
+                            RTPATH_DELIMITER,
+                            strDirName.c_str(),
+                            RTPATH_DELIMITER,
+                            strName.c_str());
     return S_OK;
 }
@@ -1598,27 +1442,21 @@
 
 /** @note Locks mSystemProperties object for reading. */
-STDMETHODIMP VirtualBox::CreateMachine(IN_BSTR aSettingsFile,
-                                       IN_BSTR aName,
-                                       ComSafeArrayIn(IN_BSTR, aGroups),
-                                       IN_BSTR aOsTypeId,
-                                       IN_BSTR aCreateFlags,
-                                       IMachine **aMachine)
+HRESULT VirtualBox::createMachine(const com::Utf8Str &aSettingsFile,
+                                  const com::Utf8Str &aName,
+                                  const std::vector<com::Utf8Str> &aGroups,
+                                  const com::Utf8Str &aOsTypeId,
+                                  const com::Utf8Str &aFlags,
+                                  ComPtr<IMachine> &aMachine)
 {
     LogFlowThisFuncEnter();
-    LogFlowThisFunc(("aSettingsFile=\"%ls\", aName=\"%ls\", aOsTypeId =\"%ls\", aCreateFlags=\"%ls\"\n", aSettingsFile, aName, aOsTypeId, aCreateFlags));
-
-    CheckComArgStrNotEmptyOrNull(aName);
+    LogFlowThisFunc(("aSettingsFile=\"%ls\", aName=\"%ls\", aOsTypeId =\"%ls\", aCreateFlags=\"%ls\"\n", Bstr(aSettingsFile).raw(), Bstr(aName).raw(), Bstr(aOsTypeId).raw(), Bstr(aFlags).raw()));
     /** @todo tighten checks on aId? */
-    CheckComArgOutPointerValid(aMachine);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
     StringsList llGroups;
-    HRESULT rc = convertMachineGroups(ComSafeArrayInArg(aGroups), &llGroups);
+    HRESULT rc = i_convertMachineGroups(aGroups, &llGroups);
     if (FAILED(rc))
         return rc;
 
-    Utf8Str strCreateFlags(aCreateFlags);
+    Utf8Str strCreateFlags(aFlags);
     Guid id;
     bool fForceOverwrite = false;
@@ -1676,10 +1514,13 @@
             strNewCreateFlags += ",directoryIncludesUUID=1";
 
-        rc = ComposeMachineFilename(aName,
-                                    Bstr(llGroups.front()).raw(),
-                                    Bstr(strNewCreateFlags).raw(),
-                                    NULL /* aBaseFolder */,
-                                    bstrSettingsFile.asOutParam());
+        com::Utf8Str blstr = "";
+        com::Utf8Str sf = aSettingsFile;
+        rc = composeMachineFilename(aName,
+                                    llGroups.front(),
+                                    strNewCreateFlags,
+                                    blstr /* aBaseFolder */,
+                                    sf);
         if (FAILED(rc)) return rc;
+        bstrSettingsFile = Bstr(sf).raw();
     }
 
@@ -1690,5 +1531,5 @@
 
     GuestOSType *osType = NULL;
-    rc = findGuestOSType(Bstr(aOsTypeId), osType);
+    rc = i_findGuestOSType(Bstr(aOsTypeId), osType);
     if (FAILED(rc)) return rc;
 
@@ -1705,5 +1546,5 @@
     {
         /* set the return value */
-        rc = machine.queryInterfaceTo(aMachine);
+        machine.queryInterfaceTo(aMachine.asOutParam());
         AssertComRC(rc);
 
@@ -1719,13 +1560,7 @@
 }
 
-STDMETHODIMP VirtualBox::OpenMachine(IN_BSTR aSettingsFile,
-                                     IMachine **aMachine)
-{
-    CheckComArgStrNotEmptyOrNull(aSettingsFile);
-    CheckComArgOutPointerValid(aMachine);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::openMachine(const com::Utf8Str &aSettingsFile,
+                                ComPtr<IMachine> &aMachine)
+{
     HRESULT rc = E_FAIL;
 
@@ -1742,5 +1577,5 @@
         {
             /* set the return value */
-            rc = machine.queryInterfaceTo(aMachine);
+            machine.queryInterfaceTo(aMachine.asOutParam());
             ComAssertComRC(rc);
         }
@@ -1751,11 +1586,6 @@
 
 /** @note Locks objects! */
-STDMETHODIMP VirtualBox::RegisterMachine(IMachine *aMachine)
-{
-    CheckComArgNotNull(aMachine);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::registerMachine(const ComPtr<IMachine> &aMachine)
+{
     HRESULT rc;
 
@@ -1766,13 +1596,14 @@
     /* We can safely cast child to Machine * here because only Machine
      * implementations of IMachine can be among our children. */
-    Machine *pMachine = static_cast<Machine*>(aMachine);
+    IMachine *aM = aMachine;
+    Machine *pMachine = static_cast<Machine*>(aM);
 
     AutoCaller machCaller(pMachine);
     ComAssertComRCRetRC(machCaller.rc());
 
-    rc = registerMachine(pMachine);
+    rc = i_registerMachine(pMachine);
     /* fire an event */
     if (SUCCEEDED(rc))
-        onMachineRegistered(pMachine->getId(), TRUE);
+        i_onMachineRegistered(pMachine->getId(), TRUE);
 
     return rc;
@@ -1780,14 +1611,9 @@
 
 /** @note Locks this object for reading, then some machine objects for reading. */
-STDMETHODIMP VirtualBox::FindMachine(IN_BSTR aNameOrId, IMachine **aMachine)
+HRESULT VirtualBox::findMachine(const com::Utf8Str &aSettingsFile,
+                                ComPtr<IMachine> &aMachine)
 {
     LogFlowThisFuncEnter();
-    LogFlowThisFunc(("aName=\"%ls\", aMachine={%p}\n", aNameOrId, aMachine));
-
-    CheckComArgStrNotEmptyOrNull(aNameOrId);
-    CheckComArgOutPointerValid(aMachine);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    LogFlowThisFunc(("aSettingsFile=\"%ls\", aMachine={%p}\n", Bstr(aSettingsFile).raw(), &aMachine));
 
     /* start with not found */
@@ -1795,25 +1621,25 @@
     ComObjPtr<Machine> pMachineFound;
 
-    Guid id(aNameOrId);
+    Guid id(Bstr(aSettingsFile).raw());
+    Utf8Str strFile(aSettingsFile);
     if (id.isValid() && !id.isZero())
 
-        rc = findMachine(id,
-                         true /* fPermitInaccessible */,
-                         true /* setError */,
-                         &pMachineFound);
-                // returns VBOX_E_OBJECT_NOT_FOUND if not found and sets error
+        rc = i_findMachine(id,
+                           true /* fPermitInaccessible */,
+                           true /* setError */,
+                           &pMachineFound);
+        // returns VBOX_E_OBJECT_NOT_FOUND if not found and sets error
     else
     {
-        Utf8Str strName(aNameOrId);
-        rc = findMachineByName(aNameOrId,
-                               true /* setError */,
-                               &pMachineFound);
-                // returns VBOX_E_OBJECT_NOT_FOUND if not found and sets error
+        rc = i_findMachineByName(strFile,
+                                 true /* setError */,
+                                 &pMachineFound);
+        // returns VBOX_E_OBJECT_NOT_FOUND if not found and sets error
     }
 
     /* this will set (*machine) to NULL if machineObj is null */
-    pMachineFound.queryInterfaceTo(aMachine);
-
-    LogFlowThisFunc(("aName=\"%ls\", aMachine=%p, rc=%08X\n", aNameOrId, *aMachine, rc));
+    pMachineFound.queryInterfaceTo(aMachine.asOutParam());
+
+    LogFlowThisFunc(("aName=\"%ls\", aMachine=%p, rc=%08X\n", Bstr(aSettingsFile).raw(), &aMachine, rc));
     LogFlowThisFuncLeave();
 
@@ -1821,16 +1647,12 @@
 }
 
-STDMETHODIMP VirtualBox::GetMachinesByGroups(ComSafeArrayIn(IN_BSTR, aGroups), ComSafeArrayOut(IMachine *, aMachines))
-{
-    CheckComArgSafeArrayNotNull(aGroups);
-    CheckComArgOutSafeArrayPointerValid(aMachines);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::getMachinesByGroups(const std::vector<com::Utf8Str> &aGroups,
+                                        std::vector<ComPtr<IMachine> > &aMachines)
+{
     StringsList llGroups;
-    HRESULT rc = convertMachineGroups(ComSafeArrayInArg(aGroups), &llGroups);
+    HRESULT rc = i_convertMachineGroups(aGroups, &llGroups);
     if (FAILED(rc))
         return rc;
+
     /* we want to rely on sorted groups during compare, to save time */
     llGroups.sort();
@@ -1838,10 +1660,9 @@
     /* get copy of all machine references, to avoid holding the list lock */
     MachinesOList::MyList allMachines;
-    {
-        AutoReadLock al(m->allMachines.getLockHandle() COMMA_LOCKVAL_SRC_POS);
-        allMachines = m->allMachines.getList();
-    }
-
-    com::SafeIfaceArray<IMachine> saMachines;
+    AutoReadLock al(m->allMachines.getLockHandle() COMMA_LOCKVAL_SRC_POS);
+    allMachines = m->allMachines.getList();
+
+    std::vector<ComObjPtr<IMachine> > saMachines;
+    saMachines.resize(0);
     for (MachinesOList::MyList::const_iterator it = allMachines.begin();
          it != allMachines.end();
@@ -1870,5 +1691,5 @@
                     if (order == 0)
                     {
-                        saMachines.push_back(pMachine);
+                        saMachines.push_back(static_cast<IMachine *>(pMachine));
                         fAppended = true;
                         break;
@@ -1885,17 +1706,17 @@
         }
     }
-
-    saMachines.detachTo(ComSafeArrayOutArg(aMachines));
+    aMachines.resize(saMachines.size());
+    size_t i = 0;
+    for(i = 0; i < saMachines.size(); ++i)
+        saMachines[i].queryInterfaceTo(aMachines[i].asOutParam());
 
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::GetMachineStates(ComSafeArrayIn(IMachine *, aMachines), ComSafeArrayOut(MachineState_T, aStates))
-{
-    CheckComArgSafeArrayNotNull(aMachines);
-    CheckComArgOutSafeArrayPointerValid(aStates);
-
-    com::SafeIfaceArray<IMachine> saMachines(ComSafeArrayInArg(aMachines));
-    com::SafeArray<MachineState_T> saStates(saMachines.size());
+HRESULT VirtualBox::getMachineStates(const std::vector<ComPtr<IMachine> > &aMachines,
+                                     std::vector<MachineState_T> &aStates)
+{
+    com::SafeIfaceArray<IMachine> saMachines(aMachines);
+    aStates.resize(aMachines.size());
     for (size_t i = 0; i < saMachines.size(); i++)
     {
@@ -1909,25 +1730,17 @@
             AssertComRC(rc);
         }
-        saStates[i] = state;
-    }
-    saStates.detachTo(ComSafeArrayOutArg(aStates));
-
+        aStates[i] = state;
+    }
     return S_OK;
 }
 
-STDMETHODIMP VirtualBox::CreateHardDisk(IN_BSTR aFormat,
-                                        IN_BSTR aLocation,
-                                        IMedium **aHardDisk)
-{
-    CheckComArgOutPointerValid(aHardDisk);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::createHardDisk(const com::Utf8Str &aFormat,
+                                   const com::Utf8Str &aLocation,
+                                   ComPtr<IMedium> &aMedium)
+{
     /* we don't access non-const data members so no need to lock */
-
-    Utf8Str format(aFormat);
+    com::Utf8Str format = aFormat;
     if (format.isEmpty())
-        getDefaultHardDiskFormat(format);
+        i_getDefaultHardDiskFormat(format);
 
     ComObjPtr<Medium> hardDisk;
@@ -1937,25 +1750,19 @@
                                 aLocation,
                                 Guid::Empty /* media registry: none yet */);
-
     if (SUCCEEDED(rc))
-        hardDisk.queryInterfaceTo(aHardDisk);
+        hardDisk.queryInterfaceTo(aMedium.asOutParam());
 
     return rc;
 }
 
-STDMETHODIMP VirtualBox::OpenMedium(IN_BSTR aLocation,
-                                    DeviceType_T deviceType,
-                                    AccessMode_T accessMode,
-                                    BOOL fForceNewUuid,
-                                    IMedium **aMedium)
+HRESULT VirtualBox::openMedium(const com::Utf8Str &aLocation,
+                               DeviceType_T aDeviceType,
+                               AccessMode_T aAccessMode,
+                               BOOL aForceNewUuid,
+                               ComPtr<IMedium> &aMedium)
 {
     HRESULT rc = S_OK;
-    CheckComArgStrNotEmptyOrNull(aLocation);
-    CheckComArgOutPointerValid(aMedium);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     Guid id(aLocation);
+    const Guid cid = id;
     ComObjPtr<Medium> pMedium;
 
@@ -1963,17 +1770,17 @@
     // in one critical section, otherwise there are races which can lead to
     // multiple Medium objects with the same content
-    AutoWriteLock treeLock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock treeLock(i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     // check if the device type is correct, and see if a medium for the
     // given path has already initialized; if so, return that
-    switch (deviceType)
+    switch (aDeviceType)
     {
         case DeviceType_HardDisk:
             if (id.isValid() && !id.isZero())
-                rc = findHardDiskById(id, false /* setError */, &pMedium);
+                rc = i_findHardDiskById(id, false /* setError */, &pMedium);
             else
-                rc = findHardDiskByLocation(aLocation,
-                                            false, /* aSetError */
-                                            &pMedium);
+                rc = i_findHardDiskByLocation(aLocation,
+                                              false, /* aSetError */
+                                              &pMedium);
         break;
 
@@ -1981,17 +1788,17 @@
         case DeviceType_DVD:
             if (id.isValid() && !id.isZero())
-                rc = findDVDOrFloppyImage(deviceType, &id, Utf8Str::Empty,
+                rc = i_findDVDOrFloppyImage(aDeviceType, &id, Utf8Str::Empty,
                                           false /* setError */, &pMedium);
             else
-                rc = findDVDOrFloppyImage(deviceType, NULL, aLocation,
+                rc = i_findDVDOrFloppyImage(aDeviceType, NULL, aLocation,
                                           false /* setError */, &pMedium);
 
             // enforce read-only for DVDs even if caller specified ReadWrite
-            if (deviceType == DeviceType_DVD)
-                accessMode = AccessMode_ReadOnly;
+            if (aDeviceType == DeviceType_DVD)
+                aAccessMode = AccessMode_ReadOnly;
         break;
 
         default:
-            return setError(E_INVALIDARG, "Device type must be HardDisk, DVD or Floppy %d", deviceType);
+            return setError(E_INVALIDARG, "Device type must be HardDisk, DVD or Floppy %d", aDeviceType);
     }
 
@@ -2002,12 +1809,12 @@
         rc = pMedium->init(this,
                            aLocation,
-                           (accessMode == AccessMode_ReadWrite) ? Medium::OpenReadWrite : Medium::OpenReadOnly,
-                           !!fForceNewUuid,
-                           deviceType);
+                           (aAccessMode == AccessMode_ReadWrite) ? Medium::OpenReadWrite : Medium::OpenReadOnly,
+                           !!aForceNewUuid,
+                           aDeviceType);
         treeLock.acquire();
 
         if (SUCCEEDED(rc))
         {
-            rc = registerMedium(pMedium, &pMedium, deviceType);
+            rc = i_registerMedium(pMedium, &pMedium, aDeviceType);
 
             treeLock.release();
@@ -2028,5 +1835,5 @@
 
     if (SUCCEEDED(rc))
-        pMedium.queryInterfaceTo(aMedium);
+        pMedium.queryInterfaceTo(aMedium.asOutParam());
 
     return rc;
@@ -2035,14 +1842,12 @@
 
 /** @note Locks this object for reading. */
-STDMETHODIMP VirtualBox::GetGuestOSType(IN_BSTR aId, IGuestOSType **aType)
-{
-    CheckComArgNotNull(aType);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    *aType = NULL;
-
+HRESULT VirtualBox::getGuestOSType(const com::Guid &aId,
+                                   ComPtr<IGuestOSType> &aType)
+{
+    aType = NULL;
     AutoReadLock alock(m->allGuestOSTypes.getLockHandle() COMMA_LOCKVAL_SRC_POS);
+    IN_BSTR strId = Bstr(aId.toUtf16()).raw();
+
+    HRESULT rc = S_OK;
     for (GuestOSTypesOList::iterator it = m->allGuestOSTypes.begin();
          it != m->allGuestOSTypes.end();
@@ -2051,36 +1856,33 @@
         const Bstr &typeId = (*it)->i_id();
         AssertMsg(!typeId.isEmpty(), ("ID must not be NULL"));
-        if (typeId.compare(aId, Bstr::CaseInsensitive) == 0)
-        {
-            (*it).queryInterfaceTo(aType);
+        if (com::Guid(typeId) == aId)
+        {
+            (*it).queryInterfaceTo(aType.asOutParam());
             break;
         }
     }
-
-    return (*aType) ? S_OK :
+    return (aType) ? S_OK :
         setError(E_INVALIDARG,
                  tr("'%ls' is not a valid Guest OS type"),
-                 aId);
-}
-
-STDMETHODIMP VirtualBox::CreateSharedFolder(IN_BSTR aName,        IN_BSTR aHostPath,
-                                            BOOL /* aWritable */, BOOL /* aAutoMount */)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-    CheckComArgStrNotEmptyOrNull(aHostPath);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+                 strId);
+    return rc;
+}
+
+HRESULT VirtualBox::createSharedFolder(const com::Utf8Str &aName,
+                                       const com::Utf8Str &aHostPath,
+                                       BOOL aWritable,
+                                       BOOL aAutomount)
+{
+    NOREF(aName);
+    NOREF(aHostPath);
+    NOREF(aWritable);
+    NOREF(aAutomount);
 
     return setError(E_NOTIMPL, "Not yet implemented");
 }
 
-STDMETHODIMP VirtualBox::RemoveSharedFolder(IN_BSTR aName)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::removeSharedFolder(const com::Utf8Str &aName)
+{
+    NOREF(aName);
     return setError(E_NOTIMPL, "Not yet implemented");
 }
@@ -2089,25 +1891,14 @@
  *  @note Locks this object for reading.
  */
-STDMETHODIMP VirtualBox::GetExtraDataKeys(ComSafeArrayOut(BSTR, aKeys))
+HRESULT VirtualBox::getExtraDataKeys(std::vector<com::Utf8Str> &aKeys)
 {
     using namespace settings;
 
-    CheckComArgOutSafeArrayPointerValid(aKeys);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    com::SafeArray<BSTR> saKeys(m->pMainConfigFile->mapExtraDataItems.size());
-    int i = 0;
-    for (StringsMap::const_iterator it = m->pMainConfigFile->mapExtraDataItems.begin();
-         it != m->pMainConfigFile->mapExtraDataItems.end();
-         ++it, ++i)
-    {
-        const Utf8Str &strName = it->first;     // the key
-        strName.cloneTo(&saKeys[i]);
-    }
-    saKeys.detachTo(ComSafeArrayOutArg(aKeys));
+    std::vector<com::Utf8Str> saKeys(m->pMainConfigFile->mapExtraDataItems.size());
+    aKeys.resize(saKeys.size());
+    for (size_t i = 0; i < saKeys.size(); i++)
+        aKeys[i] = saKeys[i];
 
     return S_OK;
@@ -2117,24 +1908,13 @@
  *  @note Locks this object for reading.
  */
-STDMETHODIMP VirtualBox::GetExtraData(IN_BSTR aKey,
-                                      BSTR *aValue)
-{
-    CheckComArgStrNotEmptyOrNull(aKey);
-    CheckComArgNotNull(aValue);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    /* start with nothing found */
-    Utf8Str strKey(aKey);
-    Bstr bstrResult;
-
-    settings::StringsMap::const_iterator it = m->pMainConfigFile->mapExtraDataItems.find(strKey);
+HRESULT VirtualBox::getExtraData(const com::Utf8Str &aKey,
+                                 com::Utf8Str &aValue)
+{
+    settings::StringsMap::const_iterator it = m->pMainConfigFile->mapExtraDataItems.find(aKey);
     if (it != m->pMainConfigFile->mapExtraDataItems.end())
         // found:
-        bstrResult = it->second; // source is a Utf8Str
+        aValue = it->second; // source is a Utf8Str
 
     /* return the result to caller (may be empty) */
-    bstrResult.cloneTo(aValue);
 
     return S_OK;
@@ -2144,15 +1924,12 @@
  *  @note Locks this object for writing.
  */
-STDMETHODIMP VirtualBox::SetExtraData(IN_BSTR aKey,
-                                      IN_BSTR aValue)
-{
-    CheckComArgStrNotEmptyOrNull(aKey);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT VirtualBox::setExtraData(const com::Utf8Str &aKey,
+                                 const com::Utf8Str &aValue)
+{
 
     Utf8Str strKey(aKey);
     Utf8Str strValue(aValue);
     Utf8Str strOldValue;            // empty
+    HRESULT rc = S_OK;
 
     // locking note: we only hold the read lock briefly to look up the old value,
@@ -2178,7 +1955,6 @@
         // lock to copy the list of callbacks to invoke
         Bstr error;
-        Bstr bstrValue(aValue);
-
-        if (!onExtraDataCanChange(Guid::Empty, aKey, bstrValue.raw(), error))
+
+        if (!i_onExtraDataCanChange(Guid::Empty, Bstr(aKey).raw(), Bstr(aValue).raw(), error))
         {
             const char *sep = error.isEmpty() ? "" : ": ";
@@ -2188,6 +1964,6 @@
             return setError(E_ACCESSDENIED,
                             tr("Could not set extra data because someone refused the requested change of '%ls' to '%ls'%s%ls"),
-                            aKey,
-                            bstrValue.raw(),
+                            Bstr(strKey).raw(),
+                            Bstr(strValue).raw(),
                             sep,
                             err);
@@ -2205,5 +1981,5 @@
 
         /* save settings on success */
-        HRESULT rc = saveSettings();
+        rc = i_saveSettings();
         if (FAILED(rc)) return rc;
     }
@@ -2211,20 +1987,20 @@
     // fire notification outside the lock
     if (fChanged)
-        onExtraDataChange(Guid::Empty, aKey, aValue);
-
+        i_onExtraDataChange(Guid::Empty, Bstr(aKey).raw(), Bstr(aValue).raw());
+
+    return rc;
+}
+
+/**
+ *
+ */
+HRESULT VirtualBox::setSettingsSecret(const com::Utf8Str &aPassword)
+{
+    i_storeSettingsKey(aPassword);
+    i_decryptSettings();
     return S_OK;
 }
 
-/**
- *
- */
-STDMETHODIMP VirtualBox::SetSettingsSecret(IN_BSTR aValue)
-{
-    storeSettingsKey(aValue);
-    decryptSettings();
-    return S_OK;
-}
-
-int VirtualBox::decryptMediumSettings(Medium *pMedium)
+int VirtualBox::i_decryptMediumSettings(Medium *pMedium)
 {
     Bstr bstrCipher;
@@ -2234,5 +2010,5 @@
     {
         Utf8Str strPlaintext;
-        int rc = decryptSetting(&strPlaintext, bstrCipher);
+        int rc = i_decryptSetting(&strPlaintext, bstrCipher);
         if (RT_SUCCESS(rc))
             pMedium->i_setPropertyDirect("InitiatorSecret", strPlaintext);
@@ -2251,5 +2027,5 @@
  * properties need to be null-terminated strings.
  */
-int VirtualBox::decryptSettings()
+int VirtualBox::i_decryptSettings()
 {
     bool fFailure = false;
@@ -2264,5 +2040,5 @@
             continue;
         AutoWriteLock mlock(pMedium COMMA_LOCKVAL_SRC_POS);
-        int vrc = decryptMediumSettings(pMedium);
+        int vrc = i_decryptMediumSettings(pMedium);
         if (RT_FAILURE(vrc))
             fFailure = true;
@@ -2277,10 +2053,10 @@
  * @param aCiphertext     resulting ciphertext (base64-encoded)
  */
-int VirtualBox::encryptSetting(const Utf8Str &aPlaintext, Utf8Str *aCiphertext)
+int VirtualBox::i_encryptSetting(const Utf8Str &aPlaintext, Utf8Str *aCiphertext)
 {
     uint8_t abCiphertext[32];
     char    szCipherBase64[128];
     size_t  cchCipherBase64;
-    int rc = encryptSettingBytes((uint8_t*)aPlaintext.c_str(), abCiphertext,
+    int rc = i_encryptSettingBytes((uint8_t*)aPlaintext.c_str(), abCiphertext,
                                  aPlaintext.length()+1, sizeof(abCiphertext));
     if (RT_SUCCESS(rc))
@@ -2301,5 +2077,5 @@
  * @param aCiphertext     ciphertext (base64-encoded) to decrypt
  */
-int VirtualBox::decryptSetting(Utf8Str *aPlaintext, const Utf8Str &aCiphertext)
+int VirtualBox::i_decryptSetting(Utf8Str *aPlaintext, const Utf8Str &aCiphertext)
 {
     uint8_t abPlaintext[64];
@@ -2311,5 +2087,5 @@
     if (RT_SUCCESS(rc))
     {
-        rc = decryptSettingBytes(abPlaintext, abCiphertext, cbCiphertext);
+        rc = i_decryptSettingBytes(abPlaintext, abCiphertext, cbCiphertext);
         if (RT_SUCCESS(rc))
         {
@@ -2341,5 +2117,5 @@
  * @param aCiphertextSize size of the ciphertext
  */
-int VirtualBox::encryptSettingBytes(const uint8_t *aPlaintext, uint8_t *aCiphertext,
+int VirtualBox::i_encryptSettingBytes(const uint8_t *aPlaintext, uint8_t *aCiphertext,
                                     size_t aPlaintextSize, size_t aCiphertextSize) const
 {
@@ -2391,6 +2167,6 @@
  * @param aCiphertextSize size of the ciphertext == size of the plaintext
  */
-int VirtualBox::decryptSettingBytes(uint8_t *aPlaintext,
-                                    const uint8_t *aCiphertext, size_t aCiphertextSize) const
+int VirtualBox::i_decryptSettingBytes(uint8_t *aPlaintext,
+                                      const uint8_t *aCiphertext, size_t aCiphertextSize) const
 {
     unsigned i, j;
@@ -2424,5 +2200,5 @@
  * @param aKey          the key to store
  */
-void VirtualBox::storeSettingsKey(const Utf8Str &aKey)
+void VirtualBox::i_storeSettingsKey(const Utf8Str &aKey)
 {
     RTSha512(aKey.c_str(), aKey.length(), m->SettingsCipherKey);
@@ -2434,5 +2210,5 @@
 
 #ifdef DEBUG
-void VirtualBox::dumpAllBackRefs()
+void VirtualBox::i_dumpAllBackRefs()
 {
     {
@@ -2473,5 +2249,5 @@
  *  @note Doesn't lock any object.
  */
-HRESULT VirtualBox::postEvent(Event *event)
+HRESULT VirtualBox::i_postEvent(Event *event)
 {
     AssertReturn(event, E_FAIL);
@@ -2507,5 +2283,5 @@
  * @note Doesn't lock objects.
  */
-HRESULT VirtualBox::addProgress(IProgress *aProgress)
+HRESULT VirtualBox::i_addProgress(IProgress *aProgress)
 {
     CheckComArgNotNull(aProgress);
@@ -2533,5 +2309,5 @@
  * @note Doesn't lock objects.
  */
-HRESULT VirtualBox::removeProgress(IN_GUID aId)
+HRESULT VirtualBox::i_removeProgress(IN_GUID aId)
 {
     AutoCaller autoCaller(this);
@@ -2609,7 +2385,7 @@
  *  @note Doesn't lock anything.
  */
-HRESULT VirtualBox::startSVCHelperClient(bool aPrivileged,
-                                         SVCHelperClientFunc aFunc,
-                                         void *aUser, Progress *aProgress)
+HRESULT VirtualBox::i_startSVCHelperClient(bool aPrivileged,
+                                           SVCHelperClientFunc aFunc,
+                                           void *aUser, Progress *aProgress)
 {
     AssertReturn(aFunc, E_POINTER);
@@ -2795,5 +2571,5 @@
  *  @note Doesn't lock anything.
  */
-void VirtualBox::updateClientWatcher()
+void VirtualBox::i_updateClientWatcher()
 {
     AutoCaller autoCaller(this);
@@ -2810,5 +2586,5 @@
  *  @note Doesn't lock anything.
  */
-void VirtualBox::addProcessToReap(RTPROCESS pid)
+void VirtualBox::i_addProcessToReap(RTPROCESS pid)
 {
     AutoCaller autoCaller(this);
@@ -2862,7 +2638,7 @@
  *  @note Doesn't lock any object.
  */
-void VirtualBox::onMachineStateChange(const Guid &aId, MachineState_T aState)
-{
-    postEvent(new MachineEvent(this, VBoxEventType_OnMachineStateChanged, aId, aState));
+void VirtualBox::i_onMachineStateChange(const Guid &aId, MachineState_T aState)
+{
+    i_postEvent(new MachineEvent(this, VBoxEventType_OnMachineStateChanged, aId, aState));
 }
 
@@ -2870,7 +2646,7 @@
  *  @note Doesn't lock any object.
  */
-void VirtualBox::onMachineDataChange(const Guid &aId, BOOL aTemporary)
-{
-    postEvent(new MachineEvent(this, VBoxEventType_OnMachineDataChanged, aId, aTemporary));
+void VirtualBox::i_onMachineDataChange(const Guid &aId, BOOL aTemporary)
+{
+    i_postEvent(new MachineEvent(this, VBoxEventType_OnMachineDataChanged, aId, aTemporary));
 }
 
@@ -2878,6 +2654,6 @@
  *  @note Locks this object for reading.
  */
-BOOL VirtualBox::onExtraDataCanChange(const Guid &aId, IN_BSTR aKey, IN_BSTR aValue,
-                                       Bstr &aError)
+BOOL VirtualBox::i_onExtraDataCanChange(const Guid &aId, IN_BSTR aKey, IN_BSTR aValue,
+                                        Bstr &aError)
 {
     LogFlowThisFunc(("machine={%s} aKey={%ls} aValue={%ls}\n",
@@ -2939,7 +2715,7 @@
  *  @note Doesn't lock any object.
  */
-void VirtualBox::onExtraDataChange(const Guid &aId, IN_BSTR aKey, IN_BSTR aValue)
-{
-    postEvent(new ExtraDataEvent(this, aId, aKey, aValue));
+void VirtualBox::i_onExtraDataChange(const Guid &aId, IN_BSTR aKey, IN_BSTR aValue)
+{
+    i_postEvent(new ExtraDataEvent(this, aId, aKey, aValue));
 }
 
@@ -2947,7 +2723,7 @@
  *  @note Doesn't lock any object.
  */
-void VirtualBox::onMachineRegistered(const Guid &aId, BOOL aRegistered)
-{
-    postEvent(new MachineEvent(this, VBoxEventType_OnMachineRegistered, aId, aRegistered));
+void VirtualBox::i_onMachineRegistered(const Guid &aId, BOOL aRegistered)
+{
+    i_postEvent(new MachineEvent(this, VBoxEventType_OnMachineRegistered, aId, aRegistered));
 }
 
@@ -2971,7 +2747,7 @@
  *  @note Doesn't lock any object.
  */
-void VirtualBox::onSessionStateChange(const Guid &aId, SessionState_T aState)
-{
-    postEvent(new SessionEvent(this, aId, aState));
+void VirtualBox::i_onSessionStateChange(const Guid &aId, SessionState_T aState)
+{
+    i_postEvent(new SessionEvent(this, aId, aState));
 }
 
@@ -2998,7 +2774,7 @@
  *  @note Doesn't lock any object.
  */
-void VirtualBox::onSnapshotTaken(const Guid &aMachineId, const Guid &aSnapshotId)
-{
-    postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId,
+void VirtualBox::i_onSnapshotTaken(const Guid &aMachineId, const Guid &aSnapshotId)
+{
+    i_postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId,
                                 VBoxEventType_OnSnapshotTaken));
 }
@@ -3007,7 +2783,7 @@
  *  @note Doesn't lock any object.
  */
-void VirtualBox::onSnapshotDeleted(const Guid &aMachineId, const Guid &aSnapshotId)
-{
-    postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId,
+void VirtualBox::i_onSnapshotDeleted(const Guid &aMachineId, const Guid &aSnapshotId)
+{
+    i_postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId,
                                 VBoxEventType_OnSnapshotDeleted));
 }
@@ -3016,7 +2792,7 @@
  *  @note Doesn't lock any object.
  */
-void VirtualBox::onSnapshotChange(const Guid &aMachineId, const Guid &aSnapshotId)
-{
-    postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId,
+void VirtualBox::i_onSnapshotChange(const Guid &aMachineId, const Guid &aSnapshotId)
+{
+    i_postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId,
                                 VBoxEventType_OnSnapshotChanged));
 }
@@ -3047,8 +2823,8 @@
  *  @note Doesn't lock any object.
  */
-void VirtualBox::onGuestPropertyChange(const Guid &aMachineId, IN_BSTR aName,
-                                       IN_BSTR aValue, IN_BSTR aFlags)
-{
-    postEvent(new GuestPropertyEvent(this, aMachineId, aName, aValue, aFlags));
+void VirtualBox::i_onGuestPropertyChange(const Guid &aMachineId, IN_BSTR aName,
+                                         IN_BSTR aValue, IN_BSTR aFlags)
+{
+    i_postEvent(new GuestPropertyEvent(this, aMachineId, aName, aValue, aFlags));
 }
 
@@ -3056,7 +2832,7 @@
  *  @note Doesn't lock any object.
  */
-void VirtualBox::onNatRedirectChange(const Guid &aMachineId, ULONG ulSlot, bool fRemove, IN_BSTR aName,
-                               NATProtocol_T aProto, IN_BSTR aHostIp, uint16_t aHostPort,
-                               IN_BSTR aGuestIp, uint16_t aGuestPort)
+void VirtualBox::i_onNatRedirectChange(const Guid &aMachineId, ULONG ulSlot, bool fRemove, IN_BSTR aName,
+                                       NATProtocol_T aProto, IN_BSTR aHostIp, uint16_t aHostPort,
+                                       IN_BSTR aGuestIp, uint16_t aGuestPort)
 {
     fireNATRedirectEvent(m->pEventSource, aMachineId.toUtf16().raw(), ulSlot, fRemove, aName, aProto, aHostIp,
@@ -3064,17 +2840,18 @@
 }
 
-void VirtualBox::onNATNetworkChange(IN_BSTR aName)
+void VirtualBox::i_onNATNetworkChange(IN_BSTR aName)
 {
     fireNATNetworkChangedEvent(m->pEventSource, aName);
 }
 
-void VirtualBox::onNATNetworkStartStop(IN_BSTR aName, BOOL fStart)
+void VirtualBox::i_onNATNetworkStartStop(IN_BSTR aName, BOOL fStart)
 {
     fireNATNetworkStartStopEvent(m->pEventSource, aName, fStart);
 }
-void VirtualBox::onNATNetworkSetting(IN_BSTR aNetworkName, BOOL aEnabled,
-                                     IN_BSTR aNetwork, IN_BSTR aGateway,
-                                     BOOL aAdvertiseDefaultIpv6RouteEnabled,
-                                     BOOL fNeedDhcpServer)
+
+void VirtualBox::i_onNATNetworkSetting(IN_BSTR aNetworkName, BOOL aEnabled,
+                                       IN_BSTR aNetwork, IN_BSTR aGateway,
+                                       BOOL aAdvertiseDefaultIpv6RouteEnabled,
+                                       BOOL fNeedDhcpServer)
 {
     fireNATNetworkSettingEvent(m->pEventSource, aNetworkName, aEnabled,
@@ -3083,8 +2860,8 @@
 }
 
-void VirtualBox::onNATNetworkPortForward(IN_BSTR aNetworkName, BOOL create, BOOL fIpv6,
-                                         IN_BSTR aRuleName, NATProtocol_T proto,
-                                         IN_BSTR aHostIp, LONG aHostPort,
-                                         IN_BSTR aGuestIp, LONG aGuestPort)
+void VirtualBox::i_onNATNetworkPortForward(IN_BSTR aNetworkName, BOOL create, BOOL fIpv6,
+                                           IN_BSTR aRuleName, NATProtocol_T proto,
+                                           IN_BSTR aHostIp, LONG aHostPort,
+                                           IN_BSTR aGuestIp, LONG aGuestPort)
 {
     fireNATNetworkPortForwardEvent(m->pEventSource, aNetworkName, create,
@@ -3095,5 +2872,5 @@
 
 
-void VirtualBox::onHostNameResolutionConfigurationChange()
+void VirtualBox::i_onHostNameResolutionConfigurationChange()
 {
     if (m->pEventSource)
@@ -3102,5 +2879,5 @@
 
 
-int VirtualBox::natNetworkRefInc(IN_BSTR aNetworkName)
+int VirtualBox::i_natNetworkRefInc(IN_BSTR aNetworkName)
 {
     AutoWriteLock safeLock(*spMtxNatNetworkNameToRefCountLock COMMA_LOCKVAL_SRC_POS);
@@ -3127,5 +2904,5 @@
 
 
-int VirtualBox::natNetworkRefDec(IN_BSTR aNetworkName)
+int VirtualBox::i_natNetworkRefDec(IN_BSTR aNetworkName)
 {
     AutoWriteLock safeLock(*spMtxNatNetworkNameToRefCountLock COMMA_LOCKVAL_SRC_POS);
@@ -3158,5 +2935,5 @@
  *  @note Locks this object for reading.
  */
-ComObjPtr<GuestOSType> VirtualBox::getUnknownOSType()
+ComObjPtr<GuestOSType> VirtualBox::i_getUnknownOSType()
 {
     ComObjPtr<GuestOSType> type;
@@ -3186,6 +2963,6 @@
  * @note Locks objects for reading.
  */
-void VirtualBox::getOpenedMachines(SessionMachinesList &aMachines,
-                                   InternalControlList *aControls /*= NULL*/)
+void VirtualBox::i_getOpenedMachines(SessionMachinesList &aMachines,
+                                     InternalControlList *aControls /*= NULL*/)
 {
     AutoCaller autoCaller(this);
@@ -3221,5 +2998,5 @@
  * @note Caller must hold the VirtualBox object lock at least for reading.
  */
-VirtualBox::MachinesOList &VirtualBox::getMachinesList(void)
+VirtualBox::MachinesOList &VirtualBox::i_getMachinesList(void)
 {
     return m->allMachines;
@@ -3237,8 +3014,8 @@
  * @return
  */
-HRESULT VirtualBox::findMachine(const Guid &aId,
-                                bool fPermitInaccessible,
-                                bool aSetError,
-                                ComObjPtr<Machine> *aMachine /* = NULL */)
+HRESULT VirtualBox::i_findMachine(const Guid &aId,
+                                  bool fPermitInaccessible,
+                                  bool aSetError,
+                                  ComObjPtr<Machine> *aMachine /* = NULL */)
 {
     HRESULT rc = VBOX_E_OBJECT_NOT_FOUND;
@@ -3291,6 +3068,7 @@
  * @return
  */
-HRESULT VirtualBox::findMachineByName(const Utf8Str &aName, bool aSetError,
-                                      ComObjPtr<Machine> *aMachine /* = NULL */)
+HRESULT VirtualBox::i_findMachineByName(const Utf8Str &aName,
+                                        bool  aSetError,
+                                        ComObjPtr<Machine> *aMachine /* = NULL */)
 {
     HRESULT rc = VBOX_E_OBJECT_NOT_FOUND;
@@ -3330,5 +3108,5 @@
 }
 
-static HRESULT validateMachineGroupHelper(const Utf8Str &aGroup, bool fPrimary, VirtualBox *pVirtualBox)
+static HRESULT i_validateMachineGroupHelper(const Utf8Str &aGroup, bool fPrimary, VirtualBox *pVirtualBox)
 {
     /* empty strings are invalid */
@@ -3366,6 +3144,6 @@
             if (fPrimary)
             {
-                HRESULT rc = pVirtualBox->findMachineByName(tmp,
-                                                            false /* aSetError */);
+                HRESULT rc = pVirtualBox->i_findMachineByName(tmp,
+                                                              false /* aSetError */);
                 if (SUCCEEDED(rc))
                     return VBOX_E_VM_ERROR;
@@ -3396,7 +3174,7 @@
  * @return S_OK or E_INVALIDARG
  */
-HRESULT VirtualBox::validateMachineGroup(const Utf8Str &aGroup, bool fPrimary)
-{
-    HRESULT rc = validateMachineGroupHelper(aGroup, fPrimary, this);
+HRESULT VirtualBox::i_validateMachineGroup(const Utf8Str &aGroup, bool fPrimary)
+{
+    HRESULT rc = i_validateMachineGroupHelper(aGroup, fPrimary, this);
     if (FAILED(rc))
     {
@@ -3421,17 +3199,16 @@
  * @return S_OK or E_INVALIDARG
  */
-HRESULT VirtualBox::convertMachineGroups(ComSafeArrayIn(IN_BSTR, aMachineGroups), StringsList *pllMachineGroups)
+HRESULT VirtualBox::i_convertMachineGroups(const std::vector<com::Utf8Str> aMachineGroups, StringsList *pllMachineGroups)
 {
     pllMachineGroups->clear();
-    if (aMachineGroups)
-    {
-        com::SafeArray<IN_BSTR> machineGroups(ComSafeArrayInArg(aMachineGroups));
-        for (size_t i = 0; i < machineGroups.size(); i++)
-        {
-            Utf8Str group(machineGroups[i]);
+    if (aMachineGroups.size())
+    {
+        for (size_t i = 0; i < aMachineGroups.size(); i++)
+        {
+            Utf8Str group(aMachineGroups[i]);
             if (group.length() == 0)
                 group = "/";
 
-            HRESULT rc = validateMachineGroup(group, i == 0);
+            HRESULT rc = i_validateMachineGroup(group, i == 0);
             if (FAILED(rc))
                 return rc;
@@ -3464,7 +3241,7 @@
  * @note Locks the media tree for reading.
  */
-HRESULT VirtualBox::findHardDiskById(const Guid &id,
-                                     bool aSetError,
-                                     ComObjPtr<Medium> *aHardDisk /*= NULL*/)
+HRESULT VirtualBox::i_findHardDiskById(const Guid &id,
+                                       bool aSetError,
+                                       ComObjPtr<Medium> *aHardDisk /*= NULL*/)
 {
     AssertReturn(!id.isZero(), E_INVALIDARG);
@@ -3504,7 +3281,7 @@
  * @note Locks the media tree for reading.
  */
-HRESULT VirtualBox::findHardDiskByLocation(const Utf8Str &strLocation,
-                                           bool aSetError,
-                                           ComObjPtr<Medium> *aHardDisk /*= NULL*/)
+HRESULT VirtualBox::i_findHardDiskByLocation(const Utf8Str &strLocation,
+                                             bool aSetError,
+                                             ComObjPtr<Medium> *aHardDisk /*= NULL*/)
 {
     AssertReturn(!strLocation.isEmpty(), E_INVALIDARG);
@@ -3559,9 +3336,9 @@
  * @note Locks the media tree for reading.
  */
-HRESULT VirtualBox::findDVDOrFloppyImage(DeviceType_T mediumType,
-                                         const Guid *aId,
-                                         const Utf8Str &aLocation,
-                                         bool aSetError,
-                                         ComObjPtr<Medium> *aImage /* = NULL */)
+HRESULT VirtualBox::i_findDVDOrFloppyImage(DeviceType_T mediumType,
+                                           const Guid *aId,
+                                           const Utf8Str &aLocation,
+                                           bool aSetError,
+                                           ComObjPtr<Medium> *aImage /* = NULL */)
 {
     AssertReturn(aId || !aLocation.isEmpty(), E_INVALIDARG);
@@ -3570,5 +3347,5 @@
     if (!aLocation.isEmpty())
     {
-        int vrc = calculateFullPath(aLocation, location);
+        int vrc = i_calculateFullPath(aLocation, location);
         if (RT_FAILURE(vrc))
             return setError(VBOX_E_FILE_ERROR,
@@ -3669,9 +3446,9 @@
  * @return
  */
-HRESULT VirtualBox::findRemoveableMedium(DeviceType_T mediumType,
-                                         const Guid &uuid,
-                                         bool fRefresh,
-                                         bool aSetError,
-                                         ComObjPtr<Medium> &pMedium)
+HRESULT VirtualBox::i_findRemoveableMedium(DeviceType_T mediumType,
+                                           const Guid &uuid,
+                                           bool fRefresh,
+                                           bool aSetError,
+                                           ComObjPtr<Medium> &pMedium)
 {
     if (uuid.isZero())
@@ -3696,11 +3473,11 @@
     if (rc == VBOX_E_OBJECT_NOT_FOUND)
                 // then search for an image with that UUID
-        rc = findDVDOrFloppyImage(mediumType, &uuid, Utf8Str::Empty, aSetError, &pMedium);
+        rc = i_findDVDOrFloppyImage(mediumType, &uuid, Utf8Str::Empty, aSetError, &pMedium);
 
     return rc;
 }
 
-HRESULT VirtualBox::findGuestOSType(const Bstr &bstrOSType,
-                                    GuestOSType*& pGuestOSType)
+HRESULT VirtualBox::i_findGuestOSType(const Bstr &bstrOSType,
+                                      GuestOSType*& pGuestOSType)
 {
     /* Look for a GuestOSType object */
@@ -3744,15 +3521,15 @@
  * @return
  */
-const Guid& VirtualBox::getGlobalRegistryId() const
+const Guid& VirtualBox::i_getGlobalRegistryId() const
 {
     return m->uuidMediaRegistry;
 }
 
-const ComObjPtr<Host>& VirtualBox::host() const
+const ComObjPtr<Host>& VirtualBox::i_host() const
 {
     return m->pHost;
 }
 
-SystemProperties* VirtualBox::getSystemProperties() const
+SystemProperties* VirtualBox::i_getSystemProperties() const
 {
     return m->pSystemProperties;
@@ -3764,5 +3541,5 @@
  * pack manager.
  */
-ExtPackManager* VirtualBox::getExtPackManager() const
+ExtPackManager* VirtualBox::i_getExtPackManager() const
 {
     return m->ptrExtPackManager;
@@ -3773,5 +3550,5 @@
  * Getter that machines can talk to the autostart database.
  */
-AutostartDb* VirtualBox::getAutostartDb() const
+AutostartDb* VirtualBox::i_getAutostartDb() const
 {
     return m->pAutostartDb;
@@ -3779,5 +3556,5 @@
 
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
-const ComObjPtr<PerformanceCollector>& VirtualBox::performanceCollector() const
+const ComObjPtr<PerformanceCollector>& VirtualBox::i_performanceCollector() const
 {
     return m->pPerformanceCollector;
@@ -3790,5 +3567,5 @@
  * @return
  */
-void VirtualBox::getDefaultMachineFolder(Utf8Str &str) const
+void VirtualBox::i_getDefaultMachineFolder(Utf8Str &str) const
 {
     AutoReadLock propsLock(m->pSystemProperties COMMA_LOCKVAL_SRC_POS);
@@ -3801,5 +3578,5 @@
  * @return
  */
-void VirtualBox::getDefaultHardDiskFormat(Utf8Str &str) const
+void VirtualBox::i_getDefaultHardDiskFormat(Utf8Str &str) const
 {
     AutoReadLock propsLock(m->pSystemProperties COMMA_LOCKVAL_SRC_POS);
@@ -3807,5 +3584,5 @@
 }
 
-const Utf8Str& VirtualBox::homeDir() const
+const Utf8Str& VirtualBox::i_homeDir() const
 {
     return m->strHomeDir;
@@ -3823,5 +3600,5 @@
  * @note Doesn't lock any object.
  */
-int VirtualBox::calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult)
+int VirtualBox::i_calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult)
 {
     AutoCaller autoCaller(this);
@@ -3848,6 +3625,6 @@
  * @param strTarget Buffer to receive target path.
  */
-void VirtualBox::copyPathRelativeToConfig(const Utf8Str &strSource,
-                                          Utf8Str &strTarget)
+void VirtualBox::i_copyPathRelativeToConfig(const Utf8Str &strSource,
+                                            Utf8Str &strTarget)
 {
     AutoCaller autoCaller(this);
@@ -3884,8 +3661,8 @@
  * @note Locks the media tree and media objects for reading.
  */
-HRESULT VirtualBox::checkMediaForConflicts(const Guid &aId,
-                                           const Utf8Str &aLocation,
-                                           Utf8Str &aConflict,
-                                           ComObjPtr<Medium> *ppMedium)
+HRESULT VirtualBox::i_checkMediaForConflicts(const Guid &aId,
+                                             const Utf8Str &aLocation,
+                                             Utf8Str &aConflict,
+                                             ComObjPtr<Medium> *ppMedium)
 {
     AssertReturn(!aId.isZero() && !aLocation.isEmpty(), E_FAIL);
@@ -3895,5 +3672,5 @@
     ppMedium->setNull();
 
-    AutoReadLock alock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoReadLock alock(i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     HRESULT rc = S_OK;
@@ -3903,7 +3680,7 @@
 
     if (aId.isValid() && !aId.isZero())
-        rc = findHardDiskById(aId, false /* aSetError */, &pMediumFound);
+        rc = i_findHardDiskById(aId, false /* aSetError */, &pMediumFound);
     if (FAILED(rc) && !aLocation.isEmpty())
-        rc = findHardDiskByLocation(aLocation, false /* aSetError */, &pMediumFound);
+        rc = i_findHardDiskByLocation(aLocation, false /* aSetError */, &pMediumFound);
     if (SUCCEEDED(rc))
         pcszType = tr("hard disk");
@@ -3911,5 +3688,5 @@
     if (!pcszType)
     {
-        rc = findDVDOrFloppyImage(DeviceType_DVD, &aId, aLocation, false /* aSetError */, &pMediumFound);
+        rc = i_findDVDOrFloppyImage(DeviceType_DVD, &aId, aLocation, false /* aSetError */, &pMediumFound);
         if (SUCCEEDED(rc))
             pcszType = tr("CD/DVD image");
@@ -3918,5 +3695,5 @@
     if (!pcszType)
     {
-        rc = findDVDOrFloppyImage(DeviceType_Floppy, &aId, aLocation, false /* aSetError */, &pMediumFound);
+        rc = i_findDVDOrFloppyImage(DeviceType_Floppy, &aId, aLocation, false /* aSetError */, &pMediumFound);
         if (SUCCEEDED(rc))
             pcszType = tr("floppy image");
@@ -3955,10 +3732,10 @@
  *                        conflicts.
  */
-bool VirtualBox::isMediaUuidInUse(const Guid &aId, DeviceType_T deviceType)
+bool VirtualBox::i_isMediaUuidInUse(const Guid &aId, DeviceType_T deviceType)
 {
     /* A zero UUID is invalid here, always claim that it is already used. */
     AssertReturn(!aId.isZero(), true);
 
-    AutoReadLock alock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoReadLock alock(i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     HRESULT rc = S_OK;
@@ -3970,11 +3747,11 @@
     {
         case DeviceType_HardDisk:
-            rc = findHardDiskById(aId, false /* aSetError */, &pMediumFound);
+            rc = i_findHardDiskById(aId, false /* aSetError */, &pMediumFound);
             break;
         case DeviceType_DVD:
-            rc = findDVDOrFloppyImage(DeviceType_DVD, &aId, Utf8Str::Empty, false /* aSetError */, &pMediumFound);
+            rc = i_findDVDOrFloppyImage(DeviceType_DVD, &aId, Utf8Str::Empty, false /* aSetError */, &pMediumFound);
             break;
         case DeviceType_Floppy:
-            rc = findDVDOrFloppyImage(DeviceType_Floppy, &aId, Utf8Str::Empty, false /* aSetError */, &pMediumFound);
+            rc = i_findDVDOrFloppyImage(DeviceType_Floppy, &aId, Utf8Str::Empty, false /* aSetError */, &pMediumFound);
             break;
         default:
@@ -4002,8 +3779,8 @@
  * VirtualBox::saveSettings() can process them properly.
  */
-void VirtualBox::rememberMachineNameChangeForMedia(const Utf8Str &strOldConfigDir,
-                                                   const Utf8Str &strNewConfigDir)
-{
-    AutoWriteLock mediaLock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+void VirtualBox::i_rememberMachineNameChangeForMedia(const Utf8Str &strOldConfigDir,
+                                                     const Utf8Str &strNewConfigDir)
+{
+    AutoWriteLock mediaLock(i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     Data::PendingMachineRename pmr;
@@ -4037,5 +3814,5 @@
     }
 
-    pDesc->pVirtualBox->saveModifiedRegistries();
+    pDesc->pVirtualBox->i_saveModifiedRegistries();
 
     pDesc->llMedia.clear();
@@ -4075,11 +3852,11 @@
  * @param strMachineFolder The machine folder for relative paths, if machine registry, or an empty string otherwise.
  */
-void VirtualBox::saveMediaRegistry(settings::MediaRegistry &mediaRegistry,
-                                   const Guid &uuidRegistry,
-                                   const Utf8Str &strMachineFolder)
+void VirtualBox::i_saveMediaRegistry(settings::MediaRegistry &mediaRegistry,
+                                     const Guid &uuidRegistry,
+                                     const Utf8Str &strMachineFolder)
 {
     // lock all media for the following; use a write lock because we're
     // modifying the PendingMachineRenamesList, which is protected by this
-    AutoWriteLock mediaLock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock mediaLock(i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
     // if a machine was renamed, then we'll need to refresh media paths
@@ -4199,5 +3976,5 @@
  *    which could cause conflicts.
  */
-HRESULT VirtualBox::saveSettings()
+HRESULT VirtualBox::i_saveSettings()
 {
     AutoCaller autoCaller(this);
@@ -4227,7 +4004,7 @@
         }
 
-        saveMediaRegistry(m->pMainConfigFile->mediaRegistry,
-                          m->uuidMediaRegistry,         // global media registry ID
-                          Utf8Str::Empty);              // strMachineFolder
+        i_saveMediaRegistry(m->pMainConfigFile->mediaRegistry,
+                            m->uuidMediaRegistry,         // global media registry ID
+                            Utf8Str::Empty);              // strMachineFolder
 
         m->pMainConfigFile->llDhcpServers.clear();
@@ -4302,5 +4079,5 @@
  *  @note Locks objects!
  */
-HRESULT VirtualBox::registerMachine(Machine *aMachine)
+HRESULT VirtualBox::i_registerMachine(Machine *aMachine)
 {
     ComAssertRet(aMachine, E_INVALIDARG);
@@ -4315,8 +4092,8 @@
     {
         ComObjPtr<Machine> pMachine;
-        rc = findMachine(aMachine->getId(),
-                         true /* fPermitInaccessible */,
-                         false /* aDoSetError */,
-                         &pMachine);
+        rc = i_findMachine(aMachine->getId(),
+                           true /* fPermitInaccessible */,
+                           false /* aDoSetError */,
+                           &pMachine);
         if (SUCCEEDED(rc))
         {
@@ -4345,5 +4122,5 @@
 
     if (autoCaller.state() != InInit)
-        rc = saveSettings();
+        rc = i_saveSettings();
 
     return rc;
@@ -4364,7 +4141,7 @@
  * @return
  */
-HRESULT VirtualBox::registerMedium(const ComObjPtr<Medium> &pMedium,
-                                   ComObjPtr<Medium> *ppMedium,
-                                   DeviceType_T argType)
+HRESULT VirtualBox::i_registerMedium(const ComObjPtr<Medium> &pMedium,
+                                     ComObjPtr<Medium> *ppMedium,
+                                     DeviceType_T argType)
 {
     AssertReturn(pMedium != NULL, E_INVALIDARG);
@@ -4398,5 +4175,5 @@
 
     // caller must hold the media tree write lock
-    Assert(getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    Assert(i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
 
     Guid id;
@@ -4414,8 +4191,8 @@
     Utf8Str strConflict;
     ComObjPtr<Medium> pDupMedium;
-    rc = checkMediaForConflicts(id,
-                                strLocationFull,
-                                strConflict,
-                                &pDupMedium);
+    rc = i_checkMediaForConflicts(id,
+                                  strLocationFull,
+                                  strConflict,
+                                  &pDupMedium);
     if (FAILED(rc)) return rc;
 
@@ -4461,5 +4238,5 @@
  * @note Caller must hold the media tree lock for writing; in addition, this locks @a pMedium for reading
  */
-HRESULT VirtualBox::unregisterMedium(Medium *pMedium)
+HRESULT VirtualBox::i_unregisterMedium(Medium *pMedium)
 {
     AssertReturn(pMedium != NULL, E_INVALIDARG);
@@ -4472,5 +4249,5 @@
 
     // caller must hold the media tree write lock
-    Assert(getMediaTreeLockHandle().isWriteLockOnCurrentThread());
+    Assert(i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
 
     Guid id;
@@ -4521,5 +4298,5 @@
  * @param pMedium
  */
-void VirtualBox::pushMediumToListWithChildren(MediaList &llMedia, Medium *pMedium)
+void VirtualBox::i_pushMediumToListWithChildren(MediaList &llMedia, Medium *pMedium)
 {
     // recurse first, then add ourselves; this way children end up on the
@@ -4532,5 +4309,5 @@
     {
         Medium *pChild = *it;
-        pushMediumToListWithChildren(llMedia, pChild);
+        i_pushMediumToListWithChildren(llMedia, pChild);
     }
 
@@ -4549,5 +4326,5 @@
  * @return
  */
-HRESULT VirtualBox::unregisterMachineMedia(const Guid &uuidMachine)
+HRESULT VirtualBox::i_unregisterMachineMedia(const Guid &uuidMachine)
 {
     Assert(!uuidMachine.isZero() && uuidMachine.isValid());
@@ -4561,5 +4338,5 @@
 
     {
-        AutoWriteLock tlock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoWriteLock tlock(i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
         for (MediaOList::iterator it = m->allHardDisks.getList().begin();
@@ -4574,5 +4351,5 @@
             if (pMedium->i_isInRegistry(uuidMachine))
                 // recursively with children first
-                pushMediumToListWithChildren(llMedia2Close, pMedium);
+                i_pushMediumToListWithChildren(llMedia2Close, pMedium);
         }
     }
@@ -4600,6 +4377,6 @@
  * @return
  */
-HRESULT VirtualBox::unregisterMachine(Machine *pMachine,
-                                      const Guid &id)
+HRESULT VirtualBox::i_unregisterMachine(Machine *pMachine,
+                                        const Guid &id)
 {
     // remove from the collection of registered machines
@@ -4607,5 +4384,5 @@
     m->allMachines.removeChild(pMachine);
     // save the global registry
-    HRESULT rc = saveSettings();
+    HRESULT rc = i_saveSettings();
     alock.release();
 
@@ -4622,5 +4399,5 @@
      */
     {
-        AutoReadLock tlock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+        AutoReadLock tlock(i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
         // iterate over the list of *base* images
         for (MediaOList::iterator it = m->allHardDisks.getList().begin();
@@ -4646,5 +4423,5 @@
                     mlock.release();
                     tlock.release();
-                    markRegistryModified(*puuidBetter);
+                    i_markRegistryModified(*puuidBetter);
                     tlock.acquire();
                     mlock.release();
@@ -4654,8 +4431,8 @@
     }
 
-    saveModifiedRegistries();
+    i_saveModifiedRegistries();
 
     /* fire an event */
-    onMachineRegistered(id, FALSE);
+    i_onMachineRegistered(id, FALSE);
 
     return rc;
@@ -4668,15 +4445,15 @@
  * @param uuid
  */
-void VirtualBox::markRegistryModified(const Guid &uuid)
-{
-    if (uuid == getGlobalRegistryId())
+void VirtualBox::i_markRegistryModified(const Guid &uuid)
+{
+    if (uuid == i_getGlobalRegistryId())
         ASMAtomicIncU64(&m->uRegistryNeedsSaving);
     else
     {
         ComObjPtr<Machine> pMachine;
-        HRESULT rc = findMachine(uuid,
-                                 false /* fPermitInaccessible */,
-                                 false /* aSetError */,
-                                 &pMachine);
+        HRESULT rc = i_findMachine(uuid,
+                                   false /* fPermitInaccessible */,
+                                   false /* aSetError */,
+                                   &pMachine);
         if (SUCCEEDED(rc))
         {
@@ -4697,5 +4474,5 @@
  * @return
  */
-void VirtualBox::saveModifiedRegistries()
+void VirtualBox::i_saveModifiedRegistries()
 {
     HRESULT rc = S_OK;
@@ -4747,5 +4524,5 @@
     {
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-        rc = saveSettings();
+        rc = i_saveSettings();
     }
     NOREF(rc); /* XXX */
@@ -4754,5 +4531,5 @@
 
 /* static */
-const Bstr &VirtualBox::getVersionNormalized()
+const com::Utf8Str &VirtualBox::i_getVersionNormalized()
 {
     return sVersionNormalized;
@@ -4773,5 +4550,5 @@
  */
 /* static */
-HRESULT VirtualBox::ensureFilePathExists(const Utf8Str &strFileName, bool fCreate)
+HRESULT VirtualBox::i_ensureFilePathExists(const Utf8Str &strFileName, bool fCreate)
 {
     Utf8Str strDir(strFileName);
@@ -4783,13 +4560,13 @@
             int vrc = RTDirCreateFullPath(strDir.c_str(), 0700);
             if (RT_FAILURE(vrc))
-                return setErrorStatic(VBOX_E_IPRT_ERROR,
-                                      Utf8StrFmt(tr("Could not create the directory '%s' (%Rrc)"),
-                                                 strDir.c_str(),
-                                                 vrc));
+                return i_setErrorStatic(VBOX_E_IPRT_ERROR,
+                                        Utf8StrFmt(tr("Could not create the directory '%s' (%Rrc)"),
+                                                   strDir.c_str(),
+                                                   vrc));
         }
         else
-            return setErrorStatic(VBOX_E_IPRT_ERROR,
-                                  Utf8StrFmt(tr("Directory '%s' does not exist"),
-                                             strDir.c_str()));
+            return i_setErrorStatic(VBOX_E_IPRT_ERROR,
+                                    Utf8StrFmt(tr("Directory '%s' does not exist"),
+                                               strDir.c_str()));
     }
 
@@ -4797,5 +4574,5 @@
 }
 
-const Utf8Str& VirtualBox::settingsFilePath()
+const Utf8Str& VirtualBox::i_settingsFilePath()
 {
     return m->strSettingsFilePath;
@@ -4809,5 +4586,5 @@
  * before the locks of any machine object. See AutoLock.h.
  */
-RWLockHandle& VirtualBox::getMachinesListLockHandle()
+RWLockHandle& VirtualBox::i_getMachinesListLockHandle()
 {
     return m->lockMachines;
@@ -4822,5 +4599,5 @@
  * objects contained in these lists. See AutoLock.h.
  */
-RWLockHandle& VirtualBox::getMediaTreeLockHandle()
+RWLockHandle& VirtualBox::i_getMediaTreeLockHandle()
 {
     return m->lockMedia;
@@ -4928,34 +4705,24 @@
 //}
 
-STDMETHODIMP VirtualBox::CreateDHCPServer(IN_BSTR aName, IDHCPServer ** aServer)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-    CheckComArgNotNull(aServer);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT VirtualBox::createDHCPServer(const com::Utf8Str &aName,
+                                     ComPtr<IDHCPServer> &aServer)
+{
     ComObjPtr<DHCPServer> dhcpServer;
     dhcpServer.createObject();
-    HRESULT rc = dhcpServer->init(this, aName);
+    HRESULT rc = dhcpServer->init(this, Bstr(aName).raw());
     if (FAILED(rc)) return rc;
 
-    rc = registerDHCPServer(dhcpServer, true);
+    rc = i_registerDHCPServer(dhcpServer, true);
     if (FAILED(rc)) return rc;
 
-    dhcpServer.queryInterfaceTo(aServer);
+    dhcpServer.queryInterfaceTo(aServer.asOutParam());
 
     return rc;
 }
 
-STDMETHODIMP VirtualBox::FindDHCPServerByNetworkName(IN_BSTR aName, IDHCPServer ** aServer)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-    CheckComArgNotNull(aServer);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    HRESULT rc;
+HRESULT VirtualBox::findDHCPServerByNetworkName(const com::Utf8Str &aName,
+                                                ComPtr<IDHCPServer> &aServer)
+{
+    HRESULT rc = S_OK;
     Bstr bstr;
     ComPtr<DHCPServer> found;
@@ -4970,5 +4737,5 @@
         if (FAILED(rc)) return rc;
 
-        if (bstr == aName)
+        if (bstr == Bstr(aName).raw())
         {
             found = *it;
@@ -4980,15 +4747,14 @@
         return E_INVALIDARG;
 
-    return found.queryInterfaceTo(aServer);
-}
-
-STDMETHODIMP VirtualBox::RemoveDHCPServer(IDHCPServer * aServer)
-{
-    CheckComArgNotNull(aServer);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    HRESULT rc = unregisterDHCPServer(static_cast<DHCPServer *>(aServer), true);
+    rc = found.queryInterfaceTo(aServer.asOutParam());
+
+    return rc;
+}
+
+HRESULT VirtualBox::removeDHCPServer(const ComPtr<IDHCPServer> &aServer)
+{
+    IDHCPServer *aP = aServer;
+
+    HRESULT rc = i_unregisterDHCPServer(static_cast<DHCPServer *>(aP), true);
 
     return rc;
@@ -5010,6 +4776,6 @@
  * @note Locks this object for writing and @a aDHCPServer for reading.
  */
-HRESULT VirtualBox::registerDHCPServer(DHCPServer *aDHCPServer,
-                                       bool aSaveSettings /*= true*/)
+HRESULT VirtualBox::i_registerDHCPServer(DHCPServer *aDHCPServer,
+                                         bool aSaveSettings /*= true*/)
 {
     AssertReturn(aDHCPServer != NULL, E_INVALIDARG);
@@ -5022,13 +4788,14 @@
 
     Bstr name;
-    HRESULT rc;
+    com::Utf8Str uname;
+    HRESULT rc = S_OK;
     rc = aDHCPServer->COMGETTER(NetworkName)(name.asOutParam());
     if (FAILED(rc)) return rc;
+    uname = Utf8Str(name);
 
     ComPtr<IDHCPServer> existing;
-    rc = FindDHCPServerByNetworkName(name.raw(), existing.asOutParam());
+    rc = findDHCPServerByNetworkName(uname, existing);
     if (SUCCEEDED(rc))
         return E_INVALIDARG;
-
     rc = S_OK;
 
@@ -5038,9 +4805,9 @@
     {
         AutoWriteLock vboxLock(this COMMA_LOCKVAL_SRC_POS);
-        rc = saveSettings();
+        rc = i_saveSettings();
         vboxLock.release();
 
         if (FAILED(rc))
-            unregisterDHCPServer(aDHCPServer, false /* aSaveSettings */);
+            i_unregisterDHCPServer(aDHCPServer, false /* aSaveSettings */);
     }
 
@@ -5060,6 +4827,6 @@
  * @note Locks this object for writing.
  */
-HRESULT VirtualBox::unregisterDHCPServer(DHCPServer *aDHCPServer,
-                                         bool aSaveSettings /*= true*/)
+HRESULT VirtualBox::i_unregisterDHCPServer(DHCPServer *aDHCPServer,
+                                           bool aSaveSettings /*= true*/)
 {
     AssertReturn(aDHCPServer != NULL, E_INVALIDARG);
@@ -5078,9 +4845,9 @@
     {
         AutoWriteLock vboxLock(this COMMA_LOCKVAL_SRC_POS);
-        rc = saveSettings();
+        rc = i_saveSettings();
         vboxLock.release();
 
         if (FAILED(rc))
-            registerDHCPServer(aDHCPServer, false /* aSaveSettings */);
+            rc = i_registerDHCPServer(aDHCPServer, false /* aSaveSettings */);
     }
 
@@ -5092,25 +4859,20 @@
  * NAT Network
  */
-
-STDMETHODIMP VirtualBox::CreateNATNetwork(IN_BSTR aName, INATNetwork ** aNatNetwork)
+HRESULT VirtualBox::createNATNetwork(const com::Utf8Str &aNetworkName,
+                                     ComPtr<INATNetwork> &aNetwork)
 {
 #ifdef VBOX_WITH_NAT_SERVICE
-    CheckComArgStrNotEmptyOrNull(aName);
-    CheckComArgNotNull(aNatNetwork);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     ComObjPtr<NATNetwork> natNetwork;
     natNetwork.createObject();
-    HRESULT rc = natNetwork->init(this, aName);
+    HRESULT rc = natNetwork->init(this, Bstr(aNetworkName).raw());
     if (FAILED(rc)) return rc;
 
-    rc = registerNATNetwork(natNetwork, true);
+    rc = i_registerNATNetwork(natNetwork, true);
     if (FAILED(rc)) return rc;
 
-    natNetwork.queryInterfaceTo(aNatNetwork);
-
-    fireNATNetworkCreationDeletionEvent(m->pEventSource, aName, TRUE);
+    natNetwork.queryInterfaceTo(aNetwork.asOutParam());
+
+    fireNATNetworkCreationDeletionEvent(m->pEventSource, Bstr(aNetworkName).raw(), TRUE);
+
     return rc;
 #else
@@ -5121,12 +4883,8 @@
 }
 
-STDMETHODIMP VirtualBox::FindNATNetworkByName(IN_BSTR aName, INATNetwork ** aNetwork)
+HRESULT VirtualBox::findNATNetworkByName(const com::Utf8Str &aNetworkName,
+                                         ComPtr<INATNetwork> &aNetwork)
 {
 #ifdef VBOX_WITH_NAT_SERVICE
-    CheckComArgStrNotEmptyOrNull(aName);
-    CheckComArgNotNull(aNetwork);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
     HRESULT rc;
@@ -5143,5 +4901,5 @@
         if (FAILED(rc)) return rc;
 
-        if (bstr == aName)
+        if (bstr == Bstr(aNetworkName).raw())
         {
             found = *it;
@@ -5152,25 +4910,22 @@
     if (!found)
         return E_INVALIDARG;
-
-    return found.queryInterfaceTo(aNetwork);
+    found.queryInterfaceTo(aNetwork.asOutParam());
+    return rc;
 #else
     NOREF(aName);
-    NOREF(aNetwork);
+    NOREF(aNetworkName);
     return E_NOTIMPL;
 #endif
 }
 
-STDMETHODIMP VirtualBox::RemoveNATNetwork(INATNetwork * aNetwork)
+HRESULT VirtualBox::removeNATNetwork(const ComPtr<INATNetwork> &aNetwork)
 {
 #ifdef VBOX_WITH_NAT_SERVICE
-    CheckComArgNotNull(aNetwork);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     Bstr name;
-    HRESULT rc;
-    NATNetwork *network = static_cast<NATNetwork *>(aNetwork);
+    HRESULT rc = S_OK;
+    INATNetwork *iNw = aNetwork;
+    NATNetwork *network = static_cast<NATNetwork *>(iNw);
     rc = network->COMGETTER(NetworkName)(name.asOutParam());
-    rc = unregisterNATNetwork(network, true);
+    rc = i_unregisterNATNetwork(network, true);
     fireNATNetworkCreationDeletionEvent(m->pEventSource, name.raw(), FALSE);
     return rc;
@@ -5190,6 +4945,6 @@
  * @note Locks this object for writing and @a aNATNetwork for reading.
  */
-HRESULT VirtualBox::registerNATNetwork(NATNetwork *aNATNetwork,
-                                       bool aSaveSettings /*= true*/)
+HRESULT VirtualBox::i_registerNATNetwork(NATNetwork *aNATNetwork,
+                                         bool aSaveSettings /*= true*/)
 {
 #ifdef VBOX_WITH_NAT_SERVICE
@@ -5223,9 +4978,9 @@
     {
         AutoWriteLock vboxLock(this COMMA_LOCKVAL_SRC_POS);
-        rc = saveSettings();
+        rc = i_saveSettings();
         vboxLock.release();
 
         if (FAILED(rc))
-            unregisterNATNetwork(aNATNetwork, false /* aSaveSettings */);
+            i_unregisterNATNetwork(aNATNetwork, false /* aSaveSettings */);
     }
 
@@ -5251,6 +5006,6 @@
  * @note Locks this object for writing.
  */
-HRESULT VirtualBox::unregisterNATNetwork(NATNetwork *aNATNetwork,
-                                         bool aSaveSettings /*= true*/)
+HRESULT VirtualBox::i_unregisterNATNetwork(NATNetwork *aNATNetwork,
+                                           bool aSaveSettings /*= true*/)
 {
 #ifdef VBOX_WITH_NAT_SERVICE
@@ -5274,9 +5029,9 @@
     {
         AutoWriteLock vboxLock(this COMMA_LOCKVAL_SRC_POS);
-        rc = saveSettings();
+        rc = i_saveSettings();
         vboxLock.release();
 
         if (FAILED(rc))
-            registerNATNetwork(aNATNetwork, false /* aSaveSettings */);
+            i_registerNATNetwork(aNATNetwork, false /* aSaveSettings */);
     }
 
Index: /trunk/src/VBox/Main/src-server/win/NetIf-win.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/win/NetIf-win.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/win/NetIf-win.cpp	(revision 50355)
@@ -1149,8 +1149,8 @@
             d->vBox = pVirtualBox;
 
-            rc = pVirtualBox->startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
-                                                   netIfNetworkInterfaceHelperClient,
-                                                   static_cast<void *>(d.get()),
-                                                   progress);
+            rc = pVirtualBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
+                                                     netIfNetworkInterfaceHelperClient,
+                                                     static_cast<void *>(d.get()),
+                                                     progress);
             if (SUCCEEDED(rc))
             {
@@ -1194,8 +1194,8 @@
             d->guid = aId;
 
-            rc = pVirtualBox->startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
-                                                   netIfNetworkInterfaceHelperClient,
-                                                   static_cast<void *>(d.get()),
-                                                   progress);
+            rc = pVirtualBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
+                                                     netIfNetworkInterfaceHelperClient,
+                                                     static_cast<void *>(d.get()),
+                                                     progress);
 
             if (SUCCEEDED(rc))
@@ -1251,8 +1251,8 @@
                     d->u.StaticIP.IPNetMask = mask;
 
-                    rc = vBox->startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
-                                                    netIfNetworkInterfaceHelperClient,
-                                                    static_cast<void *>(d.get()),
-                                                    progress);
+                    rc = vBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
+                                                      netIfNetworkInterfaceHelperClient,
+                                                      static_cast<void *>(d.get()),
+                                                      progress);
 
                     if (SUCCEEDED(rc))
@@ -1312,8 +1312,8 @@
                     d->u.StaticIPV6.IPV6NetMaskLength = aIPV6MaskPrefixLength;
 
-                    rc = vBox->startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
-                                                    netIfNetworkInterfaceHelperClient,
-                                                    static_cast<void *>(d.get()),
-                                                    progress);
+                    rc = vBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
+                                                      netIfNetworkInterfaceHelperClient,
+                                                      static_cast<void *>(d.get()),
+                                                      progress);
 
                     if (SUCCEEDED(rc))
@@ -1371,8 +1371,8 @@
                     d->iface = pIf;
 
-                    rc = vBox->startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
-                                                    netIfNetworkInterfaceHelperClient,
-                                                    static_cast<void *>(d.get()),
-                                                    progress);
+                    rc = vBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
+                                                      netIfNetworkInterfaceHelperClient,
+                                                      static_cast<void *>(d.get()),
+                                                      progress);
 
                     if (SUCCEEDED(rc))
@@ -1430,8 +1430,8 @@
                     d->iface = pIf;
 
-                    rc = vBox->startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
-                                                    netIfNetworkInterfaceHelperClient,
-                                                    static_cast<void *>(d.get()),
-                                                    progress);
+                    rc = vBox->i_startSVCHelperClient(IsUACEnabled() == TRUE /* aPrivileged */,
+                                                      netIfNetworkInterfaceHelperClient,
+                                                      static_cast<void *>(d.get()),
+                                                      progress);
 
                     if (SUCCEEDED(rc))
Index: /trunk/src/VBox/Main/src-server/xpcom/server.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/xpcom/server.cpp	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/xpcom/server.cpp	(revision 50355)
@@ -97,8 +97,4 @@
 
 /* implement nsISupports parts of our objects with support for nsIClassInfo */
-
-NS_DECL_CLASSINFO(VirtualBox)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(VirtualBox, IVirtualBox)
-
 NS_DECL_CLASSINFO(Machine)
 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Machine, IMachine)
Index: /trunk/src/VBox/Main/src-server/xpcom/server.h
===================================================================
--- /trunk/src/VBox/Main/src-server/xpcom/server.h	(revision 50354)
+++ /trunk/src/VBox/Main/src-server/xpcom/server.h	(revision 50355)
@@ -35,2 +35,4 @@
 
 #endif /* ____H_LINUX_SERVER */
+HRESULT VirtualBox_GetInterfacesHelper() { 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 50354)
+++ /trunk/src/VBox/Main/src-server/xpcom/server_module.cpp	(revision 50355)
@@ -91,7 +91,4 @@
  *  in sync with macros used for VirtualBox in server.cpp for the same purpose.
  */
-
-NS_DECL_CLASSINFO(VirtualBox)
-NS_IMPL_CI_INTERFACE_GETTER1(VirtualBox, IVirtualBox)
 
 static nsresult vboxsvcSpawnDaemon(void)
