Index: /trunk/src/VBox/Main/include/NetworkAdapterImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/NetworkAdapterImpl.h	(revision 49950)
+++ /trunk/src/VBox/Main/include/NetworkAdapterImpl.h	(revision 49951)
@@ -7,5 +7,5 @@
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2013 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -21,9 +21,10 @@
 #define ____H_NETWORKADAPTER
 
-#include "VirtualBoxBase.h"
-#include "NATEngineImpl.h"
-#include "BandwidthGroupImpl.h"
+#include "NetworkAdapterWrap.h"
 
 class GuestOSType;
+class BandwidthControl;
+class BandwidthGroup;
+class NATEngine;
 
 namespace settings
@@ -33,8 +34,85 @@
 
 class ATL_NO_VTABLE NetworkAdapter :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(INetworkAdapter)
+    public NetworkAdapterWrap
 {
 public:
+
+    DECLARE_EMPTY_CTOR_DTOR(NetworkAdapter)
+
+    HRESULT FinalConstruct();
+    void FinalRelease();
+
+    // public initializer/uninitializer for internal purposes only
+    HRESULT init(Machine *aParent, ULONG aSlot);
+    HRESULT init(Machine *aParent, NetworkAdapter *aThat, bool aReshare = false);
+    HRESULT initCopy(Machine *aParent, NetworkAdapter *aThat);
+    void uninit();
+
+    // public methods only for internal purposes
+    HRESULT i_loadSettings(BandwidthControl *bwctl, const settings::NetworkAdapter &data);
+    HRESULT i_saveSettings(settings::NetworkAdapter &data);
+
+    bool i_isModified();
+    void i_rollback();
+    void i_commit();
+    void i_copyFrom(NetworkAdapter *aThat);
+    void i_applyDefaults(GuestOSType *aOsType);
+
+    ComObjPtr<NetworkAdapter> i_getPeer();
+
+private:
+
+    // wrapped INetworkAdapter properties
+    HRESULT getAdapterType(NetworkAdapterType_T *aAdapterType);
+    HRESULT setAdapterType(NetworkAdapterType_T aAdapterType);
+    HRESULT getSlot(ULONG *aSlot);
+    HRESULT getEnabled(BOOL *aEnabled);
+    HRESULT setEnabled(BOOL aEnabled);
+    HRESULT getMACAddress(com::Utf8Str &aMACAddress);
+    HRESULT setMACAddress(const com::Utf8Str &aMACAddress);
+    HRESULT getAttachmentType(NetworkAttachmentType_T *aAttachmentType);
+    HRESULT setAttachmentType(NetworkAttachmentType_T aAttachmentType);
+    HRESULT getBridgedInterface(com::Utf8Str &aBridgedInterface);
+    HRESULT setBridgedInterface(const com::Utf8Str &aBridgedInterface);
+    HRESULT getHostOnlyInterface(com::Utf8Str &aHostOnlyInterface);
+    HRESULT setHostOnlyInterface(const com::Utf8Str &aHostOnlyInterface);
+    HRESULT getInternalNetwork(com::Utf8Str &aInternalNetwork);
+    HRESULT setInternalNetwork(const com::Utf8Str &aInternalNetwork);
+    HRESULT getNATNetwork(com::Utf8Str &aNATNetwork);
+    HRESULT setNATNetwork(const com::Utf8Str &aNATNetwork);
+    HRESULT getGenericDriver(com::Utf8Str &aGenericDriver);
+    HRESULT setGenericDriver(const com::Utf8Str &aGenericDriver);
+    HRESULT getCableConnected(BOOL *aCableConnected);
+    HRESULT setCableConnected(BOOL aCableConnected);
+    HRESULT getLineSpeed(ULONG *aLineSpeed);
+    HRESULT setLineSpeed(ULONG aLineSpeed);
+    HRESULT getPromiscModePolicy(NetworkAdapterPromiscModePolicy_T *aPromiscModePolicy);
+    HRESULT setPromiscModePolicy(NetworkAdapterPromiscModePolicy_T aPromiscModePolicy);
+    HRESULT getTraceEnabled(BOOL *aTraceEnabled);
+    HRESULT setTraceEnabled(BOOL aTraceEnabled);
+    HRESULT getTraceFile(com::Utf8Str &aTraceFile);
+    HRESULT setTraceFile(const com::Utf8Str &aTraceFile);
+    HRESULT getNATEngine(ComPtr<INATEngine> &aNATEngine);
+    HRESULT getBootPriority(ULONG *aBootPriority);
+    HRESULT setBootPriority(ULONG aBootPriority);
+    HRESULT getBandwidthGroup(ComPtr<IBandwidthGroup> &aBandwidthGroup);
+    HRESULT setBandwidthGroup(const ComPtr<IBandwidthGroup> &aBandwidthGroup);
+
+    // wrapped INetworkAdapter methods
+    HRESULT getProperty(const com::Utf8Str &aKey,
+                        com::Utf8Str &aValue);
+    HRESULT setProperty(const com::Utf8Str &aKey,
+                        const com::Utf8Str &aValue);
+    HRESULT getProperties(const com::Utf8Str &aNames,
+                          std::vector<com::Utf8Str> &aReturnNames,
+                          std::vector<com::Utf8Str> &aReturnValues);
+    // Misc.
+    void i_generateMACAddress();
+    HRESULT i_updateMacAddress(Utf8Str aMacAddress);
+    void i_updateBandwidthGroup(BandwidthGroup *aBwGroup);
+    HRESULT i_checkAndSwitchFromNatNetworking(com::Utf8Str networkName);
+    HRESULT i_switchToNatNetworking(const com::Utf8Str &aNatNetworkName);
+
+    typedef std::map<com::Utf8Str, com::Utf8Str> StringsMap;
 
     struct Data
@@ -56,5 +134,5 @@
         ULONG mSlot;
         BOOL mEnabled;
-        Bstr mMACAddress;
+        com::Utf8Str mMACAddress;
         NetworkAttachmentType_T mAttachmentType;
         BOOL mCableConnected;
@@ -62,99 +140,14 @@
         NetworkAdapterPromiscModePolicy_T mPromiscModePolicy;
         BOOL mTraceEnabled;
-        Bstr mTraceFile;
-        Bstr mBridgedInterface;
-        Bstr mHostOnlyInterface;
-        Bstr mInternalNetwork;
-        Bstr mNATNetwork;
-        Bstr mGenericDriver;
-        settings::StringsMap mGenericProperties;
+        com::Utf8Str mTraceFile;
+        com::Utf8Str mBridgedInterface;
+        com::Utf8Str mHostOnlyInterface;
+        com::Utf8Str mInternalNetwork;
+        com::Utf8Str mNATNetwork;
+        com::Utf8Str mGenericDriver;
+        StringsMap mGenericProperties;
         ULONG mBootPriority;
-        Utf8Str mBandwidthGroup;
+        com::Utf8Str mBandwidthGroup;
     };
-
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(NetworkAdapter, INetworkAdapter)
-
-    DECLARE_NOT_AGGREGATABLE(NetworkAdapter)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(NetworkAdapter)
-        VBOX_DEFAULT_INTERFACE_ENTRIES(INetworkAdapter)
-    END_COM_MAP()
-
-    DECLARE_EMPTY_CTOR_DTOR(NetworkAdapter)
-
-    HRESULT FinalConstruct();
-    void FinalRelease();
-
-    // public initializer/uninitializer for internal purposes only
-    HRESULT init(Machine *aParent, ULONG aSlot);
-    HRESULT init(Machine *aParent, NetworkAdapter *aThat, bool aReshare = false);
-    HRESULT initCopy(Machine *aParent, NetworkAdapter *aThat);
-    void uninit();
-
-    // INetworkAdapter properties
-    STDMETHOD(COMGETTER(AdapterType))(NetworkAdapterType_T *aAdapterType);
-    STDMETHOD(COMSETTER(AdapterType))(NetworkAdapterType_T aAdapterType);
-    STDMETHOD(COMGETTER(Slot))(ULONG *aSlot);
-    STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled);
-    STDMETHOD(COMSETTER(Enabled))(BOOL aEnabled);
-    STDMETHOD(COMGETTER(MACAddress))(BSTR *aMACAddress);
-    STDMETHOD(COMSETTER(MACAddress))(IN_BSTR aMACAddress);
-    STDMETHOD(COMGETTER(AttachmentType))(NetworkAttachmentType_T *aAttachmentType);
-    STDMETHOD(COMSETTER(AttachmentType))(NetworkAttachmentType_T aAttachmentType);
-    STDMETHOD(COMGETTER(BridgedInterface))(BSTR *aBridgedInterface);
-    STDMETHOD(COMSETTER(BridgedInterface))(IN_BSTR aBridgedInterface);
-    STDMETHOD(COMGETTER(HostOnlyInterface))(BSTR *aHostOnlyInterface);
-    STDMETHOD(COMSETTER(HostOnlyInterface))(IN_BSTR aHostOnlyInterface);
-    STDMETHOD(COMGETTER(InternalNetwork))(BSTR *aInternalNetwork);
-    STDMETHOD(COMSETTER(InternalNetwork))(IN_BSTR aInternalNetwork);
-    STDMETHOD(COMGETTER(NATNetwork))(BSTR *aNATNetwork);
-    STDMETHOD(COMSETTER(NATNetwork))(IN_BSTR aNATNetwork);
-    STDMETHOD(COMGETTER(GenericDriver))(BSTR *aGenericDriver);
-    STDMETHOD(COMSETTER(GenericDriver))(IN_BSTR aGenericDriver);
-    STDMETHOD(COMGETTER(CableConnected))(BOOL *aConnected);
-    STDMETHOD(COMSETTER(CableConnected))(BOOL aConnected);
-    STDMETHOD(COMGETTER(TraceEnabled))(BOOL *aEnabled);
-    STDMETHOD(COMSETTER(TraceEnabled))(BOOL aEnabled);
-    STDMETHOD(COMGETTER(LineSpeed))(ULONG *aSpeed);
-    STDMETHOD(COMSETTER(LineSpeed))(ULONG aSpeed);
-    STDMETHOD(COMGETTER(PromiscModePolicy))(NetworkAdapterPromiscModePolicy_T *aPromiscModePolicy);
-    STDMETHOD(COMSETTER(PromiscModePolicy))(NetworkAdapterPromiscModePolicy_T aPromiscModePolicy);
-    STDMETHOD(COMGETTER(TraceFile))(BSTR *aTraceFile);
-    STDMETHOD(COMSETTER(TraceFile))(IN_BSTR aTraceFile);
-    STDMETHOD(COMGETTER(NATEngine))(INATEngine **aNATEngine);
-    STDMETHOD(COMGETTER(BootPriority))(ULONG *aBootPriority);
-    STDMETHOD(COMSETTER(BootPriority))(ULONG aBootPriority);
-    STDMETHOD(COMGETTER(BandwidthGroup))(IBandwidthGroup **aBwGroup);
-    STDMETHOD(COMSETTER(BandwidthGroup))(IBandwidthGroup *aBwGroup);
-
-    // INetworkAdapter methods
-    STDMETHOD(GetProperty)(IN_BSTR aName, BSTR *aValue);
-    STDMETHOD(SetProperty)(IN_BSTR aName, IN_BSTR aValue);
-    STDMETHOD(GetProperties)(IN_BSTR aNames,
-                             ComSafeArrayOut(BSTR, aReturnNames),
-                             ComSafeArrayOut(BSTR, aReturnValues));
-
-    // public methods only for internal purposes
-
-    HRESULT loadSettings(BandwidthControl *bwctl, const settings::NetworkAdapter &data);
-    HRESULT saveSettings(settings::NetworkAdapter &data);
-
-    bool isModified();
-    void rollback();
-    void commit();
-    void copyFrom(NetworkAdapter *aThat);
-    void applyDefaults(GuestOSType *aOsType);
-
-    ComObjPtr<NetworkAdapter> getPeer();
-
-private:
-
-    void generateMACAddress();
-    HRESULT updateMacAddress(Utf8Str aMacAddress);
-    void updateBandwidthGroup(BandwidthGroup *aBwGroup);
-    HRESULT checkAndSwitchFromNatNetworking(IN_BSTR aNatNetworkName);
-    HRESULT switchToNatNetworking(IN_BSTR aNatNetworkName);
 
     Machine * const     mParent;
Index: /trunk/src/VBox/Main/include/SystemPropertiesImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/SystemPropertiesImpl.h	(revision 49950)
+++ /trunk/src/VBox/Main/include/SystemPropertiesImpl.h	(revision 49951)
@@ -21,10 +21,7 @@
 #define ____H_SYSTEMPROPERTIESIMPL
 
-#include "VirtualBoxBase.h"
 #include "MediumFormatImpl.h"
+#include "SystemPropertiesWrap.h"
 
-#include <VBox/com/array.h>
-
-#include <list>
 
 namespace settings
@@ -34,18 +31,8 @@
 
 class ATL_NO_VTABLE SystemProperties :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(ISystemProperties)
+    public SystemPropertiesWrap
 {
 public:
-
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(SystemProperties, ISystemProperties)
-
-    DECLARE_NOT_AGGREGATABLE(SystemProperties)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(SystemProperties)
-        VBOX_DEFAULT_INTERFACE_ENTRIES(ISystemProperties)
-    END_COM_MAP()
+    typedef std::list<ComObjPtr<MediumFormat> > MediumFormatList;
 
     DECLARE_EMPTY_CTOR_DTOR(SystemProperties)
@@ -58,85 +45,93 @@
     void uninit();
 
-    // ISystemProperties properties
-    STDMETHOD(COMGETTER(MinGuestRAM))(ULONG *minRAM);
-    STDMETHOD(COMGETTER(MaxGuestRAM))(ULONG *maxRAM);
-    STDMETHOD(COMGETTER(MinGuestVRAM))(ULONG *minVRAM);
-    STDMETHOD(COMGETTER(MaxGuestVRAM))(ULONG *maxVRAM);
-    STDMETHOD(COMGETTER(MinGuestCPUCount))(ULONG *minCPUCount);
-    STDMETHOD(COMGETTER(MaxGuestCPUCount))(ULONG *maxCPUCount);
-    STDMETHOD(COMGETTER(MaxGuestMonitors))(ULONG *maxMonitors);
-    STDMETHOD(COMGETTER(InfoVDSize))(LONG64 *infoVDSize);
-    STDMETHOD(COMGETTER(SerialPortCount))(ULONG *count);
-    STDMETHOD(COMGETTER(ParallelPortCount))(ULONG *count);
-    STDMETHOD(COMGETTER(MaxBootPosition))(ULONG *aMaxBootPosition);
-    STDMETHOD(COMGETTER(ExclusiveHwVirt))(BOOL *aExclusiveHwVirt);
-    STDMETHOD(COMSETTER(ExclusiveHwVirt))(BOOL aExclusiveHwVirt);
-    STDMETHOD(COMGETTER(LoggingLevel))(BSTR *aLoggingLevel);
-    STDMETHOD(COMSETTER(LoggingLevel))(IN_BSTR aLoggingLevel);
-    STDMETHOD(COMGETTER(DefaultMachineFolder))(BSTR *aDefaultMachineFolder);
-    STDMETHOD(COMSETTER(DefaultMachineFolder))(IN_BSTR aDefaultMachineFolder);
-    STDMETHOD(COMGETTER(MediumFormats))(ComSafeArrayOut(IMediumFormat *, aMediumFormats));
-    STDMETHOD(COMGETTER(DefaultHardDiskFormat))(BSTR *aDefaultHardDiskFormat);
-    STDMETHOD(COMSETTER(DefaultHardDiskFormat))(IN_BSTR aDefaultHardDiskFormat);
-    STDMETHOD(COMGETTER(FreeDiskSpaceWarning))(LONG64 *aFreeDiskSpace);
-    STDMETHOD(COMSETTER(FreeDiskSpaceWarning))(LONG64 aFreeDiskSpace);
-    STDMETHOD(COMGETTER(FreeDiskSpacePercentWarning))(ULONG *aFreeDiskSpacePercent);
-    STDMETHOD(COMSETTER(FreeDiskSpacePercentWarning))(ULONG aFreeDiskSpacePercent);
-    STDMETHOD(COMGETTER(FreeDiskSpaceError))(LONG64 *aFreeDiskSpace);
-    STDMETHOD(COMSETTER(FreeDiskSpaceError))(LONG64 aFreeDiskSpace);
-    STDMETHOD(COMGETTER(FreeDiskSpacePercentError))(ULONG *aFreeDiskSpacePercent);
-    STDMETHOD(COMSETTER(FreeDiskSpacePercentError))(ULONG aFreeDiskSpacePercent);
-    STDMETHOD(COMGETTER(VRDEAuthLibrary))(BSTR *aVRDEAuthLibrary);
-    STDMETHOD(COMSETTER(VRDEAuthLibrary))(IN_BSTR aVRDEAuthLibrary);
-    STDMETHOD(COMGETTER(WebServiceAuthLibrary))(BSTR *aWebServiceAuthLibrary);
-    STDMETHOD(COMSETTER(WebServiceAuthLibrary))(IN_BSTR aWebServiceAuthLibrary);
-    STDMETHOD(COMGETTER(DefaultVRDEExtPack))(BSTR *aExtPack);
-    STDMETHOD(COMSETTER(DefaultVRDEExtPack))(IN_BSTR aExtPack);
-    STDMETHOD(COMGETTER(LogHistoryCount))(ULONG *count);
-    STDMETHOD(COMSETTER(LogHistoryCount))(ULONG count);
-    STDMETHOD(COMGETTER(DefaultAudioDriver))(AudioDriverType_T *aAudioDriver);
-    STDMETHOD(COMGETTER(AutostartDatabasePath))(BSTR *aAutostartDbPath);
-    STDMETHOD(COMSETTER(AutostartDatabasePath))(IN_BSTR aAutostartDbPath);
-    STDMETHOD(COMGETTER(DefaultAdditionsISO))(BSTR *aDefaultAdditionsISO);
-    STDMETHOD(COMSETTER(DefaultAdditionsISO))(IN_BSTR aDefaultAdditionsISO);
-    STDMETHOD(COMGETTER(DefaultFrontend))(BSTR *aDefaultFrontend);
-    STDMETHOD(COMSETTER(DefaultFrontend))(IN_BSTR aDefaultFrontend);
-
-    STDMETHOD(GetMaxNetworkAdapters)(ChipsetType_T aChipset, ULONG *aMaxInstances);
-    STDMETHOD(GetMaxNetworkAdaptersOfType)(ChipsetType_T aChipset, NetworkAttachmentType_T aType, ULONG *aMaxInstances);
-    STDMETHOD(GetMaxDevicesPerPortForStorageBus)(StorageBus_T aBus, ULONG *aMaxDevicesPerPort);
-    STDMETHOD(GetMinPortCountForStorageBus)(StorageBus_T aBus, ULONG *aMinPortCount);
-    STDMETHOD(GetMaxPortCountForStorageBus)(StorageBus_T aBus, ULONG *aMaxPortCount);
-    STDMETHOD(GetMaxInstancesOfStorageBus)(ChipsetType_T aChipset, StorageBus_T aBus, ULONG *aMaxInstances);
-    STDMETHOD(GetDeviceTypesForStorageBus)(StorageBus_T aBus, ComSafeArrayOut(DeviceType_T, aDeviceTypes));
-    STDMETHOD(GetDefaultIoCacheSettingForStorageController)(StorageControllerType_T aControllerType, BOOL *aEnabled);
-    STDMETHOD(GetMaxInstancesOfUSBControllerType)(ChipsetType_T aChipset, USBControllerType_T aType, ULONG *aMaxInstances);
-
-    // public methods only for internal purposes
-
-    HRESULT loadSettings(const settings::SystemProperties &data);
-    HRESULT saveSettings(settings::SystemProperties &data);
-
-    ComObjPtr<MediumFormat> mediumFormat(const Utf8Str &aFormat);
-    ComObjPtr<MediumFormat> mediumFormatFromExtension(const Utf8Str &aExt);
-
     // public methods for internal purposes only
     // (ensure there is a caller and a read lock before calling them!)
+    HRESULT i_loadSettings(const settings::SystemProperties &data);
+    HRESULT i_saveSettings(settings::SystemProperties &data);
+
+    ComObjPtr<MediumFormat> i_mediumFormat(const Utf8Str &aFormat);
+    ComObjPtr<MediumFormat> i_mediumFormatFromExtension(const Utf8Str &aExt);
 
 private:
 
-    typedef std::list<ComObjPtr<MediumFormat> > MediumFormatList;
+    // wrapped ISystemProperties properties
+    HRESULT getMinGuestRAM(ULONG *aMinGuestRAM);
+    HRESULT getMaxGuestRAM(ULONG *aMaxGuestRAM);
+    HRESULT getMinGuestVRAM(ULONG *aMinGuestVRAM);
+    HRESULT getMaxGuestVRAM(ULONG *aMaxGuestVRAM);
+    HRESULT getMinGuestCPUCount(ULONG *aMinGuestCPUCount);
+    HRESULT getMaxGuestCPUCount(ULONG *aMaxGuestCPUCount);
+    HRESULT getMaxGuestMonitors(ULONG *aMaxGuestMonitors);
+    HRESULT getInfoVDSize(LONG64 *aInfoVDSize);
+    HRESULT getSerialPortCount(ULONG *aSerialPortCount);
+    HRESULT getParallelPortCount(ULONG *aParallelPortCount);
+    HRESULT getMaxBootPosition(ULONG *aMaxBootPosition);
+    HRESULT getExclusiveHwVirt(BOOL *aExclusiveHwVirt);
+    HRESULT setExclusiveHwVirt(BOOL aExclusiveHwVirt);
+    HRESULT getDefaultMachineFolder(com::Utf8Str &aDefaultMachineFolder);
+    HRESULT setDefaultMachineFolder(const com::Utf8Str &aDefaultMachineFolder);
+    HRESULT getLoggingLevel(com::Utf8Str &aLoggingLevel);
+    HRESULT setLoggingLevel(const com::Utf8Str &aLoggingLevel);
+    HRESULT getMediumFormats(std::vector<ComPtr<IMediumFormat> > &aMediumFormats);
+    HRESULT getDefaultHardDiskFormat(com::Utf8Str &aDefaultHardDiskFormat);
+    HRESULT setDefaultHardDiskFormat(const com::Utf8Str &aDefaultHardDiskFormat);
+    HRESULT getFreeDiskSpaceWarning(LONG64 *aFreeDiskSpaceWarning);
+    HRESULT setFreeDiskSpaceWarning(LONG64 aFreeDiskSpaceWarning);
+    HRESULT getFreeDiskSpacePercentWarning(ULONG *aFreeDiskSpacePercentWarning);
+    HRESULT setFreeDiskSpacePercentWarning(ULONG aFreeDiskSpacePercentWarning);
+    HRESULT getFreeDiskSpaceError(LONG64 *aFreeDiskSpaceError);
+    HRESULT setFreeDiskSpaceError(LONG64 aFreeDiskSpaceError);
+    HRESULT getFreeDiskSpacePercentError(ULONG *aFreeDiskSpacePercentError);
+    HRESULT setFreeDiskSpacePercentError(ULONG aFreeDiskSpacePercentError);
+    HRESULT getVRDEAuthLibrary(com::Utf8Str &aVRDEAuthLibrary);
+    HRESULT setVRDEAuthLibrary(const com::Utf8Str &aVRDEAuthLibrary);
+    HRESULT getWebServiceAuthLibrary(com::Utf8Str &aWebServiceAuthLibrary);
+    HRESULT setWebServiceAuthLibrary(const com::Utf8Str &aWebServiceAuthLibrary);
+    HRESULT getDefaultVRDEExtPack(com::Utf8Str &aDefaultVRDEExtPack);
+    HRESULT setDefaultVRDEExtPack(const com::Utf8Str &aDefaultVRDEExtPack);
+    HRESULT getLogHistoryCount(ULONG *aLogHistoryCount);
+    HRESULT setLogHistoryCount(ULONG aLogHistoryCount);
+    HRESULT getDefaultAudioDriver(AudioDriverType_T *aDefaultAudioDriver);
+    HRESULT getAutostartDatabasePath(com::Utf8Str &aAutostartDatabasePath);
+    HRESULT setAutostartDatabasePath(const com::Utf8Str &aAutostartDatabasePath);
+    HRESULT getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO);
+    HRESULT setDefaultAdditionsISO(const com::Utf8Str &aDefaultAdditionsISO);
+    HRESULT getDefaultFrontend(com::Utf8Str &aDefaultFrontend);
+    HRESULT setDefaultFrontend(const com::Utf8Str &aDefaultFrontend);
 
-    HRESULT getUserHomeDirectory(Utf8Str &strPath);
-    HRESULT setDefaultMachineFolder(const Utf8Str &aPath);
-    HRESULT setLoggingLevel(const Utf8Str &aLoggingLevel);
-    HRESULT setDefaultHardDiskFormat(const Utf8Str &aFormat);
+    // wrapped ISystemProperties methods
+    HRESULT getMaxNetworkAdapters(ChipsetType_T aChipset,
+                                  ULONG *aMaxNetworkAdapters);
+    HRESULT getMaxNetworkAdaptersOfType(ChipsetType_T aChipset,
+                                        NetworkAttachmentType_T aType,
+                                        ULONG *aMaxNetworkAdapters);
+    HRESULT getMaxDevicesPerPortForStorageBus(StorageBus_T aBus,
+                                              ULONG *aMaxDevicesPerPort);
+    HRESULT getMinPortCountForStorageBus(StorageBus_T aBus,
+                                         ULONG *aMinPortCount);
+    HRESULT getMaxPortCountForStorageBus(StorageBus_T aBus,
+                                         ULONG *aMaxPortCount);
+    HRESULT getMaxInstancesOfStorageBus(ChipsetType_T aChipset,
+                                        StorageBus_T aBus,
+                                        ULONG *aMaxInstances);
+    HRESULT getDeviceTypesForStorageBus(StorageBus_T aBus,
+                                        std::vector<DeviceType_T> &aDeviceTypes);
+    HRESULT getDefaultIoCacheSettingForStorageController(StorageControllerType_T aControllerType,
+                                                         BOOL *aEnabled);
+    HRESULT getMaxInstancesOfUSBControllerType(ChipsetType_T aChipset,
+                                               USBControllerType_T aType,
+                                               ULONG *aMaxInstances);
 
-    HRESULT setVRDEAuthLibrary(const Utf8Str &aPath);
-    HRESULT setWebServiceAuthLibrary(const Utf8Str &aPath);
-    HRESULT setDefaultVRDEExtPack(const Utf8Str &aPath);
-    HRESULT setAutostartDatabasePath(const Utf8Str &aPath);
-    HRESULT setDefaultAdditionsISO(const Utf8Str &aPath);
-    HRESULT setDefaultFrontend(const Utf8Str &aPath);
+    HRESULT i_getUserHomeDirectory(Utf8Str &strPath);
+    HRESULT i_setDefaultMachineFolder(const Utf8Str &strPath);
+    HRESULT i_setLoggingLevel(const com::Utf8Str &aLoggingLevel);
+    HRESULT i_setDefaultHardDiskFormat(const com::Utf8Str &aFormat);
+    HRESULT i_setVRDEAuthLibrary(const com::Utf8Str &aPath);
+
+    HRESULT i_setWebServiceAuthLibrary(const com::Utf8Str &aPath);
+    HRESULT i_setDefaultVRDEExtPack(const com::Utf8Str &aExtPack);
+    HRESULT i_setAutostartDatabasePath(const com::Utf8Str &aPath);
+    HRESULT i_setDefaultAdditionsISO(const com::Utf8Str &aPath);
+    HRESULT i_setDefaultFrontend(const com::Utf8Str &aDefaultFrontend);
 
     VirtualBox * const  mParent;
@@ -144,5 +139,5 @@
     settings::SystemProperties *m;
 
-    MediumFormatList    m_llMediumFormats;
+    MediumFormatList m_llMediumFormats;
 
     friend class VirtualBox;
Index: /trunk/src/VBox/Main/include/USBDeviceFilterImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/USBDeviceFilterImpl.h	(revision 49950)
+++ /trunk/src/VBox/Main/include/USBDeviceFilterImpl.h	(revision 49951)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2013 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -19,8 +19,7 @@
 #define ____H_USBDEVICEFILTERIMPL
 
-#include "VirtualBoxBase.h"
-
 #include "Matching.h"
 #include <VBox/usbfilter.h>
+#include "USBDeviceFilterWrap.h"
 
 class USBDeviceFilters;
@@ -35,6 +34,5 @@
 
 class ATL_NO_VTABLE USBDeviceFilter :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(IUSBDeviceFilter)
+    public USBDeviceFilterWrap
 {
 public:
@@ -67,15 +65,5 @@
     };
 
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(USBDeviceFilter, IUSBDeviceFilter)
-
-    DECLARE_NOT_AGGREGATABLE(USBDeviceFilter)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(USBDeviceFilter)
-        VBOX_DEFAULT_INTERFACE_ENTRIES  (IUSBDeviceFilter)
-    END_COM_MAP()
-
-    DECLARE_EMPTY_CTOR_DTOR (USBDeviceFilter)
+    DECLARE_EMPTY_CTOR_DTOR(USBDeviceFilter)
 
     HRESULT FinalConstruct();
@@ -91,32 +79,8 @@
     void uninit();
 
-    // IUSBDeviceFilter properties
-    STDMETHOD(COMGETTER(Name)) (BSTR *aName);
-    STDMETHOD(COMSETTER(Name)) (IN_BSTR aName);
-    STDMETHOD(COMGETTER(Active)) (BOOL *aActive);
-    STDMETHOD(COMSETTER(Active)) (BOOL aActive);
-    STDMETHOD(COMGETTER(VendorId)) (BSTR *aVendorId);
-    STDMETHOD(COMSETTER(VendorId)) (IN_BSTR aVendorId);
-    STDMETHOD(COMGETTER(ProductId)) (BSTR *aProductId);
-    STDMETHOD(COMSETTER(ProductId)) (IN_BSTR aProductId);
-    STDMETHOD(COMGETTER(Revision)) (BSTR *aRevision);
-    STDMETHOD(COMSETTER(Revision)) (IN_BSTR aRevision);
-    STDMETHOD(COMGETTER(Manufacturer)) (BSTR *aManufacturer);
-    STDMETHOD(COMSETTER(Manufacturer)) (IN_BSTR aManufacturer);
-    STDMETHOD(COMGETTER(Product)) (BSTR *aProduct);
-    STDMETHOD(COMSETTER(Product)) (IN_BSTR aProduct);
-    STDMETHOD(COMGETTER(SerialNumber)) (BSTR *aSerialNumber);
-    STDMETHOD(COMSETTER(SerialNumber)) (IN_BSTR aSerialNumber);
-    STDMETHOD(COMGETTER(Port)) (BSTR *aPort);
-    STDMETHOD(COMSETTER(Port)) (IN_BSTR aPort);
-    STDMETHOD(COMGETTER(Remote)) (BSTR *aRemote);
-    STDMETHOD(COMSETTER(Remote)) (IN_BSTR aRemote);
-    STDMETHOD(COMGETTER(MaskedInterfaces)) (ULONG *aMaskedIfs);
-    STDMETHOD(COMSETTER(MaskedInterfaces)) (ULONG aMaskedIfs);
-
     // public methods only for internal purposes
-    bool isModified();
-    void rollback();
-    void commit();
+    bool i_isModified();
+    void i_rollback();
+    void i_commit();
 
     void unshare();
@@ -124,22 +88,45 @@
     // public methods for internal purposes only
     // (ensure there is a caller and a read lock before calling them!)
-
-    void *& getId() { return mData.data()->mId; }
-
-    const Data& getData() { return *mData.data(); }
-    ComObjPtr<USBDeviceFilter> peer() { return mPeer; }
+    void *& i_getId() { return mData.data()->mId; }
+    const Data& i_getData() { return *mData.data(); }
+    ComObjPtr<USBDeviceFilter> i_peer() { return mPeer; }
 
     // tr() wants to belong to a class it seems, thus this one here.
-    static HRESULT usbFilterFieldFromString(PUSBFILTER aFilter,
-                                            USBFILTERIDX aIdx,
-                                            const Utf8Str &aValue,
-                                            Utf8Str &aErrStr);
-
-    static const char* describeUSBFilterIdx(USBFILTERIDX aIdx);
+    static HRESULT i_usbFilterFieldFromString(PUSBFILTER aFilter,
+                                              USBFILTERIDX aIdx,
+                                              const Utf8Str &aValue,
+                                              Utf8Str &aErrStr);
+
+    static const char* i_describeUSBFilterIdx(USBFILTERIDX aIdx);
 
 private:
-    HRESULT usbFilterFieldGetter(USBFILTERIDX aIdx, BSTR *aStr);
-    HRESULT usbFilterFieldSetter(USBFILTERIDX aIdx, IN_BSTR aStr);
-    HRESULT usbFilterFieldSetter(USBFILTERIDX aIdx, const Utf8Str &strNew);
+
+    // wrapped IUSBDeviceFilter properties
+    HRESULT getName(com::Utf8Str &aName);
+    HRESULT setName(const com::Utf8Str &aName);
+    HRESULT getActive(BOOL *aActive);
+    HRESULT setActive(BOOL aActive);
+    HRESULT getVendorId(com::Utf8Str &aVendorId);
+    HRESULT setVendorId(const com::Utf8Str &aVendorId);
+    HRESULT getProductId(com::Utf8Str &aProductId);
+    HRESULT setProductId(const com::Utf8Str &aProductId);
+    HRESULT getRevision(com::Utf8Str &aRevision);
+    HRESULT setRevision(const com::Utf8Str &aRevision);
+    HRESULT getManufacturer(com::Utf8Str &aManufacturer);
+    HRESULT setManufacturer(const com::Utf8Str &aManufacturer);
+    HRESULT getProduct(com::Utf8Str &aProduct);
+    HRESULT setProduct(const com::Utf8Str &aProduct);
+    HRESULT getSerialNumber(com::Utf8Str &aSerialNumber);
+    HRESULT setSerialNumber(const com::Utf8Str &aSerialNumber);
+    HRESULT getPort(com::Utf8Str &aPort);
+    HRESULT setPort(const com::Utf8Str &aPort);
+    HRESULT getRemote(com::Utf8Str &aRemote);
+    HRESULT setRemote(const com::Utf8Str &aRemote);
+    HRESULT getMaskedInterfaces(ULONG *aMaskedInterfaces);
+    HRESULT setMaskedInterfaces(ULONG aMaskedInterfaces);
+
+    // wrapped IUSBDeviceFilter methods
+    HRESULT i_usbFilterFieldGetter(USBFILTERIDX aIdx, com::Utf8Str &aStr);
+    HRESULT i_usbFilterFieldSetter(USBFILTERIDX aIdx, const com::Utf8Str &strNew);
 
     USBDeviceFilters * const     mParent;
@@ -156,4 +143,5 @@
     friend class USBDeviceFilters;
 };
+#include "HostUSBDeviceFilterWrap.h"
 
 // HostUSBDeviceFilter
@@ -161,6 +149,5 @@
 
 class ATL_NO_VTABLE HostUSBDeviceFilter :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(IHostUSBDeviceFilter)
+    public HostUSBDeviceFilterWrap
 {
 public:
@@ -170,15 +157,4 @@
         Data() {}
     };
-
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(HostUSBDeviceFilter, IHostUSBDeviceFilter)
-
-    DECLARE_NOT_AGGREGATABLE(HostUSBDeviceFilter)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(HostUSBDeviceFilter)
-        COM_INTERFACE_ENTRY(IUSBDeviceFilter)
-        VBOX_DEFAULT_INTERFACE_ENTRIES(IHostUSBDeviceFilter)
-    END_COM_MAP()
 
     DECLARE_EMPTY_CTOR_DTOR (HostUSBDeviceFilter)
@@ -193,46 +169,47 @@
     void uninit();
 
-    // IUSBDeviceFilter properties
-    STDMETHOD(COMGETTER(Name)) (BSTR *aName);
-    STDMETHOD(COMSETTER(Name)) (IN_BSTR aName);
-    STDMETHOD(COMGETTER(Active)) (BOOL *aActive);
-    STDMETHOD(COMSETTER(Active)) (BOOL aActive);
-    STDMETHOD(COMGETTER(VendorId)) (BSTR *aVendorId);
-    STDMETHOD(COMSETTER(VendorId)) (IN_BSTR aVendorId);
-    STDMETHOD(COMGETTER(ProductId)) (BSTR *aProductId);
-    STDMETHOD(COMSETTER(ProductId)) (IN_BSTR aProductId);
-    STDMETHOD(COMGETTER(Revision)) (BSTR *aRevision);
-    STDMETHOD(COMSETTER(Revision)) (IN_BSTR aRevision);
-    STDMETHOD(COMGETTER(Manufacturer)) (BSTR *aManufacturer);
-    STDMETHOD(COMSETTER(Manufacturer)) (IN_BSTR aManufacturer);
-    STDMETHOD(COMGETTER(Product)) (BSTR *aProduct);
-    STDMETHOD(COMSETTER(Product)) (IN_BSTR aProduct);
-    STDMETHOD(COMGETTER(SerialNumber)) (BSTR *aSerialNumber);
-    STDMETHOD(COMSETTER(SerialNumber)) (IN_BSTR aSerialNumber);
-    STDMETHOD(COMGETTER(Port)) (BSTR *aPort);
-    STDMETHOD(COMSETTER(Port)) (IN_BSTR aPort);
-    STDMETHOD(COMGETTER(Remote)) (BSTR *aRemote);
-    STDMETHOD(COMSETTER(Remote)) (IN_BSTR aRemote);
-    STDMETHOD(COMGETTER(MaskedInterfaces)) (ULONG *aMaskedIfs);
-    STDMETHOD(COMSETTER(MaskedInterfaces)) (ULONG aMaskedIfs);
-
-    // IHostUSBDeviceFilter properties
-    STDMETHOD(COMGETTER(Action)) (USBDeviceFilterAction_T *aAction);
-    STDMETHOD(COMSETTER(Action)) (USBDeviceFilterAction_T aAction);
-
     // public methods for internal purposes only
     // (ensure there is a caller and a read lock before calling them!)
-    void saveSettings(settings::USBDeviceFilter &data);
-
-    void*& getId() { return mData.data()->mId; }
-
-    const Data& getData() { return *mData.data(); }
+    void i_saveSettings(settings::USBDeviceFilter &data);
+
+    void*& i_getId() { return mData.data()->mId; }
+
+    const Data& i_getData() { return *mData.data(); }
 
     // util::Lockable interface
-    RWLockHandle *lockHandle() const;
+    RWLockHandle *i_lockHandle() const;
 
 private:
-    HRESULT usbFilterFieldGetter(USBFILTERIDX aIdx, BSTR *aStr);
-    HRESULT usbFilterFieldSetter(USBFILTERIDX aIdx, Bstr aStr);
+
+    // wrapped IHostUSBDeviceFilter properties
+    HRESULT getName(com::Utf8Str &aName);
+    HRESULT setName(const com::Utf8Str &aName);
+    HRESULT getActive(BOOL *aActive);
+    HRESULT setActive(BOOL aActive);
+    HRESULT getVendorId(com::Utf8Str &aVendorId);
+    HRESULT setVendorId(const com::Utf8Str &aVendorId);
+    HRESULT getProductId(com::Utf8Str &aProductId);
+    HRESULT setProductId(const com::Utf8Str &aProductId);
+    HRESULT getRevision(com::Utf8Str &aRevision);
+    HRESULT setRevision(const com::Utf8Str &aRevision);
+    HRESULT getManufacturer(com::Utf8Str &aManufacturer);
+    HRESULT setManufacturer(const com::Utf8Str &aManufacturer);
+    HRESULT getProduct(com::Utf8Str &aProduct);
+    HRESULT setProduct(const com::Utf8Str &aProduct);
+    HRESULT getSerialNumber(com::Utf8Str &aSerialNumber);
+    HRESULT setSerialNumber(const com::Utf8Str &aSerialNumber);
+    HRESULT getPort(com::Utf8Str &aPort);
+    HRESULT setPort(const com::Utf8Str &aPort);
+    HRESULT getRemote(com::Utf8Str &aRemote);
+    HRESULT setRemote(const com::Utf8Str &aRemote);
+    HRESULT getMaskedInterfaces(ULONG *aMaskedInterfaces);
+    HRESULT setMaskedInterfaces(ULONG aMaskedInterfaces);
+
+    // wrapped IHostUSBDeviceFilter properties
+    HRESULT getAction(USBDeviceFilterAction_T *aAction);
+    HRESULT setAction(USBDeviceFilterAction_T aAction);
+
+    HRESULT i_usbFilterFieldGetter(USBFILTERIDX aIdx, com::Utf8Str &aStr);
+    HRESULT i_usbFilterFieldSetter(USBFILTERIDX aIdx, const com::Utf8Str &aStr);
 
     Host * const        mParent;
Index: /trunk/src/VBox/Main/include/USBDeviceFiltersImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/USBDeviceFiltersImpl.h	(revision 49950)
+++ /trunk/src/VBox/Main/include/USBDeviceFiltersImpl.h	(revision 49951)
@@ -21,5 +21,5 @@
 #define ____H_USBDEVICEFILTERSIMPL
 
-#include "VirtualBoxBase.h"
+#include "USBDeviceFiltersWrap.h"
 
 class HostUSBDevice;
@@ -32,17 +32,7 @@
 
 class ATL_NO_VTABLE USBDeviceFilters :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(IUSBDeviceFilters)
+    public USBDeviceFiltersWrap
 {
 public:
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(USBDeviceFilters, IUSBDeviceFilters)
-
-    DECLARE_NOT_AGGREGATABLE(USBDeviceFilters)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(USBDeviceFilters)
-        VBOX_DEFAULT_INTERFACE_ENTRIES(IUSBDeviceFilters)
-    END_COM_MAP()
 
     DECLARE_EMPTY_CTOR_DTOR(USBDeviceFilters)
@@ -57,39 +47,36 @@
     void uninit();
 
-    // IUSBDeviceFilters attributes
-    STDMETHOD(COMGETTER(DeviceFilters))(ComSafeArrayOut(IUSBDeviceFilter *, aDevicesFilters));
+    // public methods only for internal purposes
+    HRESULT i_loadSettings(const settings::USB &data);
+    HRESULT i_saveSettings(settings::USB &data);
 
-    // IUSBDeviceFilters methods
-    STDMETHOD(CreateDeviceFilter)(IN_BSTR aName, IUSBDeviceFilter **aFilter);
-    STDMETHOD(InsertDeviceFilter)(ULONG aPosition, IUSBDeviceFilter *aFilter);
-    STDMETHOD(RemoveDeviceFilter)(ULONG aPosition, IUSBDeviceFilter **aFilter);
-
-    // public methods only for internal purposes
-
-    HRESULT loadSettings(const settings::USB &data);
-    HRESULT saveSettings(settings::USB &data);
-
-    void rollback();
-    void commit();
-    void copyFrom(USBDeviceFilters *aThat);
+    void i_rollback();
+    void i_commit();
+    void i_copyFrom(USBDeviceFilters *aThat);
 
 #ifdef VBOX_WITH_USB
-    HRESULT onDeviceFilterChange(USBDeviceFilter *aFilter,
-                                 BOOL aActiveChanged = FALSE);
-
-    bool hasMatchingFilter(const ComObjPtr<HostUSBDevice> &aDevice, ULONG *aMaskedIfs);
-    bool hasMatchingFilter(IUSBDevice *aUSBDevice, ULONG *aMaskedIfs);
-
-    HRESULT notifyProxy(bool aInsertFilters);
+    HRESULT i_onDeviceFilterChange(USBDeviceFilter *aFilter,
+                                   BOOL aActiveChanged = FALSE);
+    bool i_hasMatchingFilter(const ComObjPtr<HostUSBDevice> &aDevice, ULONG *aMaskedIfs);
+    bool i_hasMatchingFilter(IUSBDevice *aUSBDevice, ULONG *aMaskedIfs);
+    HRESULT i_notifyProxy(bool aInsertFilters);
 #endif /* VBOX_WITH_USB */
 
     // public methods for internal purposes only
     // (ensure there is a caller and a read lock before calling them!)
-    Machine* getMachine();
+    Machine* i_getMachine();
 
 private:
 
-    void printList();
+    // Wrapped IUSBDeviceFilters attributes
+    HRESULT getDeviceFilters(std::vector<ComPtr<IUSBDeviceFilter> > &aDeviceFilters);
 
+    // wrapped IUSBDeviceFilters methods
+    HRESULT createDeviceFilter(const com::Utf8Str &aName,
+                               ComPtr<IUSBDeviceFilter> &aFilter);
+    HRESULT insertDeviceFilter(ULONG aPosition,
+                               const ComPtr<IUSBDeviceFilter> &aFilter);
+    HRESULT removeDeviceFilter(ULONG aPosition,
+                               ComPtr<IUSBDeviceFilter> &aFilter);
     struct Data;
     Data *m;
Index: /trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImpl.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/ApplianceImpl.cpp	(revision 49951)
@@ -616,5 +616,5 @@
     SystemProperties *pSysProps = mVirtualBox->getSystemProperties();
     {
-        ComObjPtr<MediumFormat> trgFormat = pSysProps->mediumFormatFromExtension("iso");
+        ComObjPtr<MediumFormat> trgFormat = pSysProps->i_mediumFormatFromExtension("iso");
         if (trgFormat.isNull())
             return setError(E_FAIL, tr("Can't find appropriate medium format for ISO type of a virtual disk."));
@@ -630,5 +630,5 @@
 
     {
-        ComObjPtr<MediumFormat> trgFormat = pSysProps->mediumFormatFromExtension("vmdk");
+        ComObjPtr<MediumFormat> trgFormat = pSysProps->i_mediumFormatFromExtension("vmdk");
         if (trgFormat.isNull())
             return setError(E_FAIL, tr("Can't find appropriate medium format for VMDK type of a virtual disk."));
@@ -647,5 +647,5 @@
 
     {
-        ComObjPtr<MediumFormat> trgFormat = pSysProps->mediumFormatFromExtension("vhd");
+        ComObjPtr<MediumFormat> trgFormat = pSysProps->i_mediumFormatFromExtension("vhd");
         if (trgFormat.isNull())
             return setError(E_FAIL, tr("Can't find appropriate medium format for VHD type of a virtual disk."));
@@ -747,9 +747,9 @@
             if (pszExt)
                 pszExt++;
-            mf = pSysProps->mediumFormatFromExtension(pszExt);
+            mf = pSysProps->i_mediumFormatFromExtension(pszExt);
         }
     }
     else
-        mf = pSysProps->mediumFormat(strSrcFormat);
+        mf = pSysProps->i_mediumFormat(strSrcFormat);
 
     if (mf.isNull())
Index: /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp	(revision 49951)
@@ -2059,7 +2059,7 @@
             AutoReadLock propsLock(pSysProps COMMA_LOCKVAL_SRC_POS);
             // We are always exporting to VMDK stream optimized for now
-            formatTemp = pSysProps->mediumFormatFromExtension("iso");
-
-            format = pSysProps->mediumFormat("VMDK");
+            formatTemp = pSysProps->i_mediumFormatFromExtension("iso");
+
+            format = pSysProps->i_mediumFormat("VMDK");
             if (format.isNull())
                 throw setError(VBOX_E_NOT_SUPPORTED,
Index: /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp	(revision 49951)
@@ -2358,5 +2358,5 @@
                 const char *pszSuff = RTPathSuffix(strTargetPath->c_str());
                 /* Figure out which format the user like to have. Default is VMDK. */
-                ComObjPtr<MediumFormat> trgFormat = pSysProps->mediumFormatFromExtension(&pszSuff[1]);
+                ComObjPtr<MediumFormat> trgFormat = pSysProps->i_mediumFormatFromExtension(&pszSuff[1]);
                 if (trgFormat.isNull())
                     throw setError(VBOX_E_NOT_SUPPORTED,
Index: /trunk/src/VBox/Main/src-server/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 49951)
@@ -1409,8 +1409,8 @@
     /* notify the proxy (only when the filter is active) */
     if (    m->pUSBProxyService->isActive()
-         && pFilter->getData().mActive)
-    {
-        ComAssertRet(pFilter->getId() == NULL, E_FAIL);
-        pFilter->getId() = m->pUSBProxyService->insertFilter(&pFilter->getData().mUSBFilter);
+         && pFilter->i_getData().mActive)
+    {
+        ComAssertRet(pFilter->i_getId() == NULL, E_FAIL);
+        pFilter->i_getId() = m->pUSBProxyService->insertFilter(&pFilter->i_getData().mUSBFilter);
     }
 
@@ -1463,9 +1463,9 @@
 
     /* notify the proxy (only when the filter is active) */
-    if (m->pUSBProxyService->isActive() && filter->getData().mActive)
-    {
-        ComAssertRet(filter->getId() != NULL, E_FAIL);
-        m->pUSBProxyService->removeFilter(filter->getId());
-        filter->getId() = NULL;
+    if (m->pUSBProxyService->isActive() && filter->i_getData().mActive)
+    {
+        ComAssertRet(filter->i_getId() != NULL, E_FAIL);
+        m->pUSBProxyService->removeFilter(filter->i_getId());
+        filter->i_getId() = NULL;
     }
 
@@ -1742,8 +1742,8 @@
 
         /* notify the proxy (only when the filter is active) */
-        if (pFilter->getData().mActive)
+        if (pFilter->i_getData().mActive)
         {
             HostUSBDeviceFilter *flt = pFilter; /* resolve ambiguity */
-            flt->getId() = m->pUSBProxyService->insertFilter(&pFilter->getData().mUSBFilter);
+            flt->i_getId() = m->pUSBProxyService->insertFilter(&pFilter->i_getData().mUSBFilter);
         }
     }
@@ -1771,5 +1771,5 @@
         ComObjPtr<HostUSBDeviceFilter> pFilter = *it;
         settings::USBDeviceFilter f;
-        pFilter->saveSettings(f);
+        pFilter->i_saveSettings(f);
         data.llUSBDeviceFilters.push_back(f);
     }
@@ -2220,24 +2220,24 @@
         {
             // insert/remove the filter from the proxy
-            if (aFilter->getData().mActive)
+            if (aFilter->i_getData().mActive)
             {
-                ComAssertRet(aFilter->getId() == NULL, E_FAIL);
-                aFilter->getId() = m->pUSBProxyService->insertFilter(&aFilter->getData().mUSBFilter);
+                ComAssertRet(aFilter->i_getId() == NULL, E_FAIL);
+                aFilter->i_getId() = m->pUSBProxyService->insertFilter(&aFilter->i_getData().mUSBFilter);
             }
             else
             {
-                ComAssertRet(aFilter->getId() != NULL, E_FAIL);
-                m->pUSBProxyService->removeFilter(aFilter->getId());
-                aFilter->getId() = NULL;
+                ComAssertRet(aFilter->i_getId() != NULL, E_FAIL);
+                m->pUSBProxyService->removeFilter(aFilter->i_getId());
+                aFilter->i_getId() = NULL;
             }
         }
         else
         {
-            if (aFilter->getData().mActive)
+            if (aFilter->i_getData().mActive)
             {
                 // update the filter in the proxy
-                ComAssertRet(aFilter->getId() != NULL, E_FAIL);
-                m->pUSBProxyService->removeFilter(aFilter->getId());
-                aFilter->getId() = m->pUSBProxyService->insertFilter(&aFilter->getData().mUSBFilter);
+                ComAssertRet(aFilter->i_getId() != NULL, E_FAIL);
+                m->pUSBProxyService->removeFilter(aFilter->i_getId());
+                aFilter->i_getId() = m->pUSBProxyService->insertFilter(&aFilter->i_getData().mUSBFilter);
             }
         }
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 49951)
@@ -344,5 +344,5 @@
             /* Apply network adapters defaults */
             for (ULONG slot = 0; slot < mNetworkAdapters.size(); ++slot)
-                mNetworkAdapters[slot]->applyDefaults(aOsType);
+                mNetworkAdapters[slot]->i_applyDefaults(aOsType);
 
             /* Apply serial port defaults */
@@ -9376,5 +9376,5 @@
 
         /* USB device filters */
-        rc = mUSBDeviceFilters->loadSettings(data.usbSettings);
+        rc = mUSBDeviceFilters->i_loadSettings(data.usbSettings);
         if (FAILED(rc)) return rc;
 
@@ -9401,5 +9401,5 @@
             /* slot unicity is guaranteed by XML Schema */
             AssertBreak(nic.ulSlot < mNetworkAdapters.size());
-            rc = mNetworkAdapters[nic.ulSlot]->loadSettings(mBandwidthControl, nic);
+            rc = mNetworkAdapters[nic.ulSlot]->i_loadSettings(mBandwidthControl, nic);
             if (FAILED(rc)) return rc;
         }
@@ -10678,5 +10678,5 @@
 
         /* USB device filters (required) */
-        rc = mUSBDeviceFilters->saveSettings(data.usbSettings);
+        rc = mUSBDeviceFilters->i_saveSettings(data.usbSettings);
         if (FAILED(rc)) throw rc;
 
@@ -10694,5 +10694,5 @@
             if (mNetworkAdapters[slot])
             {
-                rc = mNetworkAdapters[slot]->saveSettings(nic);
+                rc = mNetworkAdapters[slot]->i_saveSettings(nic);
                 if (FAILED(rc)) throw rc;
 
@@ -12120,5 +12120,5 @@
 
     if (mUSBDeviceFilters && (mData->flModifications & IsModified_USB))
-        mUSBDeviceFilters->rollback();
+        mUSBDeviceFilters->i_rollback();
 
     if (mBandwidthControl && (mData->flModifications & IsModified_BandwidthControl))
@@ -12134,7 +12134,7 @@
         for (ULONG slot = 0; slot < mNetworkAdapters.size(); slot++)
             if (    mNetworkAdapters[slot]
-                 && mNetworkAdapters[slot]->isModified())
+                 && mNetworkAdapters[slot]->i_isModified())
             {
-                mNetworkAdapters[slot]->rollback();
+                mNetworkAdapters[slot]->i_rollback();
                 networkAdapters[slot] = mNetworkAdapters[slot];
             }
@@ -12225,5 +12225,5 @@
     mVRDEServer->i_commit();
     mAudioAdapter->i_commit();
-    mUSBDeviceFilters->commit();
+    mUSBDeviceFilters->i_commit();
     mBandwidthControl->i_commit();
 
@@ -12238,5 +12238,5 @@
         /* commit everything, even the ones which will go away */
         for (size_t slot = 0; slot < mNetworkAdapters.size(); slot++)
-            mNetworkAdapters[slot]->commit();
+            mNetworkAdapters[slot]->i_commit();
         /* copy over the new entries, creating a peer and uninit the original */
         mPeer->mNetworkAdapters.resize(RT_MAX(newSize, mPeer->mNetworkAdapters.size()));
@@ -12244,5 +12244,5 @@
         {
             /* look if this adapter has a peer device */
-            ComObjPtr<NetworkAdapter> peer = mNetworkAdapters[slot]->getPeer();
+            ComObjPtr<NetworkAdapter> peer = mNetworkAdapters[slot]->i_getPeer();
             if (!peer)
             {
@@ -12276,5 +12276,5 @@
     {
         for (size_t slot = 0; slot < mNetworkAdapters.size(); slot++)
-            mNetworkAdapters[slot]->commit();
+            mNetworkAdapters[slot]->i_commit();
     }
 
@@ -12474,5 +12474,5 @@
     mVRDEServer->i_copyFrom(aThat->mVRDEServer);
     mAudioAdapter->i_copyFrom(aThat->mAudioAdapter);
-    mUSBDeviceFilters->copyFrom(aThat->mUSBDeviceFilters);
+    mUSBDeviceFilters->i_copyFrom(aThat->mUSBDeviceFilters);
     mBandwidthControl->i_copyFrom(aThat->mBandwidthControl);
 
@@ -12505,5 +12505,5 @@
     mNetworkAdapters.resize(aThat->mNetworkAdapters.size());
     for (ULONG slot = 0; slot < mNetworkAdapters.size(); slot++)
-        mNetworkAdapters[slot]->copyFrom(aThat->mNetworkAdapters[slot]);
+        mNetworkAdapters[slot]->i_copyFrom(aThat->mNetworkAdapters[slot]);
     for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); slot++)
         mSerialPorts[slot]->i_copyFrom(aThat->mSerialPorts[slot]);
@@ -12974,5 +12974,5 @@
          * This is identical to SessionMachine::DetachAllUSBDevices except
          * for the aAbnormal argument. */
-        HRESULT rc = mUSBDeviceFilters->notifyProxy(false /* aInsertFilters */);
+        HRESULT rc = mUSBDeviceFilters->i_notifyProxy(false /* aInsertFilters */);
         AssertComRC(rc);
         NOREF(rc);
@@ -13422,5 +13422,5 @@
 
 #ifdef VBOX_WITH_USB
-    *aMatched = mUSBDeviceFilters->hasMatchingFilter(aUSBDevice, aMaskedIfs);
+    *aMatched = mUSBDeviceFilters->i_hasMatchingFilter(aUSBDevice, aMaskedIfs);
 #else
     NOREF(aUSBDevice);
@@ -13494,5 +13494,5 @@
 
 #ifdef VBOX_WITH_USB
-    HRESULT rc = mUSBDeviceFilters->notifyProxy(true /* aInsertFilters */);
+    HRESULT rc = mUSBDeviceFilters->i_notifyProxy(true /* aInsertFilters */);
     AssertComRC(rc);
     NOREF(rc);
@@ -13524,5 +13524,5 @@
 
 #ifdef VBOX_WITH_USB
-    HRESULT rc = mUSBDeviceFilters->notifyProxy(false /* aInsertFilters */);
+    HRESULT rc = mUSBDeviceFilters->i_notifyProxy(false /* aInsertFilters */);
     AssertComRC(rc);
     NOREF(rc);
@@ -14510,5 +14510,5 @@
          *        elsewhere... */
             alock.release();
-            return mUSBDeviceFilters->hasMatchingFilter(aDevice, aMaskedIfs);
+            return mUSBDeviceFilters->i_hasMatchingFilter(aDevice, aMaskedIfs);
         default: break;
     }
Index: /trunk/src/VBox/Main/src-server/MediumImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/MediumImpl.cpp	(revision 49951)
@@ -6160,5 +6160,5 @@
         AutoReadLock propsLock(pSysProps COMMA_LOCKVAL_SRC_POS);
 
-        unconst(m->formatObj) = pSysProps->mediumFormat(aFormat);
+        unconst(m->formatObj) = pSysProps->i_mediumFormat(aFormat);
         if (m->formatObj.isNull())
             return setError(E_INVALIDARG,
Index: /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp	(revision 49951)
@@ -48,5 +48,4 @@
 HRESULT NetworkAdapter::FinalConstruct()
 {
-
     return BaseFinalConstruct();
 }
@@ -96,5 +95,5 @@
      * changing some other property (i.e. after mData.backup()) and after the
      * subsequent mData.rollback(). */
-    generateMACAddress();
+    i_generateMACAddress();
 
     /* Confirm a successful initialization */
@@ -213,14 +212,8 @@
 }
 
-// INetworkAdapter properties
+// wrapped INetworkAdapter properties
 ////////////////////////////////////////////////////////////////////////////////
-
-STDMETHODIMP NetworkAdapter::COMGETTER(AdapterType)(NetworkAdapterType_T *aAdapterType)
-{
-    CheckComArgOutPointerValid(aAdapterType);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::getAdapterType(NetworkAdapterType_T *aAdapterType)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -230,9 +223,6 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMSETTER(AdapterType)(NetworkAdapterType_T aAdapterType)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::setAdapterType(NetworkAdapterType_T aAdapterType)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -282,11 +272,7 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(Slot)(ULONG *aSlot)
-{
-    CheckComArgOutPointerValid(aSlot);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT NetworkAdapter::getSlot(ULONG *aSlot)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -296,11 +282,6 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(Enabled)(BOOL *aEnabled)
-{
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::getEnabled(BOOL *aEnabled)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -310,9 +291,6 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMSETTER(Enabled)(BOOL aEnabled)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::setEnabled(BOOL aEnabled)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -342,21 +320,16 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(MACAddress)(BSTR *aMACAddress)
-{
-    CheckComArgOutPointerValid(aMACAddress);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::getMACAddress(com::Utf8Str &aMACAddress)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     ComAssertRet(!mData->mMACAddress.isEmpty(), E_FAIL);
 
-    mData->mMACAddress.cloneTo(aMACAddress);
-
-    return S_OK;
-}
-
-HRESULT NetworkAdapter::updateMacAddress(Utf8Str aMACAddress)
+    aMACAddress = mData->mMACAddress;
+
+    return S_OK;
+}
+
+HRESULT NetworkAdapter::i_updateMacAddress(Utf8Str aMACAddress)
 {
     HRESULT rc = S_OK;
@@ -366,5 +339,5 @@
      */
     if (aMACAddress.isEmpty())
-        generateMACAddress();
+        i_generateMACAddress();
     else
     {
@@ -409,18 +382,14 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMSETTER(MACAddress)(IN_BSTR aMACAddress)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::setMACAddress(const com::Utf8Str &aMACAddress)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
     if (FAILED(adep.rc())) return adep.rc();
 
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     mData.backup();
 
-    HRESULT rc = updateMacAddress(aMACAddress);
+    HRESULT rc = i_updateMacAddress(aMACAddress);
     if (SUCCEEDED(rc))
     {
@@ -428,4 +397,5 @@
         // leave the lock before informing callbacks
         alock.release();
+
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
@@ -441,11 +411,6 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(AttachmentType)(NetworkAttachmentType_T *aAttachmentType)
-{
-    CheckComArgOutPointerValid(aAttachmentType);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::getAttachmentType(NetworkAttachmentType_T *aAttachmentType)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -455,9 +420,6 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMSETTER(AttachmentType)(NetworkAttachmentType_T aAttachmentType)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::setAttachmentType(NetworkAttachmentType_T aAttachmentType)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -496,8 +458,8 @@
 
         if (oldAttachmentType == NetworkAttachmentType_NATNetwork)
-            checkAndSwitchFromNatNetworking(mData->mNATNetwork.raw());
+            i_checkAndSwitchFromNatNetworking(mData->mNATNetwork);
 
         if (aAttachmentType == NetworkAttachmentType_NATNetwork)
-            switchToNatNetworking(mData->mNATNetwork.raw());
+            i_switchToNatNetworking(mData->mNATNetwork);
 
         /* Adapt the CFGM logic and notify the guest => changeAdapter=TRUE. */
@@ -508,27 +470,15 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(BridgedInterface)(BSTR *aBridgedInterface)
-{
-    CheckComArgOutPointerValid(aBridgedInterface);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    mData->mBridgedInterface.cloneTo(aBridgedInterface);
-
-    return S_OK;
-}
-
-STDMETHODIMP NetworkAdapter::COMSETTER(BridgedInterface)(IN_BSTR aBridgedInterface)
-{
-    Bstr bstrEmpty("");
-    if (!aBridgedInterface)
-        aBridgedInterface = bstrEmpty.raw();
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::getBridgedInterface(com::Utf8Str &aBridgedInterface)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aBridgedInterface = mData->mBridgedInterface;
+
+    return S_OK;
+}
+
+HRESULT NetworkAdapter::setBridgedInterface(const com::Utf8Str &aBridgedInterface)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -541,5 +491,5 @@
         /* if an empty/null string is to be set, bridged interface must be
          * turned off */
-        if (   (aBridgedInterface == NULL || *aBridgedInterface == '\0')
+        if (aBridgedInterface.isEmpty()
             && mData->mAttachmentType == NetworkAttachmentType_Bridged)
         {
@@ -568,27 +518,15 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(HostOnlyInterface)(BSTR *aHostOnlyInterface)
-{
-    CheckComArgOutPointerValid(aHostOnlyInterface);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    mData->mHostOnlyInterface.cloneTo(aHostOnlyInterface);
-
-    return S_OK;
-}
-
-STDMETHODIMP NetworkAdapter::COMSETTER(HostOnlyInterface)(IN_BSTR aHostOnlyInterface)
-{
-    Bstr bstrEmpty("");
-    if (!aHostOnlyInterface)
-        aHostOnlyInterface = bstrEmpty.raw();
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::getHostOnlyInterface(com::Utf8Str &aHostOnlyInterface)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aHostOnlyInterface = mData->mHostOnlyInterface;
+
+    return S_OK;
+}
+
+HRESULT NetworkAdapter::setHostOnlyInterface(const com::Utf8Str &aHostOnlyInterface)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -601,6 +539,6 @@
         /* if an empty/null string is to be set, host only interface must be
          * turned off */
-        if (   (aHostOnlyInterface == NULL || *aHostOnlyInterface == '\0')
-            && mData->mAttachmentType == NetworkAttachmentType_HostOnly)
+        if ( aHostOnlyInterface.isEmpty()
+             && mData->mAttachmentType == NetworkAttachmentType_HostOnly)
         {
             return setError(E_FAIL,
@@ -612,4 +550,5 @@
 
         m_fModified = true;
+
         // leave the lock before informing callbacks
         alock.release();
@@ -628,23 +567,16 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(InternalNetwork)(BSTR *aInternalNetwork)
-{
-    CheckComArgOutPointerValid(aInternalNetwork);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    mData->mInternalNetwork.cloneTo(aInternalNetwork);
-
-    return S_OK;
-}
-
-STDMETHODIMP NetworkAdapter::COMSETTER(InternalNetwork)(IN_BSTR aInternalNetwork)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT NetworkAdapter::getInternalNetwork(com::Utf8Str &aInternalNetwork)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aInternalNetwork = mData->mInternalNetwork;
+
+    return S_OK;
+}
+
+HRESULT NetworkAdapter::setInternalNetwork(const com::Utf8Str &aInternalNetwork)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -657,11 +589,9 @@
         /* if an empty/null string is to be set, internal networking must be
          * turned off */
-        if (   (aInternalNetwork == NULL || *aInternalNetwork == '\0')
-            && mData->mAttachmentType == NetworkAttachmentType_Internal)
+        if (aInternalNetwork.isEmpty() && mData->mAttachmentType == NetworkAttachmentType_Internal)
         {
             return setError(E_FAIL,
                             tr("Empty or null internal network name is not valid"));
         }
-
         mData.backup();
         mData->mInternalNetwork = aInternalNetwork;
@@ -684,26 +614,17 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(NATNetwork)(BSTR *aNATNetwork)
-{
-    CheckComArgOutPointerValid(aNATNetwork);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    mData->mNATNetwork.cloneTo(aNATNetwork);
-
-    return S_OK;
-}
-
-STDMETHODIMP NetworkAdapter::COMSETTER(NATNetwork)(IN_BSTR aNATNetwork)
-{
-    Bstr bstrEmpty("");
-    if (!aNATNetwork)
-        aNATNetwork = bstrEmpty.raw();
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT NetworkAdapter::getNATNetwork(com::Utf8Str &aNATNetwork)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aNATNetwork = mData->mNATNetwork;
+
+    return S_OK;
+}
+
+
+HRESULT NetworkAdapter::setNATNetwork(const com::Utf8Str &aNATNetwork)
+{
+
 
     /* the machine needs to be mutable */
@@ -715,13 +636,10 @@
     if (mData->mNATNetwork != aNATNetwork)
     {
-
         /* if an empty/null string is to be set, host only interface must be
          * turned off */
-        if (   (aNATNetwork == NULL || *aNATNetwork == '\0')
+        if (aNATNetwork.isEmpty()
             && mData->mAttachmentType == NetworkAttachmentType_NATNetwork)
-        {
             return setError(E_FAIL,
                             tr("Empty or null NAT network name is not valid"));
-        }
 
         mData.backup();
@@ -737,9 +655,7 @@
         mParent->setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
-
-        checkAndSwitchFromNatNetworking(oldNatNetworkName.raw());
-
-        switchToNatNetworking(aNATNetwork);
-
+        i_checkAndSwitchFromNatNetworking(oldNatNetworkName.raw());
+
+        i_switchToNatNetworking(aNATNetwork);
         /* When changing the host adapter, adapt the CFGM logic to make this
          * change immediately effect and to notify the guest that the network
@@ -751,27 +667,15 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(GenericDriver)(BSTR *aGenericDriver)
-{
-    CheckComArgOutPointerValid(aGenericDriver);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    mData->mGenericDriver.cloneTo(aGenericDriver);
-
-    return S_OK;
-}
-
-STDMETHODIMP NetworkAdapter::COMSETTER(GenericDriver)(IN_BSTR aGenericDriver)
-{
-    Bstr bstrEmpty("");
-    if (!aGenericDriver)
-        aGenericDriver = bstrEmpty.raw();
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::getGenericDriver(com::Utf8Str &aGenericDriver)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aGenericDriver = mData->mGenericDriver;
+
+    return S_OK;
+}
+
+HRESULT NetworkAdapter::setGenericDriver(const com::Utf8Str &aGenericDriver)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -794,11 +698,7 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(CableConnected)(BOOL *aConnected)
-{
-    CheckComArgOutPointerValid(aConnected);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT NetworkAdapter::getCableConnected(BOOL *aConnected)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -808,9 +708,7 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMSETTER(CableConnected)(BOOL aConnected)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT NetworkAdapter::setCableConnected(BOOL aConnected)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -839,11 +737,7 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(LineSpeed)(ULONG *aSpeed)
-{
-    CheckComArgOutPointerValid(aSpeed);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT NetworkAdapter::getLineSpeed(ULONG *aSpeed)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -853,9 +747,6 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMSETTER(LineSpeed)(ULONG aSpeed)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::setLineSpeed(ULONG aSpeed)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -884,20 +775,14 @@
 }
 
-
-STDMETHODIMP NetworkAdapter::COMGETTER(PromiscModePolicy)(NetworkAdapterPromiscModePolicy_T *aPromiscModePolicy)
-{
-    CheckComArgOutPointerValid(aPromiscModePolicy);
-
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        *aPromiscModePolicy = mData->mPromiscModePolicy;
-    }
-    return hrc;
-}
-
-STDMETHODIMP NetworkAdapter::COMSETTER(PromiscModePolicy)(NetworkAdapterPromiscModePolicy_T aPromiscModePolicy)
+HRESULT NetworkAdapter::getPromiscModePolicy(NetworkAdapterPromiscModePolicy_T *aPromiscModePolicy)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    *aPromiscModePolicy = mData->mPromiscModePolicy;
+
+    return S_OK;
+}
+
+HRESULT NetworkAdapter::setPromiscModePolicy(NetworkAdapterPromiscModePolicy_T aPromiscModePolicy)
 {
     switch (aPromiscModePolicy)
@@ -932,22 +817,17 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(TraceEnabled)(BOOL *aEnabled)
-{
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+HRESULT NetworkAdapter::getTraceEnabled(BOOL *aEnabled)
+{
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     *aEnabled = mData->mTraceEnabled;
-    return S_OK;
-}
-
-STDMETHODIMP NetworkAdapter::COMSETTER(TraceEnabled)(BOOL aEnabled)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+    return S_OK;
+}
+
+HRESULT NetworkAdapter::setTraceEnabled(BOOL aEnabled)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -976,23 +856,16 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(TraceFile)(BSTR *aTraceFile)
-{
-    CheckComArgOutPointerValid(aTraceFile);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    mData->mTraceFile.cloneTo(aTraceFile);
-
-    return S_OK;
-}
-
-STDMETHODIMP NetworkAdapter::COMSETTER(TraceFile)(IN_BSTR aTraceFile)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::getTraceFile(com::Utf8Str &aTraceFile)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aTraceFile = mData->mTraceFile;
+
+    return S_OK;
+}
+
+
+HRESULT NetworkAdapter::setTraceFile(const com::Utf8Str &aTraceFile)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -1021,25 +894,15 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(NATEngine)(INATEngine **aNATEngine)
-{
-    CheckComArgOutPointerValid(aNATEngine);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    mNATEngine.queryInterfaceTo(aNATEngine);
-
-    return S_OK;
-}
-
-STDMETHODIMP NetworkAdapter::COMGETTER(BootPriority)(ULONG *aBootPriority)
-{
-    CheckComArgOutPointerValid(aBootPriority);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::getNATEngine(ComPtr<INATEngine> &aNATEngine)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aNATEngine  = mNATEngine;
+
+    return S_OK;
+}
+
+HRESULT NetworkAdapter::getBootPriority(ULONG *aBootPriority)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1049,9 +912,6 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMSETTER(BootPriority)(ULONG aBootPriority)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::setBootPriority(ULONG aBootPriority)
+{
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -1080,64 +940,40 @@
 }
 
-// INetworkAdapter methods
+// wrapped INetworkAdapter methods
 ////////////////////////////////////////////////////////////////////////////////
 
-STDMETHODIMP NetworkAdapter::GetProperty(IN_BSTR aKey, BSTR *aValue)
-{
-    CheckComArgOutPointerValid(aValue);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    Bstr key = aKey;
-    Bstr value;
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    Utf8Str strKey(key);
-    settings::StringsMap::const_iterator it = mData->mGenericProperties.find(strKey);
+HRESULT NetworkAdapter::getProperty(const com::Utf8Str &aKey, com::Utf8Str &aValue)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+    aValue = "";
+    settings::StringsMap::const_iterator it = mData->mGenericProperties.find(aKey);
     if (it != mData->mGenericProperties.end())
-    {
-        value = it->second; // source is a Utf8Str
-        value.cloneTo(aValue);
-    }
-
-    return S_OK;
-}
-
-STDMETHODIMP NetworkAdapter::SetProperty(IN_BSTR aKey, IN_BSTR aValue)
+        aValue = it->second; // source is a Utf8Str
+
+    return S_OK;
+}
+
+HRESULT NetworkAdapter::setProperty(const com::Utf8Str &aKey, const com::Utf8Str &aValue)
 {
     LogFlowThisFunc(("\n"));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     /* The machine needs to be mutable. */
     AutoMutableStateDependency adep(mParent);
     if (FAILED(adep.rc())) return adep.rc();
-
-    Bstr key = aKey;
-
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     bool fGenericChange = (mData->mAttachmentType == NetworkAttachmentType_Generic);
-
     /* Generic properties processing.
      * Look up the old value first; if nothing's changed then do nothing.
      */
-    Utf8Str strValue(aValue);
-    Utf8Str strKey(aKey);
     Utf8Str strOldValue;
-
-    settings::StringsMap::const_iterator it = mData->mGenericProperties.find(strKey);
+    settings::StringsMap::const_iterator it = mData->mGenericProperties.find(aKey);
     if (it != mData->mGenericProperties.end())
         strOldValue = it->second;
 
-    if (strOldValue != strValue)
-    {
-        if (strValue.isEmpty())
-            mData->mGenericProperties.erase(strKey);
+    if (strOldValue != aValue)
+    {
+        if (aValue.isEmpty())
+            mData->mGenericProperties.erase(aKey);
         else
-            mData->mGenericProperties[strKey] = strValue;
+            mData->mGenericProperties[aKey] = aValue;
 
         /* leave the lock before informing callbacks */
@@ -1158,34 +994,24 @@
 }
 
-STDMETHODIMP NetworkAdapter::GetProperties(IN_BSTR aNames,
-                                           ComSafeArrayOut(BSTR, aReturnNames),
-                                           ComSafeArrayOut(BSTR, aReturnValues))
-{
-    CheckComArgOutSafeArrayPointerValid(aReturnNames);
-    CheckComArgOutSafeArrayPointerValid(aReturnValues);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT NetworkAdapter::getProperties(const com::Utf8Str &aNames,
+                                      std::vector<com::Utf8Str>  &aReturnNames,
+                                      std::vector<com::Utf8Str>  &aReturnValues)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     /// @todo make use of aNames according to the documentation
     NOREF(aNames);
-
-    com::SafeArray<BSTR> names(mData->mGenericProperties.size());
-    com::SafeArray<BSTR> values(mData->mGenericProperties.size());
+    aReturnNames.resize(mData->mGenericProperties.size());
+    aReturnValues.resize(mData->mGenericProperties.size());
+
     size_t i = 0;
 
     for (settings::StringsMap::const_iterator it = mData->mGenericProperties.begin();
          it != mData->mGenericProperties.end();
-         ++it)
-    {
-        it->first.cloneTo(&names[i]);
-        it->second.cloneTo(&values[i]);
-        ++i;
-    }
-
-    names.detachTo(ComSafeArrayOutArg(aReturnNames));
-    values.detachTo(ComSafeArrayOutArg(aReturnValues));
+         ++it, ++i)
+    {
+        aReturnNames[i] = it->first;
+        aReturnValues[i] = it->second;
+    }
 
     return S_OK;
@@ -1205,6 +1031,6 @@
  *  @note Locks this object for writing.
  */
-HRESULT NetworkAdapter::loadSettings(BandwidthControl *bwctl,
-                                     const settings::NetworkAdapter &data)
+HRESULT NetworkAdapter::i_loadSettings(BandwidthControl *bwctl,
+                                       const settings::NetworkAdapter &data)
 {
     AutoCaller autoCaller(this);
@@ -1229,5 +1055,5 @@
     mData->mEnabled = data.fEnabled;
     /* MAC address (can be null) */
-    rc = updateMacAddress(data.strMACAddress);
+    rc = i_updateMacAddress(data.strMACAddress);
     if (FAILED(rc)) return rc;
     /* cable (required) */
@@ -1280,5 +1106,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT NetworkAdapter::saveSettings(settings::NetworkAdapter &data)
+HRESULT NetworkAdapter::i_saveSettings(settings::NetworkAdapter &data)
 {
     AutoCaller autoCaller(this);
@@ -1330,6 +1156,8 @@
  * @return
  */
-bool NetworkAdapter::isModified() {
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+bool NetworkAdapter::i_isModified() {
+
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
     bool fChanged = m_fModified;
     fChanged |= (mData->mAdapterType == NetworkAttachmentType_NAT? mNATEngine->i_isModified() : false);
@@ -1340,5 +1168,5 @@
  *  @note Locks this object for writing.
  */
-void NetworkAdapter::rollback()
+void NetworkAdapter::i_rollback()
 {
     /* sanity */
@@ -1355,5 +1183,5 @@
  *  for writing) if there is one.
  */
-void NetworkAdapter::commit()
+void NetworkAdapter::i_commit()
 {
     /* sanity */
@@ -1384,5 +1212,5 @@
  *  represented by @a aThat (locked for reading).
  */
-void NetworkAdapter::copyFrom(NetworkAdapter *aThat)
+void NetworkAdapter::i_copyFrom(NetworkAdapter *aThat)
 {
     AssertReturnVoid(aThat != NULL);
@@ -1405,5 +1233,5 @@
 }
 
-void NetworkAdapter::applyDefaults(GuestOSType *aOsType)
+void NetworkAdapter::i_applyDefaults(GuestOSType *aOsType)
 {
     AssertReturnVoid(aOsType != NULL);
@@ -1440,5 +1268,5 @@
 }
 
-ComObjPtr<NetworkAdapter> NetworkAdapter::getPeer()
+ComObjPtr<NetworkAdapter> NetworkAdapter::i_getPeer()
 {
     return mPeer;
@@ -1456,5 +1284,5 @@
  *  span.
  */
-void NetworkAdapter::generateMACAddress()
+void NetworkAdapter::i_generateMACAddress()
 {
     Utf8Str mac;
@@ -1464,13 +1292,9 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMGETTER(BandwidthGroup)(IBandwidthGroup **aBwGroup)
+HRESULT NetworkAdapter::getBandwidthGroup(ComPtr<IBandwidthGroup> &aBandwidthGroup)
 {
     LogFlowThisFuncEnter();
-    CheckComArgOutPointerValid(aBwGroup);
 
     HRESULT hrc = S_OK;
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -1482,7 +1306,6 @@
 
         Assert(SUCCEEDED(hrc)); /* This is not allowed to fail because the existence of the group was checked when it was attached. */
-
         if (SUCCEEDED(hrc))
-            pBwGroup.queryInterfaceTo(aBwGroup);
+            pBwGroup.queryInterfaceTo(aBandwidthGroup.asOutParam());
     }
 
@@ -1491,11 +1314,8 @@
 }
 
-STDMETHODIMP NetworkAdapter::COMSETTER(BandwidthGroup)(IBandwidthGroup *aBwGroup)
+HRESULT NetworkAdapter::setBandwidthGroup(const ComPtr<IBandwidthGroup> &aBandwidthGroup)
 {
     LogFlowThisFuncEnter();
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(mParent);
@@ -1504,7 +1324,9 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
+    IBandwidthGroup *iBw = aBandwidthGroup;
     Utf8Str strBwGroup;
-    if (aBwGroup)
-        strBwGroup = static_cast<BandwidthGroup*>(aBwGroup)->i_getName();
+    if (aBandwidthGroup)
+        strBwGroup = static_cast<BandwidthGroup *>(iBw)->i_getName();
+
     if (mData->mBandwidthGroup != strBwGroup)
     {
@@ -1517,5 +1339,5 @@
         }
 
-        updateBandwidthGroup(pBwGroup);
+        i_updateBandwidthGroup(pBwGroup);
 
         m_fModified = true;
@@ -1535,5 +1357,5 @@
 }
 
-void NetworkAdapter::updateBandwidthGroup(BandwidthGroup *aBwGroup)
+void NetworkAdapter::i_updateBandwidthGroup(BandwidthGroup *aBwGroup)
 {
     LogFlowThisFuncEnter();
@@ -1565,18 +1387,20 @@
 
 
-HRESULT NetworkAdapter::checkAndSwitchFromNatNetworking(IN_BSTR networkName)
-{
+HRESULT NetworkAdapter::i_checkAndSwitchFromNatNetworking(com::Utf8Str networkName)
+{
+    HRESULT hrc;
     MachineState_T state;
 
-    HRESULT hrc = mParent->COMGETTER(State)(&state);
+    hrc = mParent->COMGETTER(State)(&state);
     if (FAILED(hrc))
         return hrc;
 
-    if (state == MachineState_Running)
+    if (   mData->mAttachmentType == NetworkAttachmentType_NATNetwork
+        && state == MachineState_Running)
     {
         Bstr bstrName;
         hrc = mParent->COMGETTER(Name)(bstrName.asOutParam());
-        LogRel(("VM '%ls' stops using NAT network '%ls'\n", bstrName.raw(), networkName));
-        int natCount = mParent->getVirtualBox()->natNetworkRefDec(networkName);
+        LogRel(("VM '%ls' stops using NAT network '%ls'\n", bstrName.raw(), Bstr(networkName).raw()));
+        int natCount = mParent->getVirtualBox()->natNetworkRefDec(Bstr(networkName).raw());
         if (natCount == -1)
             return E_INVALIDARG; /* no such network */
@@ -1587,9 +1411,10 @@
 
 
-HRESULT NetworkAdapter::switchToNatNetworking(IN_BSTR aNatNetworkName)
-{
+HRESULT NetworkAdapter::i_switchToNatNetworking(const com::Utf8Str &aNatNetworkName)
+{
+    HRESULT hrc;
     MachineState_T state;
 
-    HRESULT hrc = mParent->COMGETTER(State)(&state);
+    hrc = mParent->COMGETTER(State)(&state);
     if (FAILED(hrc))
         return hrc;
@@ -1599,6 +1424,6 @@
         Bstr bstrName;
         hrc = mParent->COMGETTER(Name)(bstrName.asOutParam());
-        LogRel(("VM '%ls' starts using NAT network '%ls'\n", bstrName.raw(), aNatNetworkName));
-        int natCount = mParent->getVirtualBox()->natNetworkRefInc(aNatNetworkName);
+        LogRel(("VM '%ls' starts using NAT network '%ls'\n", bstrName.raw(), Bstr(aNatNetworkName).raw()));
+        int natCount = mParent->getVirtualBox()->natNetworkRefInc(Bstr(aNatNetworkName).raw());
         if (natCount == -1)
             return E_INVALIDARG; /* not found */
Index: /trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp	(revision 49951)
@@ -90,10 +90,10 @@
     unconst(mParent) = aParent;
 
-    setDefaultMachineFolder(Utf8Str::Empty);
-    setLoggingLevel(Utf8Str::Empty);
-    setDefaultHardDiskFormat(Utf8Str::Empty);
-
-    setVRDEAuthLibrary(Utf8Str::Empty);
-    setDefaultVRDEExtPack(Utf8Str::Empty);
+    i_setDefaultMachineFolder(Utf8Str::Empty);
+    i_setLoggingLevel(Utf8Str::Empty);
+    i_setDefaultHardDiskFormat(Utf8Str::Empty);
+
+    i_setVRDEAuthLibrary(Utf8Str::Empty);
+    i_setDefaultVRDEExtPack(Utf8Str::Empty);
 
     m->ulLogHistoryCount = 3;
@@ -160,15 +160,10 @@
 }
 
-// ISystemProperties properties
+// wrapped ISystemProperties properties
 /////////////////////////////////////////////////////////////////////////////
 
-
-STDMETHODIMP SystemProperties::COMGETTER(MinGuestRAM)(ULONG *minRAM)
-{
-    CheckComArgOutPointerValid(minRAM);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMinGuestRAM(ULONG *minRAM)
+
+{
     /* no need to lock, this is const */
     AssertCompile(MM_RAM_MIN_IN_MB >= SchemaDefs::MinGuestRAM);
@@ -178,11 +173,6 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(MaxGuestRAM)(ULONG *maxRAM)
-{
-    CheckComArgOutPointerValid(maxRAM);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMaxGuestRAM(ULONG *maxRAM)
+{
     /* no need to lock, this is const */
     AssertCompile(MM_RAM_MAX_IN_MB <= SchemaDefs::MaxGuestRAM);
@@ -194,11 +184,6 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(MinGuestVRAM)(ULONG *minVRAM)
-{
-    CheckComArgOutPointerValid(minVRAM);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMinGuestVRAM(ULONG *minVRAM)
+{
     /* no need to lock, this is const */
     *minVRAM = SchemaDefs::MinGuestVRAM;
@@ -207,11 +192,6 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(MaxGuestVRAM)(ULONG *maxVRAM)
-{
-    CheckComArgOutPointerValid(maxVRAM);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMaxGuestVRAM(ULONG *maxVRAM)
+{
     /* no need to lock, this is const */
     *maxVRAM = SchemaDefs::MaxGuestVRAM;
@@ -220,11 +200,6 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(MinGuestCPUCount)(ULONG *minCPUCount)
-{
-    CheckComArgOutPointerValid(minCPUCount);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMinGuestCPUCount(ULONG *minCPUCount)
+{
     /* no need to lock, this is const */
     *minCPUCount = SchemaDefs::MinCPUCount; // VMM_MIN_CPU_COUNT
@@ -233,11 +208,6 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(MaxGuestCPUCount)(ULONG *maxCPUCount)
-{
-    CheckComArgOutPointerValid(maxCPUCount);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMaxGuestCPUCount(ULONG *maxCPUCount)
+{
     /* no need to lock, this is const */
     *maxCPUCount = SchemaDefs::MaxCPUCount; // VMM_MAX_CPU_COUNT
@@ -246,10 +216,6 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(MaxGuestMonitors)(ULONG *maxMonitors)
-{
-    CheckComArgOutPointerValid(maxMonitors);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT SystemProperties::getMaxGuestMonitors(ULONG *maxMonitors)
+{
 
     /* no need to lock, this is const */
@@ -259,11 +225,7 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(InfoVDSize)(LONG64 *infoVDSize)
-{
-    CheckComArgOutPointerValid(infoVDSize);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT SystemProperties::getInfoVDSize(LONG64 *infoVDSize)
+{
     /*
      * The BIOS supports currently 32 bit LBA numbers (implementing the full
@@ -287,11 +249,7 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(SerialPortCount)(ULONG *count)
-{
-    CheckComArgOutPointerValid(count);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT SystemProperties::getSerialPortCount(ULONG *count)
+{
     /* no need to lock, this is const */
     *count = SchemaDefs::SerialPortCount;
@@ -300,11 +258,7 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(ParallelPortCount)(ULONG *count)
-{
-    CheckComArgOutPointerValid(count);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT SystemProperties::getParallelPortCount(ULONG *count)
+{
     /* no need to lock, this is const */
     *count = SchemaDefs::ParallelPortCount;
@@ -313,11 +267,7 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(MaxBootPosition)(ULONG *aMaxBootPosition)
-{
-    CheckComArgOutPointerValid(aMaxBootPosition);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT SystemProperties::getMaxBootPosition(ULONG *aMaxBootPosition)
+{
     /* no need to lock, this is const */
     *aMaxBootPosition = SchemaDefs::MaxBootPosition;
@@ -327,11 +277,6 @@
 
 
-STDMETHODIMP SystemProperties::COMGETTER(ExclusiveHwVirt)(BOOL *aExclusiveHwVirt)
-{
-    CheckComArgOutPointerValid(aExclusiveHwVirt);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getExclusiveHwVirt(BOOL *aExclusiveHwVirt)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -341,9 +286,6 @@
 }
 
-STDMETHODIMP SystemProperties::COMSETTER(ExclusiveHwVirt)(BOOL aExclusiveHwVirt)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::setExclusiveHwVirt(BOOL aExclusiveHwVirt)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     m->fExclusiveHwVirt = !!aExclusiveHwVirt;
@@ -357,28 +299,16 @@
 }
 
-STDMETHODIMP SystemProperties::GetMaxNetworkAdapters(ChipsetType_T aChipset, ULONG *count)
-{
-    CheckComArgOutPointerValid(count);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMaxNetworkAdapters(ChipsetType_T aChipset, ULONG *aMaxNetworkAdapters)
+{
     /* no need for locking, no state */
     uint32_t uResult = Global::getMaxNetworkAdapters(aChipset);
     if (uResult == 0)
         AssertMsgFailed(("Invalid chipset type %d\n", aChipset));
-
-    *count = uResult;
-
-    return S_OK;
-}
-
-STDMETHODIMP SystemProperties::GetMaxNetworkAdaptersOfType(ChipsetType_T aChipset, NetworkAttachmentType_T aType, ULONG *count)
-{
-    CheckComArgOutPointerValid(count);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aMaxNetworkAdapters = uResult;
+    return S_OK;
+}
+
+HRESULT SystemProperties::getMaxNetworkAdaptersOfType(ChipsetType_T aChipset, NetworkAttachmentType_T aType, ULONG *count)
+{
     /* no need for locking, no state */
     uint32_t uResult = Global::getMaxNetworkAdapters(aChipset);
@@ -409,12 +339,7 @@
 
 
-STDMETHODIMP SystemProperties::GetMaxDevicesPerPortForStorageBus(StorageBus_T aBus,
-                                                                 ULONG *aMaxDevicesPerPort)
-{
-    CheckComArgOutPointerValid(aMaxDevicesPerPort);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMaxDevicesPerPortForStorageBus(StorageBus_T aBus,
+                                                            ULONG *aMaxDevicesPerPort)
+{
     /* no need to lock, this is const */
     switch (aBus)
@@ -444,12 +369,7 @@
 }
 
-STDMETHODIMP SystemProperties::GetMinPortCountForStorageBus(StorageBus_T aBus,
-                                                            ULONG *aMinPortCount)
-{
-    CheckComArgOutPointerValid(aMinPortCount);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMinPortCountForStorageBus(StorageBus_T aBus,
+                                                       ULONG *aMinPortCount)
+{
     /* no need to lock, this is const */
     switch (aBus)
@@ -488,12 +408,7 @@
 }
 
-STDMETHODIMP SystemProperties::GetMaxPortCountForStorageBus(StorageBus_T aBus,
-                                                            ULONG *aMaxPortCount)
-{
-    CheckComArgOutPointerValid(aMaxPortCount);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMaxPortCountForStorageBus(StorageBus_T aBus,
+                                                       ULONG *aMaxPortCount)
+{
     /* no need to lock, this is const */
     switch (aBus)
@@ -536,13 +451,8 @@
 }
 
-STDMETHODIMP SystemProperties::GetMaxInstancesOfStorageBus(ChipsetType_T aChipset,
-                                                           StorageBus_T  aBus,
-                                                           ULONG *aMaxInstances)
-{
-    CheckComArgOutPointerValid(aMaxInstances);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMaxInstancesOfStorageBus(ChipsetType_T aChipset,
+                                                      StorageBus_T  aBus,
+                                                      ULONG *aMaxInstances)
+{
     ULONG cCtrs = 0;
 
@@ -571,11 +481,8 @@
 }
 
-STDMETHODIMP SystemProperties::GetDeviceTypesForStorageBus(StorageBus_T aBus,
-                                                           ComSafeArrayOut(DeviceType_T, aDeviceTypes))
-{
-    CheckComArgOutSafeArrayPointerValid(aDeviceTypes);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT SystemProperties::getDeviceTypesForStorageBus(StorageBus_T aBus,
+                                                      std::vector<DeviceType_T> &aDeviceTypes)
+{
+    aDeviceTypes.resize(0);
 
     /* no need to lock, this is const */
@@ -588,15 +495,13 @@
         case StorageBus_USB:
         {
-            com::SafeArray<DeviceType_T> saDeviceTypes(2);
-            saDeviceTypes[0] = DeviceType_DVD;
-            saDeviceTypes[1] = DeviceType_HardDisk;
-            saDeviceTypes.detachTo(ComSafeArrayOutArg(aDeviceTypes));
+            aDeviceTypes.resize(2);
+            aDeviceTypes[0] = DeviceType_DVD;
+            aDeviceTypes[1] = DeviceType_HardDisk;
             break;
         }
         case StorageBus_Floppy:
         {
-            com::SafeArray<DeviceType_T> saDeviceTypes(1);
-            saDeviceTypes[0] = DeviceType_Floppy;
-            saDeviceTypes.detachTo(ComSafeArrayOutArg(aDeviceTypes));
+            aDeviceTypes.resize(1);
+            aDeviceTypes[0] = DeviceType_Floppy;
             break;
         }
@@ -608,11 +513,7 @@
 }
 
-STDMETHODIMP SystemProperties::GetDefaultIoCacheSettingForStorageController(StorageControllerType_T aControllerType, BOOL *aEnabled)
-{
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getDefaultIoCacheSettingForStorageController(StorageControllerType_T aControllerType,
+                                                                       BOOL *aEnabled)
+{
     /* no need to lock, this is const */
     switch (aControllerType)
@@ -637,14 +538,9 @@
 }
 
-STDMETHODIMP SystemProperties::GetMaxInstancesOfUSBControllerType(ChipsetType_T aChipset,
-                                                                  USBControllerType_T aType,
-                                                                  ULONG *aMaxInstances)
+HRESULT SystemProperties::getMaxInstancesOfUSBControllerType(ChipsetType_T aChipset,
+                                                             USBControllerType_T aType,
+                                                             ULONG *aMaxInstances)
 {
     NOREF(aChipset);
-    CheckComArgOutPointerValid(aMaxInstances);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     ULONG cCtrs = 0;
 
@@ -667,27 +563,16 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(DefaultMachineFolder)(BSTR *aDefaultMachineFolder)
-{
-    CheckComArgOutPointerValid(aDefaultMachineFolder);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    m->strDefaultMachineFolder.cloneTo(aDefaultMachineFolder);
-
-    return S_OK;
-}
-
-STDMETHODIMP SystemProperties::COMSETTER(DefaultMachineFolder)(IN_BSTR aDefaultMachineFolder)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getDefaultMachineFolder(com::Utf8Str &aDefaultMachineFolder)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+    aDefaultMachineFolder = m->strDefaultMachineFolder;
+    return S_OK;
+}
+
+HRESULT SystemProperties::setDefaultMachineFolder(const com::Utf8Str &aDefaultMachineFolder)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = setDefaultMachineFolder(aDefaultMachineFolder);
+    HRESULT rc = i_setDefaultMachineFolder(aDefaultMachineFolder);
     alock.release();
-
     if (SUCCEEDED(rc))
     {
@@ -700,29 +585,21 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(LoggingLevel)(BSTR *aLoggingLevel)
-{
-    CheckComArgOutPointerValid(aLoggingLevel);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    Utf8Str useLoggingLevel(m->strLoggingLevel);
-    if (useLoggingLevel.isEmpty())
-        useLoggingLevel = VBOXSVC_LOG_DEFAULT;
-
-    useLoggingLevel.cloneTo(aLoggingLevel);
-    return S_OK;
-}
-
-
-STDMETHODIMP SystemProperties::COMSETTER(LoggingLevel)(IN_BSTR aLoggingLevel)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getLoggingLevel(com::Utf8Str &aLoggingLevel)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aLoggingLevel = m->strLoggingLevel;
+
+    if (aLoggingLevel.isEmpty())
+        aLoggingLevel = VBOXSVC_LOG_DEFAULT;
+
+    return S_OK;
+}
+
+
+HRESULT SystemProperties::setLoggingLevel(const com::Utf8Str &aLoggingLevel)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = setLoggingLevel(aLoggingLevel);
+    HRESULT rc = i_setLoggingLevel(aLoggingLevel);
     alock.release();
 
@@ -733,47 +610,32 @@
     }
     else
-        LogRel(("Cannot set passed logging level=%ls, or the default one - Error=%Rhrc \n", aLoggingLevel, rc));
+        LogRel(("Cannot set passed logging level=%ls, or the default one - Error=%Rhrc \n", Bstr(aLoggingLevel).raw(), rc));
 
     return rc;
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(MediumFormats)(ComSafeArrayOut(IMediumFormat *, aMediumFormats))
-{
-    CheckComArgOutSafeArrayPointerValid(aMediumFormats);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    SafeIfaceArray<IMediumFormat> mediumFormats(m_llMediumFormats);
-    mediumFormats.detachTo(ComSafeArrayOutArg(aMediumFormats));
-
-    return S_OK;
-}
-
-STDMETHODIMP SystemProperties::COMGETTER(DefaultHardDiskFormat)(BSTR *aDefaultHardDiskFormat)
-{
-    CheckComArgOutPointerValid(aDefaultHardDiskFormat);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    m->strDefaultHardDiskFormat.cloneTo(aDefaultHardDiskFormat);
-
-    return S_OK;
-}
-
-STDMETHODIMP SystemProperties::COMSETTER(DefaultHardDiskFormat)(IN_BSTR aDefaultHardDiskFormat)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getMediumFormats(std::vector<ComPtr<IMediumFormat> > &aMediumFormats)
+{
+    MediumFormatList mediumFormats(m_llMediumFormats);
+    aMediumFormats.resize(mediumFormats.size());
+    size_t i = 0;
+    for (MediumFormatList::const_iterator it = mediumFormats.begin(); it != mediumFormats.end(); ++it, ++i)
+        (*it).queryInterfaceTo(aMediumFormats[i].asOutParam());
+    return S_OK;
+}
+
+HRESULT SystemProperties::getDefaultHardDiskFormat(com::Utf8Str &aDefaultHardDiskFormat)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+    aDefaultHardDiskFormat = m->strDefaultHardDiskFormat;
+    return S_OK;
+}
+
+
+HRESULT SystemProperties::setDefaultHardDiskFormat(const com::Utf8Str &aDefaultHardDiskFormat)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = setDefaultHardDiskFormat(aDefaultHardDiskFormat);
+    HRESULT rc = i_setDefaultHardDiskFormat(aDefaultHardDiskFormat);
     alock.release();
-
     if (SUCCEEDED(rc))
     {
@@ -786,75 +648,62 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(FreeDiskSpaceWarning)(LONG64 *aFreeSpace)
-{
-    CheckComArgOutPointerValid(aFreeSpace);
-
+HRESULT SystemProperties::getFreeDiskSpaceWarning(LONG64 *aFreeSpace)
+{
+    NOREF(aFreeSpace);
     ReturnComNotImplemented();
 }
 
-STDMETHODIMP SystemProperties::COMSETTER(FreeDiskSpaceWarning)(LONG64 /* aFreeSpace */)
+HRESULT SystemProperties::setFreeDiskSpaceWarning(LONG64 /* aFreeSpace */)
 {
     ReturnComNotImplemented();
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(FreeDiskSpacePercentWarning)(ULONG *aFreeSpacePercent)
-{
-    CheckComArgOutPointerValid(aFreeSpacePercent);
-
+HRESULT SystemProperties::getFreeDiskSpacePercentWarning(ULONG *aFreeSpacePercent)
+{
+    NOREF(aFreeSpacePercent);
     ReturnComNotImplemented();
 }
 
-STDMETHODIMP SystemProperties::COMSETTER(FreeDiskSpacePercentWarning)(ULONG /* aFreeSpacePercent */)
+HRESULT SystemProperties::setFreeDiskSpacePercentWarning(ULONG /* aFreeSpacePercent */)
 {
     ReturnComNotImplemented();
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(FreeDiskSpaceError)(LONG64 *aFreeSpace)
-{
-    CheckComArgOutPointerValid(aFreeSpace);
-
+HRESULT SystemProperties::getFreeDiskSpaceError(LONG64 *aFreeSpace)
+{
+    NOREF(aFreeSpace);
     ReturnComNotImplemented();
 }
 
-STDMETHODIMP SystemProperties::COMSETTER(FreeDiskSpaceError)(LONG64 /* aFreeSpace */)
+HRESULT SystemProperties::setFreeDiskSpaceError(LONG64 /* aFreeSpace */)
 {
     ReturnComNotImplemented();
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(FreeDiskSpacePercentError)(ULONG *aFreeSpacePercent)
-{
-    CheckComArgOutPointerValid(aFreeSpacePercent);
-
+HRESULT SystemProperties::getFreeDiskSpacePercentError(ULONG *aFreeSpacePercent)
+{
+    NOREF(aFreeSpacePercent);
     ReturnComNotImplemented();
 }
 
-STDMETHODIMP SystemProperties::COMSETTER(FreeDiskSpacePercentError)(ULONG /* aFreeSpacePercent */)
+HRESULT SystemProperties::setFreeDiskSpacePercentError(ULONG /* aFreeSpacePercent */)
 {
     ReturnComNotImplemented();
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(VRDEAuthLibrary)(BSTR *aVRDEAuthLibrary)
-{
-    CheckComArgOutPointerValid(aVRDEAuthLibrary);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    m->strVRDEAuthLibrary.cloneTo(aVRDEAuthLibrary);
-
-    return S_OK;
-}
-
-STDMETHODIMP SystemProperties::COMSETTER(VRDEAuthLibrary)(IN_BSTR aVRDEAuthLibrary)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getVRDEAuthLibrary(com::Utf8Str &aVRDEAuthLibrary)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aVRDEAuthLibrary = m->strVRDEAuthLibrary;
+
+    return S_OK;
+}
+
+HRESULT SystemProperties::setVRDEAuthLibrary(const com::Utf8Str &aVRDEAuthLibrary)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = setVRDEAuthLibrary(aVRDEAuthLibrary);
+    HRESULT rc = i_setVRDEAuthLibrary(aVRDEAuthLibrary);
     alock.release();
-
     if (SUCCEEDED(rc))
     {
@@ -867,25 +716,17 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(WebServiceAuthLibrary)(BSTR *aWebServiceAuthLibrary)
-{
-    CheckComArgOutPointerValid(aWebServiceAuthLibrary);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    m->strWebServiceAuthLibrary.cloneTo(aWebServiceAuthLibrary);
-
-    return S_OK;
-}
-
-STDMETHODIMP SystemProperties::COMSETTER(WebServiceAuthLibrary)(IN_BSTR aWebServiceAuthLibrary)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getWebServiceAuthLibrary(com::Utf8Str &aWebServiceAuthLibrary)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aWebServiceAuthLibrary = m->strWebServiceAuthLibrary;
+
+    return S_OK;
+}
+
+HRESULT SystemProperties::setWebServiceAuthLibrary(const com::Utf8Str &aWebServiceAuthLibrary)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = setWebServiceAuthLibrary(aWebServiceAuthLibrary);
+    HRESULT rc = i_setWebServiceAuthLibrary(aWebServiceAuthLibrary);
     alock.release();
 
@@ -900,88 +741,76 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(DefaultVRDEExtPack)(BSTR *aExtPack)
-{
-    CheckComArgOutPointerValid(aExtPack);
-
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
+HRESULT SystemProperties::getDefaultVRDEExtPack(com::Utf8Str &aExtPack)
+{
+    HRESULT hrc = S_OK;
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+    Utf8Str strExtPack(m->strDefaultVRDEExtPack);
+    if (strExtPack.isNotEmpty())
+    {
+        if (strExtPack.equals(VBOXVRDP_KLUDGE_EXTPACK_NAME))
+            hrc = S_OK;
+        else
+#ifdef VBOX_WITH_EXTPACK
+            hrc = mParent->getExtPackManager()->checkVrdeExtPack(&strExtPack);
+#else
+            hrc = setError(E_FAIL, tr("The extension pack '%s' does not exist"), strExtPack.c_str());
+#endif
+    }
+    else
+    {
+#ifdef VBOX_WITH_EXTPACK
+        hrc = mParent->getExtPackManager()->getDefaultVrdeExtPack(&strExtPack);
+#endif
+        if (strExtPack.isEmpty())
+        {
+            /*
+            * Klugde - check if VBoxVRDP.dll/.so/.dylib is installed.
+            * This is hardcoded uglyness, sorry.
+            */
+            char szPath[RTPATH_MAX];
+            int vrc = RTPathAppPrivateArch(szPath, sizeof(szPath));
+            if (RT_SUCCESS(vrc))
+                vrc = RTPathAppend(szPath, sizeof(szPath), "VBoxVRDP");
+            if (RT_SUCCESS(vrc))
+                vrc = RTStrCat(szPath, sizeof(szPath), RTLdrGetSuff());
+            if (RT_SUCCESS(vrc) && RTFileExists(szPath))
+            {
+                /* Illegal extpack name, so no conflict. */
+                strExtPack = VBOXVRDP_KLUDGE_EXTPACK_NAME;
+            }
+        }
+    }
+
     if (SUCCEEDED(hrc))
-    {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        Utf8Str strExtPack(m->strDefaultVRDEExtPack);
-        if (strExtPack.isNotEmpty())
-        {
-            if (strExtPack.equals(VBOXVRDP_KLUDGE_EXTPACK_NAME))
-                hrc = S_OK;
-            else
+          aExtPack = strExtPack;
+
+    return S_OK;
+}
+
+
+HRESULT SystemProperties::setDefaultVRDEExtPack(const com::Utf8Str &aExtPack)
+{
+    HRESULT hrc = S_OK;
+    if (aExtPack.isNotEmpty())
+    {
+        if (aExtPack.equals(VBOXVRDP_KLUDGE_EXTPACK_NAME))
+            hrc = S_OK;
+        else
 #ifdef VBOX_WITH_EXTPACK
-                hrc = mParent->getExtPackManager()->checkVrdeExtPack(&strExtPack);
+            hrc = mParent->getExtPackManager()->checkVrdeExtPack(&aExtPack);
 #else
-                hrc = setError(E_FAIL, tr("The extension pack '%s' does not exist"), strExtPack.c_str());
+            hrc = setError(E_FAIL, tr("The extension pack '%s' does not exist"), aExtPack.c_str());
 #endif
-        }
-        else
-        {
-#ifdef VBOX_WITH_EXTPACK
-            hrc = mParent->getExtPackManager()->getDefaultVrdeExtPack(&strExtPack);
-#endif
-            if (strExtPack.isEmpty())
-            {
-                /*
-                 * Klugde - check if VBoxVRDP.dll/.so/.dylib is installed.
-                 * This is hardcoded uglyness, sorry.
-                 */
-                char szPath[RTPATH_MAX];
-                int vrc = RTPathAppPrivateArch(szPath, sizeof(szPath));
-                if (RT_SUCCESS(vrc))
-                    vrc = RTPathAppend(szPath, sizeof(szPath), "VBoxVRDP");
-                if (RT_SUCCESS(vrc))
-                    vrc = RTStrCat(szPath, sizeof(szPath), RTLdrGetSuff());
-                if (RT_SUCCESS(vrc) && RTFileExists(szPath))
-                {
-                    /* Illegal extpack name, so no conflict. */
-                    strExtPack = VBOXVRDP_KLUDGE_EXTPACK_NAME;
-                }
-            }
-        }
-
+    }
+    if (SUCCEEDED(hrc))
+    {
+        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+        hrc = i_setDefaultVRDEExtPack(aExtPack);
         if (SUCCEEDED(hrc))
-            strExtPack.cloneTo(aExtPack);
-    }
-
-    return S_OK;
-}
-
-STDMETHODIMP SystemProperties::COMSETTER(DefaultVRDEExtPack)(IN_BSTR aExtPack)
-{
-    CheckComArgNotNull(aExtPack);
-    Utf8Str strExtPack(aExtPack);
-
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        if (strExtPack.isNotEmpty())
-        {
-            if (strExtPack.equals(VBOXVRDP_KLUDGE_EXTPACK_NAME))
-                hrc = S_OK;
-            else
-#ifdef VBOX_WITH_EXTPACK
-                hrc = mParent->getExtPackManager()->checkVrdeExtPack(&strExtPack);
-#else
-                hrc = setError(E_FAIL, tr("The extension pack '%s' does not exist"), strExtPack.c_str());
-#endif
-        }
-        if (SUCCEEDED(hrc))
-        {
-            AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-            hrc = setDefaultVRDEExtPack(aExtPack);
-            if (SUCCEEDED(hrc))
-            {
-                /* VirtualBox::saveSettings() needs the VirtualBox write lock. */
-                alock.release();
-                AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
-                hrc = mParent->saveSettings();
-            }
+        {
+            /* VirtualBox::saveSettings() needs the VirtualBox write lock. */
+            alock.release();
+            AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
+            hrc = mParent->saveSettings();
         }
     }
@@ -990,11 +819,7 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(LogHistoryCount)(ULONG *count)
-{
-    CheckComArgOutPointerValid(count);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT SystemProperties::getLogHistoryCount(ULONG *count)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1004,9 +829,7 @@
 }
 
-STDMETHODIMP SystemProperties::COMSETTER(LogHistoryCount)(ULONG count)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT SystemProperties::setLogHistoryCount(ULONG count)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     m->ulLogHistoryCount = count;
@@ -1020,11 +843,6 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(DefaultAudioDriver)(AudioDriverType_T *aAudioDriver)
-{
-    CheckComArgOutPointerValid(aAudioDriver);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getDefaultAudioDriver(AudioDriverType_T *aAudioDriver)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1034,25 +852,17 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(AutostartDatabasePath)(BSTR *aAutostartDbPath)
-{
-    CheckComArgOutPointerValid(aAutostartDbPath);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    m->strAutostartDatabasePath.cloneTo(aAutostartDbPath);
-
-    return S_OK;
-}
-
-STDMETHODIMP SystemProperties::COMSETTER(AutostartDatabasePath)(IN_BSTR aAutostartDbPath)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getAutostartDatabasePath(com::Utf8Str &aAutostartDbPath)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aAutostartDbPath = m->strAutostartDatabasePath;
+
+    return S_OK;
+}
+
+HRESULT SystemProperties::setAutostartDatabasePath(const com::Utf8Str &aAutostartDbPath)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = setAutostartDatabasePath(aAutostartDbPath);
+    HRESULT rc = i_setAutostartDatabasePath(aAutostartDbPath);
     alock.release();
 
@@ -1067,11 +877,6 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(DefaultAdditionsISO)(BSTR *aDefaultAdditionsISO)
-{
-    CheckComArgOutPointerValid(aDefaultAdditionsISO);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1087,14 +892,11 @@
         alock.acquire();
     }
-    m->strDefaultAdditionsISO.cloneTo(aDefaultAdditionsISO);
-
-    return S_OK;
-}
-
-STDMETHODIMP SystemProperties::COMSETTER(DefaultAdditionsISO)(IN_BSTR aDefaultAdditionsISO)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aDefaultAdditionsISO = m->strDefaultAdditionsISO;
+
+    return S_OK;
+}
+
+HRESULT SystemProperties::setDefaultAdditionsISO(const com::Utf8Str &aDefaultAdditionsISO)
+{
     /** @todo not yet implemented, settings handling is missing */
     ReturnComNotImplemented();
@@ -1114,22 +916,13 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(DefaultFrontend)(BSTR *aDefaultFrontend)
-{
-    CheckComArgOutPointerValid(aDefaultFrontend);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-    m->strDefaultFrontend.cloneTo(aDefaultFrontend);
-
-    return S_OK;
-}
-
-STDMETHODIMP SystemProperties::COMSETTER(DefaultFrontend)(IN_BSTR aDefaultFrontend)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT SystemProperties::getDefaultFrontend(com::Utf8Str &aDefaultFrontend)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+    aDefaultFrontend = m->strDefaultFrontend;
+    return S_OK;
+}
+
+HRESULT SystemProperties::setDefaultFrontend(const com::Utf8Str &aDefaultFrontend)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     if (m->strDefaultFrontend == Utf8Str(aDefaultFrontend))
@@ -1151,5 +944,5 @@
 /////////////////////////////////////////////////////////////////////////////
 
-HRESULT SystemProperties::loadSettings(const settings::SystemProperties &data)
+HRESULT SystemProperties::i_loadSettings(const settings::SystemProperties &data)
 {
     AutoCaller autoCaller(this);
@@ -1157,23 +950,21 @@
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
     HRESULT rc = S_OK;
-
-    rc = setDefaultMachineFolder(data.strDefaultMachineFolder);
+    rc = i_setDefaultMachineFolder(data.strDefaultMachineFolder);
     if (FAILED(rc)) return rc;
 
-    rc = setLoggingLevel(data.strLoggingLevel);
+    rc = i_setLoggingLevel(data.strLoggingLevel);
     if (FAILED(rc)) return rc;
 
-    rc = setDefaultHardDiskFormat(data.strDefaultHardDiskFormat);
+    rc = i_setDefaultHardDiskFormat(data.strDefaultHardDiskFormat);
     if (FAILED(rc)) return rc;
 
-    rc = setVRDEAuthLibrary(data.strVRDEAuthLibrary);
+    rc = i_setVRDEAuthLibrary(data.strVRDEAuthLibrary);
     if (FAILED(rc)) return rc;
 
-    rc = setWebServiceAuthLibrary(data.strWebServiceAuthLibrary);
+    rc = i_setWebServiceAuthLibrary(data.strWebServiceAuthLibrary);
     if (FAILED(rc)) return rc;
 
-    rc = setDefaultVRDEExtPack(data.strDefaultVRDEExtPack);
+    rc = i_setDefaultVRDEExtPack(data.strDefaultVRDEExtPack);
     if (FAILED(rc)) return rc;
 
@@ -1181,5 +972,5 @@
     m->fExclusiveHwVirt  = data.fExclusiveHwVirt;
 
-    rc = setAutostartDatabasePath(data.strAutostartDatabasePath);
+    rc = i_setAutostartDatabasePath(data.strAutostartDatabasePath);
     if (FAILED(rc)) return rc;
 
@@ -1188,8 +979,8 @@
          * file may not exist, and in this case keep the empty string */
         ErrorInfoKeeper eik;
-        (void)setDefaultAdditionsISO(data.strDefaultAdditionsISO);
-    }
-
-    rc = setDefaultFrontend(data.strDefaultFrontend);
+        (void)i_setDefaultAdditionsISO(data.strDefaultAdditionsISO);
+    }
+
+    rc = i_setDefaultFrontend(data.strDefaultFrontend);
     if (FAILED(rc)) return rc;
 
@@ -1197,5 +988,5 @@
 }
 
-HRESULT SystemProperties::saveSettings(settings::SystemProperties &data)
+HRESULT SystemProperties::i_saveSettings(settings::SystemProperties &data)
 {
     AutoCaller autoCaller(this);
@@ -1217,5 +1008,5 @@
  * @return ComObjPtr<MediumFormat>
  */
-ComObjPtr<MediumFormat> SystemProperties::mediumFormat(const Utf8Str &aFormat)
+ComObjPtr<MediumFormat> SystemProperties::i_mediumFormat(const Utf8Str &aFormat)
 {
     ComObjPtr<MediumFormat> format;
@@ -1250,5 +1041,5 @@
  * @return ComObjPtr<MediumFormat>
  */
-ComObjPtr<MediumFormat> SystemProperties::mediumFormatFromExtension(const Utf8Str &aExt)
+ComObjPtr<MediumFormat> SystemProperties::i_mediumFormatFromExtension(const Utf8Str &aExt)
 {
     ComObjPtr<MediumFormat> format;
@@ -1290,5 +1081,5 @@
  * @return
  */
-HRESULT SystemProperties::getUserHomeDirectory(Utf8Str &strPath)
+HRESULT SystemProperties::i_getUserHomeDirectory(Utf8Str &strPath)
 {
     char szHome[RTPATH_MAX];
@@ -1310,5 +1101,5 @@
  * @return
  */
-HRESULT SystemProperties::setDefaultMachineFolder(const Utf8Str &strPath)
+HRESULT SystemProperties::i_setDefaultMachineFolder(const Utf8Str &strPath)
 {
     Utf8Str path(strPath);      // make modifiable
@@ -1320,5 +1111,5 @@
     {
         // new default with VirtualBox 4.0: "$HOME/VirtualBox VMs"
-        HRESULT rc = getUserHomeDirectory(path);
+        HRESULT rc = i_getUserHomeDirectory(path);
         if (FAILED(rc)) return rc;
         path += RTPATH_SLASH_STR "VirtualBox VMs";
@@ -1335,5 +1126,5 @@
 }
 
-HRESULT SystemProperties::setLoggingLevel(const Utf8Str &aLoggingLevel)
+HRESULT SystemProperties::i_setLoggingLevel(const com::Utf8Str &aLoggingLevel)
 {
     Utf8Str useLoggingLevel(aLoggingLevel);
@@ -1360,5 +1151,5 @@
 }
 
-HRESULT SystemProperties::setDefaultHardDiskFormat(const Utf8Str &aFormat)
+HRESULT SystemProperties::i_setDefaultHardDiskFormat(const com::Utf8Str &aFormat)
 {
     if (!aFormat.isEmpty())
@@ -1370,5 +1161,5 @@
 }
 
-HRESULT SystemProperties::setVRDEAuthLibrary(const Utf8Str &aPath)
+HRESULT SystemProperties::i_setVRDEAuthLibrary(const com::Utf8Str &aPath)
 {
     if (!aPath.isEmpty())
@@ -1380,5 +1171,5 @@
 }
 
-HRESULT SystemProperties::setWebServiceAuthLibrary(const Utf8Str &aPath)
+HRESULT SystemProperties::i_setWebServiceAuthLibrary(const com::Utf8Str &aPath)
 {
     if (!aPath.isEmpty())
@@ -1390,5 +1181,5 @@
 }
 
-HRESULT SystemProperties::setDefaultVRDEExtPack(const Utf8Str &aExtPack)
+HRESULT SystemProperties::i_setDefaultVRDEExtPack(const com::Utf8Str &aExtPack)
 {
     m->strDefaultVRDEExtPack = aExtPack;
@@ -1397,5 +1188,5 @@
 }
 
-HRESULT SystemProperties::setAutostartDatabasePath(const Utf8Str &aPath)
+HRESULT SystemProperties::i_setAutostartDatabasePath(const com::Utf8Str &aPath)
 {
     HRESULT rc = S_OK;
@@ -1427,7 +1218,7 @@
 }
 
-HRESULT SystemProperties::setDefaultAdditionsISO(const Utf8Str &aPath)
-{
-    Utf8Str path(aPath);
+HRESULT SystemProperties::i_setDefaultAdditionsISO(const com::Utf8Str &aPath)
+{
+    com::Utf8Str path(aPath);
     if (path.isEmpty())
     {
@@ -1443,5 +1234,5 @@
         vrc = RTPathUserHome(strTemp, sizeof(strTemp));
         AssertRC(vrc);
-        Utf8Str strSrc3 = Utf8StrFmt("%s/VBoxGuestAdditions_%ls.iso", strTemp, VirtualBox::getVersionNormalized().raw());
+        Utf8Str strSrc3 = Utf8StrFmt("%s/VBoxGuestAdditions_%ls.iso", strTemp, Bstr(VirtualBox::getVersionNormalized()).raw());
 
         /* Check the standard image locations */
@@ -1472,5 +1263,5 @@
 }
 
-HRESULT SystemProperties::setDefaultFrontend(const Utf8Str &aDefaultFrontend)
+HRESULT SystemProperties::i_setDefaultFrontend(const com::Utf8Str &aDefaultFrontend)
 {
     m->strDefaultFrontend = aDefaultFrontend;
Index: /trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp	(revision 49951)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2011 Oracle Corporation
+ * Copyright (C) 2006-2013 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -41,5 +41,5 @@
  *  @param  aStr        The output string.
  */
-static void usbFilterFieldToString(PCUSBFILTER aFilter, USBFILTERIDX aIdx, Utf8Str &out)
+static void i_usbFilterFieldToString(PCUSBFILTER aFilter, USBFILTERIDX aIdx, Utf8Str &out)
 {
     const USBFILTERMATCH matchingMethod = USBFilterGetMatchingMethod(aFilter, aIdx);
@@ -62,5 +62,5 @@
 
 /*static*/
-const char* USBDeviceFilter::describeUSBFilterIdx(USBFILTERIDX aIdx)
+const char* USBDeviceFilter::i_describeUSBFilterIdx(USBFILTERIDX aIdx)
 {
     switch (aIdx)
@@ -92,11 +92,10 @@
  *  @remark The idea was to have this as a static function, but tr() doesn't wanna work without a class :-/
  */
-/*static*/ HRESULT USBDeviceFilter::usbFilterFieldFromString(PUSBFILTER aFilter,
-                                                             USBFILTERIDX aIdx,
-                                                             const Utf8Str &aValue,
-                                                             Utf8Str &aErrStr)
+/*static*/ HRESULT USBDeviceFilter::i_usbFilterFieldFromString(PUSBFILTER aFilter,
+                                                               USBFILTERIDX aIdx,
+                                                               const Utf8Str &aValue,
+                                                               Utf8Str &aErrStr)
 {
     int vrc;
-//     Utf8Str str (aStr);
     if (aValue.isEmpty())
         vrc = USBFilterSetIgnore(aFilter, aIdx);
@@ -123,5 +122,5 @@
                     else
                     {
-                        aErrStr = Utf8StrFmt(tr("The %s value '%s' is too big (max 0xFFFF)"), describeUSBFilterIdx(aIdx), pcszValue);
+                        aErrStr = Utf8StrFmt(tr("The %s value '%s' is too big (max 0xFFFF)"), i_describeUSBFilterIdx(aIdx), pcszValue);
                         return E_INVALIDARG;
                     }
@@ -151,14 +150,14 @@
         if (vrc == VERR_INVALID_PARAMETER)
         {
-            aErrStr = Utf8StrFmt(tr("The %s filter expression '%s' is not valid"), describeUSBFilterIdx(aIdx), aValue.c_str());
+            aErrStr = Utf8StrFmt(tr("The %s filter expression '%s' is not valid"), i_describeUSBFilterIdx(aIdx), aValue.c_str());
             return E_INVALIDARG;
         }
         if (vrc == VERR_BUFFER_OVERFLOW)
         {
-            aErrStr = Utf8StrFmt(tr("Insufficient expression space for the '%s' filter expression '%s'"), describeUSBFilterIdx(aIdx), aValue.c_str());
+            aErrStr = Utf8StrFmt(tr("Insufficient expression space for the '%s' filter expression '%s'"), i_describeUSBFilterIdx(aIdx), aValue.c_str());
             return E_FAIL;
         }
         AssertRC(vrc);
-        aErrStr = Utf8StrFmt(tr("Encountered unexpected status %Rrc when setting '%s' to '%s'"), vrc, describeUSBFilterIdx(aIdx), aValue.c_str());
+        aErrStr = Utf8StrFmt(tr("Encountered unexpected status %Rrc when setting '%s' to '%s'"), vrc, i_describeUSBFilterIdx(aIdx), aValue.c_str());
         return E_FAIL;
     }
@@ -237,23 +236,23 @@
     do
     {
-        rc = usbFilterFieldSetter(USBFILTERIDX_VENDOR_ID, data.strVendorId);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_PRODUCT_ID, data.strProductId);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_DEVICE, data.strRevision);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_MANUFACTURER_STR, data.strManufacturer);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_PRODUCT_STR, data.strProduct);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_SERIAL_NUMBER_STR, data.strSerialNumber);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_PORT, data.strPort);
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_VENDOR_ID, data.strVendorId);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_PRODUCT_ID, data.strProductId);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_DEVICE, data.strRevision);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_MANUFACTURER_STR, data.strManufacturer);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_PRODUCT_STR, data.strProduct);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_SERIAL_NUMBER_STR, data.strSerialNumber);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_PORT, data.strPort);
         if (FAILED(rc)) break;
 
@@ -440,27 +439,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 
-STDMETHODIMP USBDeviceFilter::COMGETTER(Name) (BSTR *aName)
-{
-    CheckComArgOutPointerValid(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT USBDeviceFilter::getName(com::Utf8Str &aName)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mData->mName.cloneTo(aName);
-
-    return S_OK;
-}
-
-STDMETHODIMP USBDeviceFilter::COMSETTER(Name) (IN_BSTR aName)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aName = mData->mName;
+
+    return S_OK;
+}
+
+HRESULT USBDeviceFilter::setName(const com::Utf8Str &aName)
+{
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent->getMachine());
+    AutoMutableStateDependency adep(mParent->i_getMachine());
     if (FAILED(adep.rc())) return adep.rc();
 
@@ -470,5 +459,5 @@
     {
         m_fModified = true;
-        ComObjPtr<Machine> pMachine = mParent->getMachine();
+        ComObjPtr<Machine> pMachine = mParent->i_getMachine();
 
         mData.backup();
@@ -482,17 +471,12 @@
         mlock.release();
 
-        return mParent->onDeviceFilterChange(this);
-    }
-
-    return S_OK;
-}
-
-STDMETHODIMP USBDeviceFilter::COMGETTER(Active) (BOOL *aActive)
-{
-    CheckComArgOutPointerValid(aActive);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+        return mParent->i_onDeviceFilterChange(this);
+    }
+
+    return S_OK;
+}
+
+HRESULT USBDeviceFilter::getActive(BOOL *aActive)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -502,11 +486,8 @@
 }
 
-STDMETHODIMP USBDeviceFilter::COMSETTER(Active) (BOOL aActive)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT USBDeviceFilter::setActive(const BOOL aActive)
+{
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent->getMachine());
+    AutoMutableStateDependency adep(mParent->i_getMachine());
     if (FAILED(adep.rc())) return adep.rc();
 
@@ -516,5 +497,5 @@
     {
         m_fModified = true;
-        ComObjPtr<Machine> pMachine = mParent->getMachine();
+        ComObjPtr<Machine> pMachine = mParent->i_getMachine();
 
         mData.backup();
@@ -528,116 +509,109 @@
         mlock.release();
 
-        return mParent->onDeviceFilterChange(this, TRUE /* aActiveChanged */);
-    }
-
-    return S_OK;
-}
-
-STDMETHODIMP USBDeviceFilter::COMGETTER(VendorId) (BSTR *aVendorId)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_VENDOR_ID, aVendorId);
-}
-
-STDMETHODIMP USBDeviceFilter::COMSETTER(VendorId) (IN_BSTR aVendorId)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_VENDOR_ID, aVendorId);
-}
-
-STDMETHODIMP USBDeviceFilter::COMGETTER(ProductId) (BSTR *aProductId)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_PRODUCT_ID, aProductId);
-}
-
-STDMETHODIMP USBDeviceFilter::COMSETTER(ProductId) (IN_BSTR aProductId)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_PRODUCT_ID, aProductId);
- }
-
-STDMETHODIMP USBDeviceFilter::COMGETTER(Revision) (BSTR *aRevision)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_DEVICE, aRevision);
-}
-
-STDMETHODIMP USBDeviceFilter::COMSETTER(Revision) (IN_BSTR aRevision)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_DEVICE, aRevision);
-}
-
-STDMETHODIMP USBDeviceFilter::COMGETTER(Manufacturer) (BSTR *aManufacturer)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_MANUFACTURER_STR, aManufacturer);
-}
-
-STDMETHODIMP USBDeviceFilter::COMSETTER(Manufacturer) (IN_BSTR aManufacturer)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_MANUFACTURER_STR, aManufacturer);
-}
-
-STDMETHODIMP USBDeviceFilter::COMGETTER(Product) (BSTR *aProduct)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_PRODUCT_STR, aProduct);
-}
-
-STDMETHODIMP USBDeviceFilter::COMSETTER(Product) (IN_BSTR aProduct)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_PRODUCT_STR, aProduct);
-}
-
-STDMETHODIMP USBDeviceFilter::COMGETTER(SerialNumber) (BSTR *aSerialNumber)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_SERIAL_NUMBER_STR, aSerialNumber);
-}
-
-STDMETHODIMP USBDeviceFilter::COMSETTER(SerialNumber) (IN_BSTR aSerialNumber)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_SERIAL_NUMBER_STR, aSerialNumber);
-}
-
-STDMETHODIMP USBDeviceFilter::COMGETTER(Port) (BSTR *aPort)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_PORT, aPort);
-}
-
-STDMETHODIMP USBDeviceFilter::COMSETTER(Port) (IN_BSTR aPort)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_PORT, aPort);
-}
-
-STDMETHODIMP USBDeviceFilter::COMGETTER(Remote) (BSTR *aRemote)
-{
-    CheckComArgOutPointerValid(aRemote);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+        return mParent->i_onDeviceFilterChange(this, TRUE /* aActiveChanged */);
+    }
+
+    return S_OK;
+}
+
+HRESULT USBDeviceFilter::getVendorId(com::Utf8Str &aVendorId)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_VENDOR_ID, aVendorId);
+}
+
+HRESULT USBDeviceFilter::setVendorId(const com::Utf8Str &aVendorId)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_VENDOR_ID, Bstr(aVendorId).raw());
+}
+
+HRESULT USBDeviceFilter::getProductId(com::Utf8Str &aProductId)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_PRODUCT_ID, aProductId);
+}
+
+HRESULT USBDeviceFilter::setProductId(const com::Utf8Str &aProductId)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_PRODUCT_ID, aProductId);
+}
+
+HRESULT USBDeviceFilter::getRevision(com::Utf8Str &aRevision)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_DEVICE, aRevision);
+}
+
+HRESULT USBDeviceFilter::setRevision(const com::Utf8Str &aRevision)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_DEVICE, Bstr(aRevision).raw());
+}
+
+HRESULT USBDeviceFilter::getManufacturer(com::Utf8Str &aManufacturer)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_MANUFACTURER_STR, aManufacturer);
+}
+
+HRESULT USBDeviceFilter::setManufacturer(const com::Utf8Str &aManufacturer)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_MANUFACTURER_STR, Bstr(aManufacturer).raw());
+}
+
+HRESULT USBDeviceFilter::getProduct(com::Utf8Str &aProduct)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_PRODUCT_STR, aProduct);
+}
+
+HRESULT USBDeviceFilter::setProduct(const com::Utf8Str &aProduct)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_PRODUCT_STR, Bstr(aProduct).raw());
+}
+
+HRESULT USBDeviceFilter::getSerialNumber(com::Utf8Str &aSerialNumber)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_SERIAL_NUMBER_STR, aSerialNumber);
+}
+
+HRESULT USBDeviceFilter::setSerialNumber(const com::Utf8Str &aSerialNumber)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_SERIAL_NUMBER_STR,  Bstr(aSerialNumber).raw());
+}
+
+HRESULT USBDeviceFilter::getPort(com::Utf8Str &aPort)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_PORT, aPort);
+}
+
+HRESULT USBDeviceFilter::setPort(const com::Utf8Str &aPort)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_PORT, Bstr(aPort).raw());
+}
+
+
+HRESULT USBDeviceFilter::getRemote(com::Utf8Str &aRemote)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mData->mRemote.string().cloneTo(aRemote);
-
-    return S_OK;
-}
-
-STDMETHODIMP USBDeviceFilter::COMSETTER(Remote) (IN_BSTR aRemote)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aRemote = mData->mRemote.string();
+
+    return S_OK;
+}
+
+HRESULT USBDeviceFilter::setRemote(const com::Utf8Str &aRemote)
+{
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent->getMachine());
+    AutoMutableStateDependency adep(mParent->i_getMachine());
     if (FAILED(adep.rc())) return adep.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    if (mData->mRemote.string() != aRemote)
-    {
-        Data::BOOLFilter flt = aRemote;
+    Bstr bRemote = Bstr(aRemote).raw();
+
+    if (mData->mRemote.string() != bRemote)
+    {
+        Data::BOOLFilter flt = bRemote;
         ComAssertRet(!flt.isNull(), E_FAIL);
         if (!flt.isValid())
             return setError(E_INVALIDARG,
                             tr("Remote state filter string '%ls' is not valid (error at position %d)"),
-                            aRemote, flt.errorPosition() + 1);
+                            bRemote.raw(), flt.errorPosition() + 1);
 
         m_fModified = true;
-        ComObjPtr<Machine> pMachine = mParent->getMachine();
+        ComObjPtr<Machine> pMachine = mParent->i_getMachine();
 
         mData.backup();
@@ -651,17 +625,12 @@
         mlock.release();
 
-        return mParent->onDeviceFilterChange(this);
-    }
-
-    return S_OK;
-}
-
-STDMETHODIMP USBDeviceFilter::COMGETTER(MaskedInterfaces) (ULONG *aMaskedIfs)
-{
-    CheckComArgOutPointerValid(aMaskedIfs);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+        return mParent->i_onDeviceFilterChange(this);
+    }
+    return S_OK;
+}
+
+
+HRESULT USBDeviceFilter::getMaskedInterfaces(ULONG *aMaskedIfs)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -671,11 +640,8 @@
 }
 
-STDMETHODIMP USBDeviceFilter::COMSETTER(MaskedInterfaces) (ULONG aMaskedIfs)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT USBDeviceFilter::setMaskedInterfaces(ULONG aMaskedIfs)
+{
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent->getMachine());
+    AutoMutableStateDependency adep(mParent->i_getMachine());
     if (FAILED(adep.rc())) return adep.rc();
 
@@ -685,9 +651,8 @@
     {
         m_fModified = true;
-        ComObjPtr<Machine> pMachine = mParent->getMachine();
+        ComObjPtr<Machine> pMachine = mParent->i_getMachine();
 
         mData.backup();
         mData->mMaskedIfs = aMaskedIfs;
-
         // leave the lock before informing callbacks
         alock.release();
@@ -697,5 +662,5 @@
         mlock.release();
 
-        return mParent->onDeviceFilterChange(this);
+        return mParent->i_onDeviceFilterChange(this);
     }
 
@@ -706,5 +671,5 @@
 ////////////////////////////////////////////////////////////////////////////////
 
-bool USBDeviceFilter::isModified()
+bool USBDeviceFilter::i_isModified()
 {
     AutoCaller autoCaller(this);
@@ -718,5 +683,5 @@
  *  @note Locks this object for writing.
  */
-void USBDeviceFilter::rollback()
+void USBDeviceFilter::i_rollback()
 {
     /* sanity */
@@ -733,5 +698,5 @@
  *  for writing) if there is one.
  */
-void USBDeviceFilter::commit()
+void USBDeviceFilter::i_commit()
 {
     /* sanity */
@@ -799,18 +764,9 @@
  *  @return COM status.
  */
-HRESULT USBDeviceFilter::usbFilterFieldGetter(USBFILTERIDX aIdx, BSTR *aStr)
-{
-    CheckComArgOutPointerValid(aStr);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT USBDeviceFilter::i_usbFilterFieldGetter(USBFILTERIDX aIdx, com::Utf8Str &aStr)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    Utf8Str str;
-    usbFilterFieldToString(&mData->mUSBFilter, aIdx, str);
-
-    str.cloneTo(aStr);
-
+    i_usbFilterFieldToString(&mData->mUSBFilter, aIdx, aStr);
     return S_OK;
 }
@@ -824,27 +780,25 @@
  *  @return COM status.
  */
-HRESULT USBDeviceFilter::usbFilterFieldSetter(USBFILTERIDX aIdx,
-                                              const Utf8Str &strNew)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT USBDeviceFilter::i_usbFilterFieldSetter(USBFILTERIDX aIdx,
+                                                const com::Utf8Str &strNew)
+{
     /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent->getMachine());
+    AutoMutableStateDependency adep(mParent->i_getMachine());
     if (FAILED(adep.rc())) return adep.rc();
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    Utf8Str strOld;
-    usbFilterFieldToString(&mData->mUSBFilter, aIdx, strOld);
+
+    com::Utf8Str strOld;
+    i_usbFilterFieldToString(&mData->mUSBFilter, aIdx, strOld);
     if (strOld != strNew)
     {
         m_fModified = true;
-        ComObjPtr<Machine> pMachine = mParent->getMachine();
+        ComObjPtr<Machine> pMachine = mParent->i_getMachine();
 
         mData.backup();
 
-        Utf8Str errStr;
-        HRESULT rc = usbFilterFieldFromString(&mData->mUSBFilter, aIdx, strNew, errStr);
+        com::Utf8Str errStr;
+        HRESULT rc = i_usbFilterFieldFromString(&mData->mUSBFilter, aIdx, strNew, errStr);
         if (FAILED(rc))
         {
@@ -860,22 +814,8 @@
         mlock.release();
 
-        return mParent->onDeviceFilterChange(this);
-    }
-
-    return S_OK;
-}
-
-/**
- *  Generic USB filter field setter, expects UTF-16 input.
- *
- *  @param  aIdx    The field index.
- *  @param  aStr    The new value.
- *
- *  @return COM status.
- */
-HRESULT USBDeviceFilter::usbFilterFieldSetter(USBFILTERIDX aIdx,
-                                              IN_BSTR aStr)
-{
-    return usbFilterFieldSetter(aIdx, Utf8Str(aStr));
+        return mParent->i_onDeviceFilterChange(this);
+    }
+
+    return S_OK;
 }
 
@@ -948,26 +888,26 @@
     do
     {
-        rc = COMSETTER(Action)(data.action);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_VENDOR_ID, data.strVendorId);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_PRODUCT_ID, data.strProductId);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_DEVICE, data.strRevision);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_MANUFACTURER_STR, data.strManufacturer);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_PRODUCT_ID, data.strProduct);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_SERIAL_NUMBER_STR, data.strSerialNumber);
-        if (FAILED(rc)) break;
-
-        rc = usbFilterFieldSetter(USBFILTERIDX_PORT, data.strPort);
+        rc = setAction(data.action);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_VENDOR_ID, data.strVendorId);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_PRODUCT_ID, data.strProductId);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_DEVICE, data.strRevision);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_MANUFACTURER_STR, data.strManufacturer);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_PRODUCT_ID, data.strProduct);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_SERIAL_NUMBER_STR, data.strSerialNumber);
+        if (FAILED(rc)) break;
+
+        rc = i_usbFilterFieldSetter(USBFILTERIDX_PORT, data.strPort);
         if (FAILED(rc)) break;
     }
@@ -1044,5 +984,5 @@
  * to be our parent.
  */
-RWLockHandle *HostUSBDeviceFilter::lockHandle() const
+RWLockHandle *HostUSBDeviceFilter::i_lockHandle() const
 {
     return mParent->lockHandle();
@@ -1052,26 +992,16 @@
 // IUSBDeviceFilter properties
 ////////////////////////////////////////////////////////////////////////////////
-
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(Name) (BSTR *aName)
-{
-    CheckComArgOutPointerValid(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT HostUSBDeviceFilter::getName(com::Utf8Str &aName)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mData->mName.cloneTo(aName);
-
-    return S_OK;
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(Name) (IN_BSTR aName)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aName = mData->mName;
+
+    return S_OK;
+}
+
+
+HRESULT HostUSBDeviceFilter::setName(const com::Utf8Str &aName)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1089,11 +1019,7 @@
 }
 
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(Active) (BOOL *aActive)
-{
-    CheckComArgOutPointerValid(aActive);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDeviceFilter::getActive(BOOL *aActive)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1103,9 +1029,7 @@
 }
 
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(Active) (BOOL aActive)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDeviceFilter::setActive(BOOL aActive)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1123,89 +1047,84 @@
 }
 
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(VendorId) (BSTR *aVendorId)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_VENDOR_ID, aVendorId);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(VendorId) (IN_BSTR aVendorId)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_VENDOR_ID, aVendorId);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(ProductId) (BSTR *aProductId)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_PRODUCT_ID, aProductId);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(ProductId) (IN_BSTR aProductId)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_PRODUCT_ID, aProductId);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(Revision) (BSTR *aRevision)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_DEVICE, aRevision);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(Revision) (IN_BSTR aRevision)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_DEVICE, aRevision);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(Manufacturer) (BSTR *aManufacturer)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_MANUFACTURER_STR, aManufacturer);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(Manufacturer) (IN_BSTR aManufacturer)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_MANUFACTURER_STR, aManufacturer);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(Product) (BSTR *aProduct)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_PRODUCT_STR, aProduct);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(Product) (IN_BSTR aProduct)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_PRODUCT_STR, aProduct);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(SerialNumber) (BSTR *aSerialNumber)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_SERIAL_NUMBER_STR, aSerialNumber);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(SerialNumber) (IN_BSTR aSerialNumber)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_SERIAL_NUMBER_STR, aSerialNumber);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(Port) (BSTR *aPort)
-{
-    return usbFilterFieldGetter(USBFILTERIDX_PORT, aPort);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(Port) (IN_BSTR aPort)
-{
-    return usbFilterFieldSetter(USBFILTERIDX_PORT, aPort);
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(Remote) (BSTR *aRemote)
-{
-    CheckComArgOutPointerValid(aRemote);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT HostUSBDeviceFilter::getVendorId(com::Utf8Str &aVendorId)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_VENDOR_ID, aVendorId);
+}
+
+HRESULT HostUSBDeviceFilter::setVendorId(const com::Utf8Str &aVendorId)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_VENDOR_ID, aVendorId);
+}
+
+HRESULT HostUSBDeviceFilter::getProductId(com::Utf8Str &aProductId)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_PRODUCT_ID, aProductId);
+}
+
+HRESULT HostUSBDeviceFilter::setProductId(const com::Utf8Str &aProductId)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_PRODUCT_ID, aProductId);
+}
+
+HRESULT HostUSBDeviceFilter::getRevision(com::Utf8Str &aRevision)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_DEVICE, aRevision);
+}
+
+HRESULT HostUSBDeviceFilter::setRevision(const com::Utf8Str &aRevision)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_DEVICE, aRevision);
+}
+
+HRESULT HostUSBDeviceFilter::getManufacturer(com::Utf8Str &aManufacturer)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_MANUFACTURER_STR, aManufacturer);
+}
+
+HRESULT HostUSBDeviceFilter::setManufacturer(const com::Utf8Str &aManufacturer)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_MANUFACTURER_STR, aManufacturer);
+}
+
+HRESULT HostUSBDeviceFilter::getProduct(com::Utf8Str &aProduct)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_PRODUCT_STR, aProduct);
+}
+
+HRESULT HostUSBDeviceFilter::setProduct(const com::Utf8Str &aProduct)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_PRODUCT_STR, aProduct);
+}
+
+HRESULT HostUSBDeviceFilter::getSerialNumber(com::Utf8Str &aSerialNumber)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_SERIAL_NUMBER_STR, aSerialNumber);
+}
+
+HRESULT HostUSBDeviceFilter::setSerialNumber(const com::Utf8Str &aSerialNumber)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_SERIAL_NUMBER_STR, aSerialNumber);
+}
+
+HRESULT HostUSBDeviceFilter::getPort(com::Utf8Str &aPort)
+{
+    return i_usbFilterFieldGetter(USBFILTERIDX_PORT, aPort);
+}
+
+HRESULT HostUSBDeviceFilter::setPort(const com::Utf8Str &aPort)
+{
+    return i_usbFilterFieldSetter(USBFILTERIDX_PORT, aPort);
+}
+
+HRESULT HostUSBDeviceFilter::getRemote(com::Utf8Str &aRemote)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mData->mRemote.string().cloneTo(aRemote);
-
-    return S_OK;
-}
-
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(Remote) (IN_BSTR /* aRemote */)
+    aRemote = mData->mRemote.string();
+
+    return S_OK;
+}
+
+HRESULT HostUSBDeviceFilter::setRemote(const com::Utf8Str & /* aRemote */)
 {
     return setError(E_NOTIMPL,
@@ -1213,11 +1132,7 @@
 }
 
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(MaskedInterfaces) (ULONG *aMaskedIfs)
-{
-    CheckComArgOutPointerValid(aMaskedIfs);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDeviceFilter::getMaskedInterfaces(ULONG *aMaskedIfs)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1226,6 +1141,5 @@
     return S_OK;
 }
-
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(MaskedInterfaces) (ULONG /* aMaskedIfs */)
+HRESULT HostUSBDeviceFilter::setMaskedInterfaces(ULONG /* aMaskedIfs */)
 {
     return setError(E_NOTIMPL,
@@ -1233,13 +1147,9 @@
 }
 
-// IHostUSBDeviceFilter properties
-////////////////////////////////////////////////////////////////////////////////
-
-STDMETHODIMP HostUSBDeviceFilter::COMGETTER(Action) (USBDeviceFilterAction_T *aAction)
+// wrapped IHostUSBDeviceFilter properties
+////////////////////////////////////////////////////////////////////////////////
+HRESULT HostUSBDeviceFilter::getAction(USBDeviceFilterAction_T *aAction)
 {
     CheckComArgOutPointerValid(aAction);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -1255,9 +1165,7 @@
 }
 
-STDMETHODIMP HostUSBDeviceFilter::COMSETTER(Action) (USBDeviceFilterAction_T aAction)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT HostUSBDeviceFilter::setAction(USBDeviceFilterAction_T aAction)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1292,4 +1200,7 @@
 }
 
+
+// IHostUSBDeviceFilter properties
+////////////////////////////////////////////////////////////////////////////////
 /**
  *  Generic USB filter field getter.
@@ -1300,22 +1211,12 @@
  *  @return COM status.
  */
-HRESULT HostUSBDeviceFilter::usbFilterFieldGetter(USBFILTERIDX aIdx, BSTR *aStr)
-{
-    CheckComArgOutPointerValid(aStr);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT HostUSBDeviceFilter::i_usbFilterFieldGetter(USBFILTERIDX aIdx, com::Utf8Str &aStr)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    Utf8Str str;
-    usbFilterFieldToString(&mData->mUSBFilter, aIdx, str);
-
-    str.cloneTo(aStr);
-
-    return S_OK;
-}
-
-void HostUSBDeviceFilter::saveSettings(settings::USBDeviceFilter &data)
+    i_usbFilterFieldToString(&mData->mUSBFilter, aIdx, aStr);
+    return S_OK;
+}
+
+void HostUSBDeviceFilter::i_saveSettings(settings::USBDeviceFilter &data)
 {
     AutoCaller autoCaller(this);
@@ -1323,15 +1224,13 @@
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
     data.strName = mData->mName;
     data.fActive = !!mData->mActive;
-
-    usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_VENDOR_ID, data.strVendorId);
-    usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_PRODUCT_ID, data.strProductId);
-    usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_DEVICE, data.strRevision);
-    usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_MANUFACTURER_STR, data.strManufacturer);
-    usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_PRODUCT_STR, data.strProduct);
-    usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_SERIAL_NUMBER_STR, data.strSerialNumber);
-    usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_PORT, data.strPort);
+    i_usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_VENDOR_ID, data.strVendorId);
+    i_usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_PRODUCT_ID, data.strProductId);
+    i_usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_DEVICE, data.strRevision);
+    i_usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_MANUFACTURER_STR, data.strManufacturer);
+    i_usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_PRODUCT_STR, data.strProduct);
+    i_usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_SERIAL_NUMBER_STR, data.strSerialNumber);
+    i_usbFilterFieldToString(&mData->mUSBFilter, USBFILTERIDX_PORT, data.strPort);
 
     COMGETTER(Action)(&data.action);
@@ -1348,20 +1247,14 @@
  *  @return COM status.
  */
-HRESULT HostUSBDeviceFilter::usbFilterFieldSetter(USBFILTERIDX aIdx, Bstr aStr)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT HostUSBDeviceFilter::i_usbFilterFieldSetter(USBFILTERIDX aIdx, const com::Utf8Str &aStr)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
     Utf8Str strOld;
-    Utf8Str strNew(aStr);
-    usbFilterFieldToString(&mData->mUSBFilter, aIdx, strOld);
-    if (strOld != strNew)
+    i_usbFilterFieldToString(&mData->mUSBFilter, aIdx, strOld);
+    if (strOld != aStr)
     {
         //mData.backup();
-
-        Utf8Str errStr;
-        HRESULT rc = USBDeviceFilter::usbFilterFieldFromString(&mData->mUSBFilter, aIdx, aStr, errStr);
+        com::Utf8Str errStr;
+        HRESULT rc = USBDeviceFilter::i_usbFilterFieldFromString(&mData->mUSBFilter, aIdx, aStr, errStr);
         if (FAILED(rc))
         {
Index: /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp	(revision 49951)
@@ -290,22 +290,20 @@
 
 
-STDMETHODIMP USBDeviceFilters::COMGETTER(DeviceFilters)(ComSafeArrayOut(IUSBDeviceFilter *, aDevicesFilters))
-{
-#ifdef VBOX_WITH_USB
-    CheckComArgOutSafeArrayPointerValid(aDevicesFilters);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT USBDeviceFilters::getDeviceFilters(std::vector<ComPtr<IUSBDeviceFilter> > &aDeviceFilters)
+{
+#ifdef VBOX_WITH_USB
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     SafeIfaceArray<IUSBDeviceFilter> collection(*m->llDeviceFilters.data());
-    collection.detachTo(ComSafeArrayOutArg(aDevicesFilters));
+    aDeviceFilters.resize(collection.size());
+    if (collection.size())
+        for (size_t i = 0; i < collection.size(); ++i)
+            aDeviceFilters[i] = collection[i];
 
     return S_OK;
 #else
-    NOREF(aDevicesFilters);
+    NOREF(aDeviceFilters);
 # ifndef RT_OS_WINDOWS
-    NOREF(aDevicesFiltersSize);
+    NOREF(aDeviceFilters);
 # endif
     ReturnComNotImplemented();
@@ -313,17 +311,12 @@
 }
 
-// IUSBDeviceFilters methods
+// wrapped IUSBDeviceFilters methods
 /////////////////////////////////////////////////////////////////////////////
 
-STDMETHODIMP USBDeviceFilters::CreateDeviceFilter(IN_BSTR aName,
-                                                  IUSBDeviceFilter **aFilter)
-{
-#ifdef VBOX_WITH_USB
-    CheckComArgOutPointerValid(aFilter);
-
-    CheckComArgStrNotEmptyOrNull(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT USBDeviceFilters::createDeviceFilter(const com::Utf8Str &aName,
+                                             ComPtr<IUSBDeviceFilter> &aFilter)
+
+{
+#ifdef VBOX_WITH_USB
 
     /* the machine needs to be mutable */
@@ -335,7 +328,7 @@
     ComObjPtr<USBDeviceFilter> pFilter;
     pFilter.createObject();
-    HRESULT rc = pFilter->init(this, aName);
+    HRESULT rc = pFilter->init(this, Bstr(aName).raw());
     ComAssertComRCRetRC(rc);
-    rc = pFilter.queryInterfaceTo(aFilter);
+    rc = pFilter.queryInterfaceTo(aFilter.asOutParam());
     AssertComRCReturnRC(rc);
 
@@ -348,13 +341,9 @@
 }
 
-STDMETHODIMP USBDeviceFilters::InsertDeviceFilter(ULONG aPosition,
-                                                  IUSBDeviceFilter *aFilter)
-{
-#ifdef VBOX_WITH_USB
-
-    CheckComArgNotNull(aFilter);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+HRESULT USBDeviceFilters::insertDeviceFilter(ULONG aPosition,
+                                             const ComPtr<IUSBDeviceFilter> &aFilter)
+{
+#ifdef VBOX_WITH_USB
 
     /* the machine needs to be mutable */
@@ -364,5 +353,6 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    ComObjPtr<USBDeviceFilter> pFilter = static_cast<USBDeviceFilter*>(aFilter);
+    IUSBDeviceFilter *iFilter = aFilter;
+    ComObjPtr<USBDeviceFilter> pFilter = static_cast<USBDeviceFilter*>(iFilter);
 
     if (pFilter->mInList)
@@ -387,12 +377,12 @@
 
     /* notify the proxy (only when it makes sense) */
-    if (pFilter->getData().mActive && Global::IsOnline(adep.machineState())
-        && pFilter->getData().mRemote.isMatch(false))
+    if (pFilter->i_getData().mActive && Global::IsOnline(adep.machineState())
+        && pFilter->i_getData().mRemote.isMatch(false))
     {
         USBProxyService *pProxySvc = m->pHost->i_usbProxyService();
         ComAssertRet(pProxySvc, E_FAIL);
 
-        ComAssertRet(pFilter->getId() == NULL, E_FAIL);
-        pFilter->getId() = pProxySvc->insertFilter(&pFilter->getData().mUSBFilter);
+        ComAssertRet(pFilter->i_getId() == NULL, E_FAIL);
+        pFilter->i_getId() = pProxySvc->insertFilter(&pFilter->i_getData().mUSBFilter);
     }
 
@@ -413,14 +403,8 @@
 }
 
-STDMETHODIMP USBDeviceFilters::RemoveDeviceFilter(ULONG aPosition,
-                                                  IUSBDeviceFilter **aFilter)
-{
-#ifdef VBOX_WITH_USB
-
-    CheckComArgOutPointerValid(aFilter);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT USBDeviceFilters::removeDeviceFilter(ULONG aPosition,
+                                             ComPtr<IUSBDeviceFilter> &aFilter)
+{
+#ifdef VBOX_WITH_USB
     /* the machine needs to be mutable */
     AutoMutableStateDependency adep(m->pParent);
@@ -455,17 +439,17 @@
     /* cancel sharing (make an independent copy of data) */
     pFilter->unshare();
-
-    pFilter.queryInterfaceTo(aFilter);
+    pFilter.queryInterfaceTo(aFilter.asOutParam());
+
 
     /* notify the proxy (only when it makes sense) */
-    if (pFilter->getData().mActive && Global::IsOnline(adep.machineState())
-        && pFilter->getData().mRemote.isMatch(false))
+    if (pFilter->i_getData().mActive && Global::IsOnline(adep.machineState())
+        && pFilter->i_getData().mRemote.isMatch(false))
     {
         USBProxyService *pProxySvc = m->pHost->i_usbProxyService();
         ComAssertRet(pProxySvc, E_FAIL);
 
-        ComAssertRet(pFilter->getId() != NULL, E_FAIL);
-        pProxySvc->removeFilter(pFilter->getId());
-        pFilter->getId() = NULL;
+        ComAssertRet(pFilter->i_getId() != NULL, E_FAIL);
+        pProxySvc->removeFilter(pFilter->i_getId());
+        pFilter->i_getId() = NULL;
     }
 
@@ -497,5 +481,5 @@
  *  @note Does not lock "this" as Machine::loadHardware, which calls this, does not lock either.
  */
-HRESULT USBDeviceFilters::loadSettings(const settings::USB &data)
+HRESULT USBDeviceFilters::i_loadSettings(const settings::USB &data)
 {
     AutoCaller autoCaller(this);
@@ -540,5 +524,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT USBDeviceFilters::saveSettings(settings::USB &data)
+HRESULT USBDeviceFilters::i_saveSettings(settings::USB &data)
 {
     AutoCaller autoCaller(this);
@@ -555,5 +539,5 @@
     {
         AutoWriteLock filterLock(*it COMMA_LOCKVAL_SRC_POS);
-        const USBDeviceFilter::Data &filterData = (*it)->getData();
+        const USBDeviceFilter::Data &filterData = (*it)->i_getData();
 
         Bstr str;
@@ -587,5 +571,5 @@
 
 /** @note Locks objects for writing! */
-void USBDeviceFilters::rollback()
+void USBDeviceFilters::i_rollback()
 {
     AutoCaller autoCaller(this);
@@ -614,12 +598,12 @@
             {
                 /* notify the proxy (only when it makes sense) */
-                if ((*it)->getData().mActive &&
+                if ((*it)->i_getData().mActive &&
                     Global::IsOnline(adep.machineState())
-                    && (*it)->getData().mRemote.isMatch(false))
+                    && (*it)->i_getData().mRemote.isMatch(false))
                 {
                     USBDeviceFilter *pFilter = *it;
-                    Assert(pFilter->getId() != NULL);
-                    pProxySvc->removeFilter(pFilter->getId());
-                    pFilter->getId() = NULL;
+                    Assert(pFilter->i_getId() != NULL);
+                    pProxySvc->removeFilter(pFilter->i_getId());
+                    pFilter->i_getId() = NULL;
                 }
 
@@ -640,10 +624,10 @@
                 {
                     /* notify the proxy (only when necessary) */
-                    if ((*it)->getData().mActive
-                            && (*it)->getData().mRemote.isMatch(false))
+                    if ((*it)->i_getData().mActive
+                            && (*it)->i_getData().mRemote.isMatch(false))
                     {
                         USBDeviceFilter *pFilter = *it; /* resolve ambiguity */
-                        Assert(pFilter->getId() == NULL);
-                        pFilter->getId() = pProxySvc->insertFilter(&pFilter->getData().mUSBFilter);
+                        Assert(pFilter->i_getId() == NULL);
+                        pFilter->i_getId() = pProxySvc->insertFilter(&pFilter->i_getData().mUSBFilter);
                     }
                 }
@@ -663,9 +647,9 @@
     while (it != m->llDeviceFilters->end())
     {
-        if ((*it)->isModified())
+        if ((*it)->i_isModified())
         {
-            (*it)->rollback();
+            (*it)->i_rollback();
             /* call this to notify the USB proxy about changes */
-            onDeviceFilterChange(*it);
+            i_onDeviceFilterChange(*it);
         }
         ++it;
@@ -679,5 +663,5 @@
  *  for writing) if there is one.
  */
-void USBDeviceFilters::commit()
+void USBDeviceFilters::i_commit()
 {
     /* sanity */
@@ -711,8 +695,8 @@
             while (it != m->llDeviceFilters->end())
             {
-                (*it)->commit();
+                (*it)->i_commit();
 
                 /* look if this filter has a peer filter */
-                ComObjPtr<USBDeviceFilter> peer = (*it)->peer();
+                ComObjPtr<USBDeviceFilter> peer = (*it)->i_peer();
                 if (!peer)
                 {
@@ -763,5 +747,5 @@
         while (it != m->llDeviceFilters->end())
         {
-            (*it)->commit();
+            (*it)->i_commit();
             ++it;
         }
@@ -774,5 +758,5 @@
  *  represented by @a aThat (locked for reading).
  */
-void USBDeviceFilters::copyFrom(USBDeviceFilters *aThat)
+void USBDeviceFilters::i_copyFrom(USBDeviceFilters *aThat)
 {
     AssertReturnVoid(aThat != NULL);
@@ -825,6 +809,6 @@
  *  @note Locks nothing.
  */
-HRESULT USBDeviceFilters::onDeviceFilterChange(USBDeviceFilter *aFilter,
-                                               BOOL aActiveChanged /* = FALSE */)
+HRESULT USBDeviceFilters::i_onDeviceFilterChange(USBDeviceFilter *aFilter,
+                                                 BOOL aActiveChanged /* = FALSE */)
 {
     AutoCaller autoCaller(this);
@@ -849,17 +833,17 @@
         if (aActiveChanged)
         {
-            if (aFilter->getData().mRemote.isMatch(false))
+            if (aFilter->i_getData().mRemote.isMatch(false))
             {
                 /* insert/remove the filter from the proxy */
-                if (aFilter->getData().mActive)
+                if (aFilter->i_getData().mActive)
                 {
-                    ComAssertRet(aFilter->getId() == NULL, E_FAIL);
-                    aFilter->getId() = pProxySvc->insertFilter(&aFilter->getData().mUSBFilter);
+                    ComAssertRet(aFilter->i_getId() == NULL, E_FAIL);
+                    aFilter->i_getId() = pProxySvc->insertFilter(&aFilter->i_getData().mUSBFilter);
                 }
                 else
                 {
-                    ComAssertRet(aFilter->getId() != NULL, E_FAIL);
-                    pProxySvc->removeFilter(aFilter->getId());
-                    aFilter->getId() = NULL;
+                    ComAssertRet(aFilter->i_getId() != NULL, E_FAIL);
+                    pProxySvc->removeFilter(aFilter->i_getId());
+                    aFilter->i_getId() = NULL;
                 }
             }
@@ -867,12 +851,12 @@
         else
         {
-            if (aFilter->getData().mActive)
+            if (aFilter->i_getData().mActive)
             {
                 /* update the filter in the proxy */
-                ComAssertRet(aFilter->getId() != NULL, E_FAIL);
-                pProxySvc->removeFilter(aFilter->getId());
-                if (aFilter->getData().mRemote.isMatch(false))
+                ComAssertRet(aFilter->i_getId() != NULL, E_FAIL);
+                pProxySvc->removeFilter(aFilter->i_getId());
+                if (aFilter->i_getData().mRemote.isMatch(false))
                 {
-                    aFilter->getId() = pProxySvc->insertFilter(&aFilter->getData().mUSBFilter);
+                    aFilter->i_getId() = pProxySvc->insertFilter(&aFilter->i_getData().mUSBFilter);
                 }
             }
@@ -891,5 +875,5 @@
  *  @note Locks this object for reading.
  */
-bool USBDeviceFilters::hasMatchingFilter(const ComObjPtr<HostUSBDevice> &aDevice, ULONG *aMaskedIfs)
+bool USBDeviceFilters::i_hasMatchingFilter(const ComObjPtr<HostUSBDevice> &aDevice, ULONG *aMaskedIfs)
 {
     AutoCaller autoCaller(this);
@@ -908,7 +892,7 @@
     {
         AutoWriteLock filterLock(*it COMMA_LOCKVAL_SRC_POS);
-        if (aDevice->isMatch((*it)->getData()))
+        if (aDevice->isMatch((*it)->i_getData()))
         {
-            *aMaskedIfs = (*it)->getData().mMaskedIfs;
+            *aMaskedIfs = (*it)->i_getData().mMaskedIfs;
             return true;
         }
@@ -930,5 +914,5 @@
  *  @note Locks this object for reading.
  */
-bool USBDeviceFilters::hasMatchingFilter(IUSBDevice *aUSBDevice, ULONG *aMaskedIfs)
+bool USBDeviceFilters::i_hasMatchingFilter(IUSBDevice *aUSBDevice, ULONG *aMaskedIfs)
 {
     LogFlowThisFuncEnter();
@@ -1005,5 +989,5 @@
     {
         AutoWriteLock filterLock(*it COMMA_LOCKVAL_SRC_POS);
-        const USBDeviceFilter::Data &aData = (*it)->getData();
+        const USBDeviceFilter::Data &aData = (*it)->i_getData();
 
         if (!aData.mActive)
@@ -1033,5 +1017,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT USBDeviceFilters::notifyProxy(bool aInsertFilters)
+HRESULT USBDeviceFilters::i_notifyProxy(bool aInsertFilters)
 {
     LogFlowThisFunc(("aInsertFilters=%RTbool\n", aInsertFilters));
@@ -1051,12 +1035,12 @@
 
         /* notify the proxy (only if the filter is active) */
-        if (   pFilter->getData().mActive
-            && pFilter->getData().mRemote.isMatch(false) /* and if the filter is NOT remote */
+        if (   pFilter->i_getData().mActive
+            && pFilter->i_getData().mRemote.isMatch(false) /* and if the filter is NOT remote */
            )
         {
             if (aInsertFilters)
             {
-                AssertReturn(pFilter->getId() == NULL, E_FAIL);
-                pFilter->getId() = pProxySvc->insertFilter(&pFilter->getData().mUSBFilter);
+                AssertReturn(pFilter->i_getId() == NULL, E_FAIL);
+                pFilter->i_getId() = pProxySvc->insertFilter(&pFilter->i_getData().mUSBFilter);
             }
             else
@@ -1065,8 +1049,8 @@
                  * when this method gets called (as a result of an early VM
                  * process crash for example. So, don't assert that ID != NULL. */
-                if (pFilter->getId() != NULL)
+                if (pFilter->i_getId() != NULL)
                 {
-                    pProxySvc->removeFilter(pFilter->getId());
-                    pFilter->getId() = NULL;
+                    pProxySvc->removeFilter(pFilter->i_getId());
+                    pFilter->i_getId() = NULL;
                 }
             }
@@ -1078,5 +1062,5 @@
 }
 
-Machine* USBDeviceFilters::getMachine()
+Machine* USBDeviceFilters::i_getMachine()
 {
     return m->pParent;
Index: /trunk/src/VBox/Main/src-server/USBProxyService.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBProxyService.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/USBProxyService.cpp	(revision 49951)
@@ -422,5 +422,5 @@
     {
         AutoWriteLock filterLock(*it COMMA_LOCKVAL_SRC_POS);
-        const HostUSBDeviceFilter::Data &data = (*it)->getData();
+        const HostUSBDeviceFilter::Data &data = (*it)->i_getData();
         if (aDevice->isMatch(data))
         {
Index: /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp	(revision 49951)
@@ -442,5 +442,5 @@
         ComAssertComRCThrowRC(rc);
 
-        rc = m->pSystemProperties->loadSettings(m->pMainConfigFile->systemProperties);
+        rc = m->pSystemProperties->i_loadSettings(m->pMainConfigFile->systemProperties);
         if (FAILED(rc)) throw rc;
 
@@ -4268,5 +4268,5 @@
         if (FAILED(rc)) throw rc;
 
-        rc = m->pSystemProperties->saveSettings(m->pMainConfigFile->systemProperties);
+        rc = m->pSystemProperties->i_saveSettings(m->pMainConfigFile->systemProperties);
         if (FAILED(rc)) throw rc;
 
Index: /trunk/src/VBox/Main/src-server/xpcom/server.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/xpcom/server.cpp	(revision 49950)
+++ /trunk/src/VBox/Main/src-server/xpcom/server.cpp	(revision 49951)
@@ -122,23 +122,9 @@
 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(SharedFolder, ISharedFolder)
 
-NS_DECL_CLASSINFO(NetworkAdapter)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(NetworkAdapter, INetworkAdapter)
-
-NS_DECL_CLASSINFO(USBDeviceFilters)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(USBDeviceFilters, IUSBDeviceFilters)
-
 #ifdef VBOX_WITH_USB
-NS_DECL_CLASSINFO(USBDeviceFilter)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(USBDeviceFilter, IUSBDeviceFilter)
-
 NS_DECL_CLASSINFO(HostUSBDevice)
 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(HostUSBDevice, IUSBDevice, IHostUSBDevice)
 
-NS_DECL_CLASSINFO(HostUSBDeviceFilter)
-NS_IMPL_THREADSAFE_ISUPPORTS2_CI(HostUSBDeviceFilter, IUSBDeviceFilter, IHostUSBDeviceFilter)
 #endif
-
-NS_DECL_CLASSINFO(SystemProperties)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(SystemProperties, ISystemProperties)
 
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
Index: /trunk/src/VBox/Main/testcase/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Main/testcase/Makefile.kmk	(revision 49950)
+++ /trunk/src/VBox/Main/testcase/Makefile.kmk	(revision 49951)
@@ -161,5 +161,5 @@
 # tstUSBProxyLinux
 #
-tstUSBProxyLinux_TEMPLATE  = VBOXR3TSTNPEXE
+tstUSBProxyLinux_TEMPLATE  = VBOXMAINCLIENTTSTEXE
 tstUSBProxyLinux_SOURCES   = \
 	tstUSBProxyLinux.cpp \
@@ -171,5 +171,6 @@
 	$(VBOX_PATH_SDK)/bindings/xpcom/include \
 	$(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
-	$(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom
+	$(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
+	$(VBOX_MAIN_APIWRAPPER_INCS)
 tstUSBProxyLinux_DEFS      = \
 	UNIT_TEST \
