Index: trunk/src/VBox/Main/include/PCIDeviceAttachmentImpl.h
===================================================================
--- trunk/src/VBox/Main/include/PCIDeviceAttachmentImpl.h	(revision 50921)
+++ trunk/src/VBox/Main/include/PCIDeviceAttachmentImpl.h	(revision 50922)
@@ -21,24 +21,13 @@
 #define ____H_PCIDEVICEATTACHMENTIMPL
 
-#include "VirtualBoxBase.h"
+#include "PCIDeviceAttachmentWrap.h"
 #include <VBox/settings.h>
 
 class ATL_NO_VTABLE PCIDeviceAttachment :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(IPCIDeviceAttachment)
+    public PCIDeviceAttachmentWrap
 {
 public:
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(PCIDeviceAttachment, IPCIDeviceAttachment)
 
-    DECLARE_NOT_AGGREGATABLE(PCIDeviceAttachment)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(PCIDeviceAttachment)
-        VBOX_DEFAULT_INTERFACE_ENTRIES(IPCIDeviceAttachment)
-    END_COM_MAP()
-
-    PCIDeviceAttachment() { }
-    ~PCIDeviceAttachment() { }
+    DECLARE_EMPTY_CTOR_DTOR(PCIDeviceAttachment)
 
     // public initializer/uninitializer for internal purposes only
@@ -52,18 +41,19 @@
 
     // settings
-    HRESULT loadSettings(IMachine * aParent,
-                         const settings::HostPCIDeviceAttachment& aHpda);
-    HRESULT saveSettings(settings::HostPCIDeviceAttachment &data);
+    HRESULT i_loadSettings(IMachine * aParent,
+                           const settings::HostPCIDeviceAttachment& aHpda);
+    HRESULT i_saveSettings(settings::HostPCIDeviceAttachment &data);
 
     HRESULT FinalConstruct();
     void FinalRelease();
 
-    // IPCIDeviceAttachment properties
-    STDMETHOD(COMGETTER(Name))(BSTR * aName);
-    STDMETHOD(COMGETTER(IsPhysicalDevice))(BOOL * aPhysical);
-    STDMETHOD(COMGETTER(HostAddress))(LONG  * hostAddress);
-    STDMETHOD(COMGETTER(GuestAddress))(LONG * guestAddress);
+private:
 
-private:
+    // wrapped IPCIDeviceAttachment properties
+    HRESULT getName(com::Utf8Str &aName);
+    HRESULT getIsPhysicalDevice(BOOL *aIsPhysicalDevice);
+    HRESULT getHostAddress(LONG *aHostAddress);
+    HRESULT getGuestAddress(LONG *aGuestAddress);
+
     struct Data;
     Data*  m;
Index: trunk/src/VBox/Main/src-all/PCIDeviceAttachmentImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-all/PCIDeviceAttachmentImpl.cpp	(revision 50921)
+++ trunk/src/VBox/Main/src-all/PCIDeviceAttachmentImpl.cpp	(revision 50922)
@@ -43,4 +43,5 @@
 // constructor / destructor
 /////////////////////////////////////////////////////////////////////////////
+DEFINE_EMPTY_CTOR_DTOR(PCIDeviceAttachment)
 
 HRESULT PCIDeviceAttachment::FinalConstruct()
@@ -71,6 +72,6 @@
 }
 
-HRESULT PCIDeviceAttachment::loadSettings(IMachine *aParent,
-                                          const settings::HostPCIDeviceAttachment &hpda)
+HRESULT PCIDeviceAttachment::i_loadSettings(IMachine *aParent,
+                                            const settings::HostPCIDeviceAttachment &hpda)
 {
     Bstr bname(hpda.strDeviceName);
@@ -79,5 +80,5 @@
 
 
-HRESULT PCIDeviceAttachment::saveSettings(settings::HostPCIDeviceAttachment &data)
+HRESULT PCIDeviceAttachment::i_saveSettings(settings::HostPCIDeviceAttachment &data)
 {
     Assert(m);
@@ -104,33 +105,24 @@
 // IPCIDeviceAttachment properties
 /////////////////////////////////////////////////////////////////////////////
-
-STDMETHODIMP PCIDeviceAttachment::COMGETTER(Name)(BSTR * aName)
+HRESULT PCIDeviceAttachment::getName(com::Utf8Str &aName)
 {
-    CheckComArgOutPointerValid(aName);
-    m->DevName.cloneTo(aName);
+    aName = m->DevName;
     return S_OK;
 }
 
-STDMETHODIMP PCIDeviceAttachment::COMGETTER(IsPhysicalDevice)(BOOL * aPhysical)
+HRESULT PCIDeviceAttachment::getIsPhysicalDevice(BOOL *aIsPhysicalDevice)
 {
-    CheckComArgOutPointerValid(aPhysical);
-    *aPhysical = m->fPhysical;
+    *aIsPhysicalDevice = m->fPhysical;
     return S_OK;
 }
 
-STDMETHODIMP PCIDeviceAttachment::COMGETTER(HostAddress)(LONG * aHostAddress)
+HRESULT PCIDeviceAttachment::getHostAddress(LONG *aHostAddress)
 {
     *aHostAddress = m->HostAddress;
     return S_OK;
 }
-
-STDMETHODIMP PCIDeviceAttachment::COMGETTER(GuestAddress)(LONG * aGuestAddress)
+HRESULT PCIDeviceAttachment::getGuestAddress(LONG *aGuestAddress)
 {
     *aGuestAddress = m->GuestAddress;
     return S_OK;
 }
-
-#ifdef VBOX_WITH_XPCOM
-NS_DECL_CLASSINFO(PCIDeviceAttachment)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(PCIDeviceAttachment, IPCIDeviceAttachment)
-#endif
Index: trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 50921)
+++ trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 50922)
@@ -9498,5 +9498,5 @@
 
             pda.createObject();
-            pda->loadSettings(this, hpda);
+            pda->i_loadSettings(this, hpda);
             mHWData->mPCIDeviceAssignments.push_back(pda);
         }
@@ -10791,5 +10791,5 @@
             settings::HostPCIDeviceAttachment hpda;
 
-            rc = pda->saveSettings(hpda);
+            rc = pda->i_saveSettings(hpda);
             if (FAILED(rc)) throw rc;
 
