Index: /trunk/src/VBox/Main/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Main/Makefile.kmk	(revision 50514)
+++ /trunk/src/VBox/Main/Makefile.kmk	(revision 50515)
@@ -1030,4 +1030,9 @@
 VBoxC_VBOX_HEADERS = \
 	include/ConsoleImpl.h
+
+ifdef VBOX_WITH_GUEST_CONTROL
+VBoxC_VBOX_HEADERS += $(VBOX_MAIN_APIWRAPPER_INCS)
+endif # VBOX_WITH_GUEST_CONTROL
+
 VBoxC_VBOX_TRANSLATIONS = \
 	nls/VBoxC_de.ts
Index: /trunk/src/VBox/Main/include/GuestFileImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestFileImpl.h	(revision 50514)
+++ /trunk/src/VBox/Main/include/GuestFileImpl.h	(revision 50515)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2012-2013 Oracle Corporation
+ * Copyright (C) 2012-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -23,5 +23,4 @@
 #include "EventImpl.h"
 
-#include "GuestFsObjInfoImpl.h"
 #include "GuestCtrlImplPrivate.h"
 
Index: /trunk/src/VBox/Main/include/GuestFsObjInfoImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestFsObjInfoImpl.h	(revision 50514)
+++ /trunk/src/VBox/Main/include/GuestFsObjInfoImpl.h	(revision 50515)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -20,5 +20,5 @@
 #define ____H_GUESTFSOBJINFOIMPL
 
-#include "VirtualBoxBase.h"
+#include "GuestFsObjInfoWrap.h"
 #include "GuestCtrlImplPrivate.h"
 
@@ -27,55 +27,39 @@
  */
 class ATL_NO_VTABLE GuestFsObjInfo :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(IGuestFsObjInfo)
+    public GuestFsObjInfoWrap
 {
 public:
     /** @name COM and internal init/term/mapping cruft.
      * @{ */
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(GuestFsObjInfo, IGuestFsObjInfo)
-    DECLARE_NOT_AGGREGATABLE(GuestFsObjInfo)
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-    BEGIN_COM_MAP(GuestFsObjInfo)
-        VBOX_DEFAULT_INTERFACE_ENTRIES(IGuestFsObjInfo)
-        COM_INTERFACE_ENTRY(IFsObjInfo)
-    END_COM_MAP()
     DECLARE_EMPTY_CTOR_DTOR(GuestFsObjInfo)
 
     int     init(const GuestFsObjData &objData);
     void    uninit(void);
+
     HRESULT FinalConstruct(void);
     void    FinalRelease(void);
-    /** @}  */
-
-    /** @name IFsObjInfo interface.
-     * @{ */
-    STDMETHOD(COMGETTER(AccessTime))(LONG64 *aAccessTime);
-    STDMETHOD(COMGETTER(AllocatedSize))(LONG64 *aAllocatedSize);
-    STDMETHOD(COMGETTER(BirthTime))(LONG64 *aBirthTime);
-    STDMETHOD(COMGETTER(ChangeTime))(LONG64 *aChangeTime);
-    STDMETHOD(COMGETTER(DeviceNumber))(ULONG *aDeviceNumber);
-    STDMETHOD(COMGETTER(FileAttributes))(BSTR *aFileAttrs);
-    STDMETHOD(COMGETTER(GenerationId))(ULONG *aGenerationId);
-    STDMETHOD(COMGETTER(GID))(ULONG *aGID);
-    STDMETHOD(COMGETTER(GroupName))(BSTR *aGroupName);
-    STDMETHOD(COMGETTER(HardLinks))(ULONG *aHardLinks);
-    STDMETHOD(COMGETTER(ModificationTime))(LONG64 *aModificationTime);
-    STDMETHOD(COMGETTER(Name))(BSTR *aName);
-    STDMETHOD(COMGETTER(NodeId))(LONG64 *aNodeId);
-    STDMETHOD(COMGETTER(NodeIdDevice))(ULONG *aNodeIdDevice);
-    STDMETHOD(COMGETTER(ObjectSize))(LONG64 *aObjectSize);
-    STDMETHOD(COMGETTER(Type))(FsObjType_T *aType);
-    STDMETHOD(COMGETTER(UID))(ULONG *aUID);
-    STDMETHOD(COMGETTER(UserFlags))(ULONG *aUserFlags);
-    STDMETHOD(COMGETTER(UserName))(BSTR *aUserName);
-    STDMETHOD(COMGETTER(ACL))(BSTR *aACL);
-    /** @}  */
-
-public:
-    /** @name Public internal methods.
-     * @{ */
-    /** @}  */
 
 private:
+
+    // Wrapped GuestFsObjInfo properties.
+    HRESULT getAccessTime(LONG64 *aAccessTime);
+    HRESULT getAllocatedSize(LONG64 *aAllocatedSize);
+    HRESULT getBirthTime(LONG64 *aBirthTime);
+    HRESULT getChangeTime(LONG64 *aChangeTime);
+    HRESULT getDeviceNumber(ULONG *aDeviceNumber);
+    HRESULT getFileAttributes(com::Utf8Str &aFileAttributes);
+    HRESULT getGenerationId(ULONG *aGenerationId);
+    HRESULT getGID(ULONG *aGID);
+    HRESULT getGroupName(com::Utf8Str &aGroupName);
+    HRESULT getHardLinks(ULONG *aHardLinks);
+    HRESULT getModificationTime(LONG64 *aModificationTime);
+    HRESULT getName(com::Utf8Str &aName);
+    HRESULT getNodeId(LONG64 *aNodeId);
+    HRESULT getNodeIdDevice(ULONG *aNodeIdDevice);
+    HRESULT getObjectSize(LONG64 *aObjectSize);
+    HRESULT getType(FsObjType_T *aType);
+    HRESULT getUID(ULONG *aUID);
+    HRESULT getUserFlags(ULONG *aUserFlags);
+    HRESULT getUserName(com::Utf8Str &aUserName);
 
     GuestFsObjData mData;
Index: /trunk/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp	(revision 50514)
+++ /trunk/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp	(revision 50515)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2012 Oracle Corporation
+ * Copyright (C) 2012-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -87,16 +87,12 @@
 }
 
-// implementation of public getters/setters for attributes
+// implementation of wrapped private getters/setters for attributes
 /////////////////////////////////////////////////////////////////////////////
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(AccessTime)(LONG64 *aAccessTime)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aAccessTime);
+HRESULT GuestFsObjInfo::getAccessTime(LONG64 *aAccessTime)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aAccessTime = mData.mAccessTime;
@@ -106,13 +102,9 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(AllocatedSize)(LONG64 *aAllocatedSize)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aAllocatedSize);
+HRESULT GuestFsObjInfo::getAllocatedSize(LONG64 *aAllocatedSize)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aAllocatedSize = mData.mAllocatedSize;
@@ -122,13 +114,9 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(BirthTime)(LONG64 *aBirthTime)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aBirthTime);
+HRESULT GuestFsObjInfo::getBirthTime(LONG64 *aBirthTime)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aBirthTime = mData.mBirthTime;
@@ -138,13 +126,9 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(ChangeTime)(LONG64 *aChangeTime)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aChangeTime);
+HRESULT GuestFsObjInfo::getChangeTime(LONG64 *aChangeTime)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aChangeTime = mData.mChangeTime;
@@ -154,13 +138,11 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(DeviceNumber)(ULONG *aDeviceNumber)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aDeviceNumber);
+
+
+HRESULT GuestFsObjInfo::getDeviceNumber(ULONG *aDeviceNumber)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aDeviceNumber = mData.mDeviceNumber;
@@ -170,29 +152,21 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(FileAttributes)(BSTR *aAttributes)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aAttributes);
-
-    mData.mFileAttrs.cloneTo(aAttributes);
-
-    return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestFsObjInfo::COMGETTER(GenerationId)(ULONG *aGenerationId)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aGenerationId);
+HRESULT GuestFsObjInfo::getFileAttributes(com::Utf8Str &aFileAttributes)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+
+    aFileAttributes = mData.mFileAttrs;
+
+    return S_OK;
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+HRESULT GuestFsObjInfo::getGenerationId(ULONG *aGenerationId)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aGenerationId = mData.mGenerationID;
@@ -202,13 +176,9 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(GID)(ULONG *aGID)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aGID);
+HRESULT GuestFsObjInfo::getGID(ULONG *aGID)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aGID = mData.mGID;
@@ -218,29 +188,21 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(GroupName)(BSTR *aGroupName)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aGroupName);
-
-    mData.mGroupName.cloneTo(aGroupName);
-
-    return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestFsObjInfo::COMGETTER(HardLinks)(ULONG *aHardLinks)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aHardLinks);
+HRESULT GuestFsObjInfo::getGroupName(com::Utf8Str &aGroupName)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+
+    aGroupName = mData.mGroupName;
+
+    return S_OK;
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+HRESULT GuestFsObjInfo::getHardLinks(ULONG *aHardLinks)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aHardLinks = mData.mNumHardLinks;
@@ -250,13 +212,9 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(ModificationTime)(LONG64 *aModificationTime)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aModificationTime);
+HRESULT GuestFsObjInfo::getModificationTime(LONG64 *aModificationTime)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aModificationTime = mData.mModificationTime;
@@ -266,29 +224,21 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(Name)(BSTR *aName)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aName);
-
-    mData.mName.cloneTo(aName);
-
-    return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestFsObjInfo::COMGETTER(NodeId)(LONG64 *aNodeId)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aNodeId);
+HRESULT GuestFsObjInfo::getName(com::Utf8Str &aName)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+
+    aName = mData.mName;
+
+    return S_OK;
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
+
+HRESULT GuestFsObjInfo::getNodeId(LONG64 *aNodeId)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aNodeId = mData.mNodeID;
@@ -298,13 +248,9 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(NodeIdDevice)(ULONG *aNodeIdDevice)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aNodeIdDevice);
+HRESULT GuestFsObjInfo::getNodeIdDevice(ULONG *aNodeIdDevice)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aNodeIdDevice = mData.mNodeIDDevice;
@@ -314,13 +260,9 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(ObjectSize)(LONG64 *aObjectSize)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aObjectSize);
+HRESULT GuestFsObjInfo::getObjectSize(LONG64 *aObjectSize)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aObjectSize = mData.mObjectSize;
@@ -330,13 +272,9 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(Type)(FsObjType_T *aType)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aType);
+HRESULT GuestFsObjInfo::getType(FsObjType_T *aType)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aType = mData.mType;
@@ -346,13 +284,9 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(UID)(ULONG *aUID)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aUID);
+HRESULT GuestFsObjInfo::getUID(ULONG *aUID)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aUID = mData.mUID;
@@ -362,13 +296,9 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(UserFlags)(ULONG *aUserFlags)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aUserFlags);
+HRESULT GuestFsObjInfo::getUserFlags(ULONG *aUserFlags)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
 
     *aUserFlags = mData.mUserFlags;
@@ -378,34 +308,13 @@
 }
 
-STDMETHODIMP GuestFsObjInfo::COMGETTER(UserName)(BSTR *aUserName)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aUserName);
-
-    mData.mUserName.cloneTo(aUserName);
-
-    return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
-STDMETHODIMP GuestFsObjInfo::COMGETTER(ACL)(BSTR *aACL)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    CheckComArgOutPointerValid(aACL);
-
-    mData.mACL.cloneTo(aACL);
-
-    return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
-
+HRESULT GuestFsObjInfo::getUserName(com::Utf8Str &aUserName)
+{
+#ifndef VBOX_WITH_GUEST_CONTROL
+    ReturnComNotImplemented();
+#else
+
+    aUserName = mData.mUserName;
+
+    return S_OK;
+#endif /* VBOX_WITH_GUEST_CONTROL */
+}
Index: /trunk/src/VBox/Main/src-client/xpcom/module.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/xpcom/module.cpp	(revision 50514)
+++ /trunk/src/VBox/Main/src-client/xpcom/module.cpp	(revision 50515)
@@ -73,6 +73,4 @@
 NS_DECL_CLASSINFO(GuestFile)
 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestFile, IGuestFile, IFile)
-NS_DECL_CLASSINFO(GuestFsObjInfo)
-NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestFsObjInfo, IGuestFsObjInfo, IFsObjInfo)
 NS_DECL_CLASSINFO(GuestProcess)
 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestProcess, IGuestProcess, IProcess)
Index: /trunk/src/VBox/Main/testcase/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Main/testcase/Makefile.kmk	(revision 50514)
+++ /trunk/src/VBox/Main/testcase/Makefile.kmk	(revision 50515)
@@ -182,5 +182,6 @@
 	tstGuestCtrlParseBuffer.cpp \
 	../src-client/GuestCtrlPrivate.cpp
-tstGuestCtrlParseBuffer_INCS     = ../include
+tstGuestCtrlParseBuffer_INCS     = ../include \
+								   $(VBOX_MAIN_APIWRAPPER_INCS)
 
 
@@ -193,5 +194,6 @@
 	tstGuestCtrlContextID.cpp \
 	../src-client/GuestCtrlPrivate.cpp
-tstGuestCtrlContextID_INCS     = ../include
+tstGuestCtrlContextID_INCS     = ../include \
+								 $(VBOX_MAIN_APIWRAPPER_INCS)
 
 
