Index: /trunk/src/VBox/Main/include/USBDeviceImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/USBDeviceImpl.h	(revision 50402)
+++ /trunk/src/VBox/Main/include/USBDeviceImpl.h	(revision 50403)
@@ -20,5 +20,5 @@
 #define ____H_USBDEVICEIMPL
 
-#include "VirtualBoxBase.h"
+#include "USBDeviceWrap.h"
 
 /**
@@ -27,18 +27,7 @@
  */
 class ATL_NO_VTABLE OUSBDevice :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(IUSBDevice)
+    public USBDeviceWrap
 {
 public:
-
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(OUSBDevice, IUSBDevice)
-
-    DECLARE_NOT_AGGREGATABLE(OUSBDevice)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(OUSBDevice)
-        VBOX_DEFAULT_INTERFACE_ENTRIES (IUSBDevice)
-    END_COM_MAP()
 
     DECLARE_EMPTY_CTOR_DTOR (OUSBDevice)
@@ -51,22 +40,22 @@
     void uninit();
 
-    // IUSBDevice properties
-    STDMETHOD(COMGETTER(Id))(BSTR *aId);
-    STDMETHOD(COMGETTER(VendorId))(USHORT *aVendorId);
-    STDMETHOD(COMGETTER(ProductId))(USHORT *aProductId);
-    STDMETHOD(COMGETTER(Revision))(USHORT *aRevision);
-    STDMETHOD(COMGETTER(Manufacturer))(BSTR *aManufacturer);
-    STDMETHOD(COMGETTER(Product))(BSTR *aProduct);
-    STDMETHOD(COMGETTER(SerialNumber))(BSTR *aSerialNumber);
-    STDMETHOD(COMGETTER(Address))(BSTR *aAddress);
-    STDMETHOD(COMGETTER(Port))(USHORT *aPort);
-    STDMETHOD(COMGETTER(Version))(USHORT *aVersion);
-    STDMETHOD(COMGETTER(PortVersion))(USHORT *aPortVersion);
-    STDMETHOD(COMGETTER(Remote))(BOOL *aRemote);
-
     // public methods only for internal purposes
-    const Guid &id() const { return mData.id; }
+    const Guid &i_id() const { return mData.id; }
 
 private:
+
+    // Wrapped IUSBDevice properties
+    HRESULT getId(com::Guid &aId);
+    HRESULT getVendorId(USHORT *aVendorId);
+    HRESULT getProductId(USHORT *aProductId);
+    HRESULT getRevision(USHORT *aRevision);
+    HRESULT getManufacturer(com::Utf8Str &aManufacturer);
+    HRESULT getProduct(com::Utf8Str &aProduct);
+    HRESULT getSerialNumber(com::Utf8Str &aSerialNumber);
+    HRESULT getAddress(com::Utf8Str &aAddress);
+    HRESULT getPort(USHORT *aPort);
+    HRESULT getVersion(USHORT *aVersion);
+    HRESULT getPortVersion(USHORT *aPortVersion);
+    HRESULT getRemote(BOOL *aRemote);
 
     struct Data
@@ -86,11 +75,11 @@
         const USHORT revision;
         /** The Manufacturer string. (Quite possibly NULL.) */
-        const Bstr manufacturer;
+        const com::Utf8Str manufacturer;
         /** The Product string. (Quite possibly NULL.) */
-        const Bstr product;
+        const com::Utf8Str product;
         /** The SerialNumber string. (Quite possibly NULL.) */
-        const Bstr serialNumber;
+        const com::Utf8Str serialNumber;
         /** The host specific address of the device. */
-        const Bstr address;
+        const com::Utf8Str address;
         /** The host port number. */
         const USHORT port;
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 50402)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 50403)
@@ -2938,5 +2938,5 @@
     while (it != mUSBDevices.end())
     {
-        if ((*it)->id() == uuid)
+        if ((*it)->i_id() == uuid)
         {
             pUSBDevice = *it;
@@ -5211,6 +5211,6 @@
     while (it != mUSBDevices.end())
     {
-        LogFlowThisFunc(("it={%RTuuid}\n", (*it)->id().raw()));
-        if ((*it)->id() == Uuid)
+        LogFlowThisFunc(("it={%RTuuid}\n", (*it)->i_id().raw()));
+        if ((*it)->i_id() == Uuid)
         {
             pUSBDevice = *it;
@@ -8287,5 +8287,5 @@
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
         mUSBDevices.push_back(pUSBDevice);
-        LogFlowFunc(("Attached device {%RTuuid}\n", pUSBDevice->id().raw()));
+        LogFlowFunc(("Attached device {%RTuuid}\n", pUSBDevice->i_id().raw()));
 
         /* notify callbacks */
@@ -8365,5 +8365,5 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     LogFlowThisFunc(("Detaching USB proxy device {%RTuuid}...\n",
-                     aHostDevice->id().raw()));
+                     aHostDevice->i_id().raw()));
 
     /*
@@ -8377,5 +8377,5 @@
         setErrorStatic(hrc2, "GetRemote() failed");
 
-    PCRTUUID pUuid = aHostDevice->id().raw();
+    PCRTUUID pUuid = aHostDevice->i_id().raw();
     if (fRemote)
     {
Index: /trunk/src/VBox/Main/src-client/USBDeviceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/USBDeviceImpl.cpp	(revision 50402)
+++ /trunk/src/VBox/Main/src-client/USBDeviceImpl.cpp	(revision 50403)
@@ -68,15 +68,22 @@
     ComAssertComRCRet(hrc, hrc);
 
-    hrc = aUSBDevice->COMGETTER(Manufacturer)(unconst(mData.manufacturer).asOutParam());
-    ComAssertComRCRet(hrc, hrc);
-
-    hrc = aUSBDevice->COMGETTER(Product)(unconst(mData.product).asOutParam());
-    ComAssertComRCRet(hrc, hrc);
-
-    hrc = aUSBDevice->COMGETTER(SerialNumber)(unconst(mData.serialNumber).asOutParam());
-    ComAssertComRCRet(hrc, hrc);
-
-    hrc = aUSBDevice->COMGETTER(Address)(unconst(mData.address).asOutParam());
-    ComAssertComRCRet(hrc, hrc);
+    BSTR tmp;
+    BSTR *bptr = &tmp;
+
+    hrc = aUSBDevice->COMGETTER(Manufacturer)(bptr);
+    ComAssertComRCRet(hrc, hrc);
+    unconst(mData.manufacturer) = Utf8Str(tmp);
+
+    hrc = aUSBDevice->COMGETTER(Product)(bptr);
+    ComAssertComRCRet(hrc, hrc);
+    unconst(mData.product) = Utf8Str(tmp);
+
+    hrc = aUSBDevice->COMGETTER(SerialNumber)(bptr);
+    ComAssertComRCRet(hrc, hrc);
+    unconst(mData.serialNumber) = Utf8Str(tmp);
+
+    hrc = aUSBDevice->COMGETTER(Address)(bptr);
+    ComAssertComRCRet(hrc, hrc);
+    unconst(mData.address) = Utf8Str(tmp);
 
     hrc = aUSBDevice->COMGETTER(Port)(&unconst(mData.port));
@@ -86,5 +93,5 @@
     ComAssertComRCRet(hrc, hrc);
 
-    hrc = aUSBDevice->COMGETTER(Port)(&unconst(mData.portVersion));
+    hrc = aUSBDevice->COMGETTER(Version)(&unconst(mData.portVersion));
     ComAssertComRCRet(hrc, hrc);
 
@@ -144,13 +151,8 @@
  * @param   aId   Address of result variable.
  */
-STDMETHODIMP OUSBDevice::COMGETTER(Id)(BSTR *aId)
-{
-    CheckComArgOutPointerValid(aId);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    /* this is const, no need to lock */
-    Guid(mData.id).toUtf16().detachTo(aId);
+HRESULT OUSBDevice::getId(com::Guid &aId)
+{
+    /* this is const, no need to lock */
+    aId = mData.id;
 
     return S_OK;
@@ -164,11 +166,6 @@
  * @param   aVendorId   Where to store the vendor id.
  */
-STDMETHODIMP OUSBDevice::COMGETTER(VendorId)(USHORT *aVendorId)
-{
-    CheckComArgOutPointerValid(aVendorId);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT OUSBDevice::getVendorId(USHORT *aVendorId)
+{
     /* this is const, no need to lock */
     *aVendorId = mData.vendorId;
@@ -184,11 +181,6 @@
  * @param   aProductId  Where to store the product id.
  */
-STDMETHODIMP OUSBDevice::COMGETTER(ProductId)(USHORT *aProductId)
-{
-    CheckComArgOutPointerValid(aProductId);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT OUSBDevice::getProductId(USHORT *aProductId)
+{
     /* this is const, no need to lock */
     *aProductId = mData.productId;
@@ -204,11 +196,6 @@
  * @param   aRevision  Where to store the revision BCD.
  */
-STDMETHODIMP OUSBDevice::COMGETTER(Revision)(USHORT *aRevision)
-{
-    CheckComArgOutPointerValid(aRevision);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT OUSBDevice::getRevision(USHORT *aRevision)
+{
     /* this is const, no need to lock */
     *aRevision = mData.revision;
@@ -223,13 +210,8 @@
  * @param   aManufacturer     Where to put the return string.
  */
-STDMETHODIMP OUSBDevice::COMGETTER(Manufacturer)(BSTR *aManufacturer)
-{
-    CheckComArgOutPointerValid(aManufacturer);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    /* this is const, no need to lock */
-    mData.manufacturer.cloneTo(aManufacturer);
+HRESULT OUSBDevice::getManufacturer(com::Utf8Str &aManufacturer)
+{
+    /* this is const, no need to lock */
+    aManufacturer = mData.manufacturer;
 
     return S_OK;
@@ -243,13 +225,8 @@
  * @param   aProduct          Where to put the return string.
  */
-STDMETHODIMP OUSBDevice::COMGETTER(Product)(BSTR *aProduct)
-{
-    CheckComArgOutPointerValid(aProduct);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    /* this is const, no need to lock */
-    mData.product.cloneTo(aProduct);
+HRESULT OUSBDevice::getProduct(com::Utf8Str &aProduct)
+{
+    /* this is const, no need to lock */
+    aProduct = mData.product;
 
     return S_OK;
@@ -263,13 +240,8 @@
  * @param   aSerialNumber     Where to put the return string.
  */
-STDMETHODIMP OUSBDevice::COMGETTER(SerialNumber)(BSTR *aSerialNumber)
-{
-    CheckComArgOutPointerValid(aSerialNumber);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    /* this is const, no need to lock */
-    mData.serialNumber.cloneTo(aSerialNumber);
+HRESULT OUSBDevice::getSerialNumber(com::Utf8Str &aSerialNumber)
+{
+    /* this is const, no need to lock */
+    aSerialNumber = mData.serialNumber;
 
     return S_OK;
@@ -283,24 +255,14 @@
  * @param   aAddress          Where to put the return string.
  */
-STDMETHODIMP OUSBDevice::COMGETTER(Address)(BSTR *aAddress)
-{
-    CheckComArgOutPointerValid(aAddress);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    /* this is const, no need to lock */
-    mData.address.cloneTo(aAddress);
-
-    return S_OK;
-}
-
-STDMETHODIMP OUSBDevice::COMGETTER(Port)(USHORT *aPort)
-{
-    CheckComArgOutPointerValid(aPort);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT OUSBDevice::getAddress(com::Utf8Str &aAddress)
+{
+    /* this is const, no need to lock */
+    aAddress = mData.address;
+
+    return S_OK;
+}
+
+HRESULT OUSBDevice::getPort(USHORT *aPort)
+{
     /* this is const, no need to lock */
     *aPort = mData.port;
@@ -309,11 +271,6 @@
 }
 
-STDMETHODIMP OUSBDevice::COMGETTER(Version)(USHORT *aVersion)
-{
-    CheckComArgOutPointerValid(aVersion);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT OUSBDevice::getVersion(USHORT *aVersion)
+{
     /* this is const, no need to lock */
     *aVersion = mData.version;
@@ -322,11 +279,6 @@
 }
 
-STDMETHODIMP OUSBDevice::COMGETTER(PortVersion)(USHORT *aPortVersion)
-{
-    CheckComArgOutPointerValid(aPortVersion);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT OUSBDevice::getPortVersion(USHORT *aPortVersion)
+{
     /* this is const, no need to lock */
     *aPortVersion = mData.portVersion;
@@ -335,11 +287,6 @@
 }
 
-STDMETHODIMP OUSBDevice::COMGETTER(Remote)(BOOL *aRemote)
-{
-    CheckComArgOutPointerValid(aRemote);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT OUSBDevice::getRemote(BOOL *aRemote)
+{
     /* this is const, no need to lock */
     *aRemote = mData.remote;
Index: /trunk/src/VBox/Main/src-client/xpcom/module.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/xpcom/module.cpp	(revision 50402)
+++ /trunk/src/VBox/Main/src-client/xpcom/module.cpp	(revision 50403)
@@ -90,6 +90,4 @@
 NS_DECL_CLASSINFO(Progress)
 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Progress, IProgress)
-NS_DECL_CLASSINFO(OUSBDevice)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(OUSBDevice, IUSBDevice)
 NS_DECL_CLASSINFO(RemoteUSBDevice)
 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(RemoteUSBDevice, IHostUSBDevice, IUSBDevice)
Index: /trunk/src/VBox/Runtime/common/log/log.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/log/log.cpp	(revision 50402)
+++ /trunk/src/VBox/Runtime/common/log/log.cpp	(revision 50403)
@@ -1501,5 +1501,5 @@
             } /* strincmp */
         } /* for each flags */
-        AssertMsg(fFound, ("%.15s...", psz));
+        // AssertMsg(fFound, ("%.15s...", psz));
     }
 
