Index: /trunk/src/VBox/Main/include/GuestFileImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestFileImpl.h	(revision 50501)
+++ /trunk/src/VBox/Main/include/GuestFileImpl.h	(revision 50502)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2012-2014 Oracle Corporation
+ * Copyright (C) 2012-2013 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -23,4 +23,5 @@
 #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 50501)
+++ /trunk/src/VBox/Main/include/GuestFsObjInfoImpl.h	(revision 50502)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2012-2014 Oracle Corporation
+ * Copyright (C) 2012 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -20,5 +20,5 @@
 #define ____H_GUESTFSOBJINFOIMPL
 
-#include "GuestFsObjInfoWrap.h"
+#include "VirtualBoxBase.h"
 #include "GuestCtrlImplPrivate.h"
 
@@ -27,39 +27,55 @@
  */
 class ATL_NO_VTABLE GuestFsObjInfo :
-    public GuestFsObjInfoWrap
+    public VirtualBoxBase,
+    VBOX_SCRIPTABLE_IMPL(IGuestFsObjInfo)
 {
 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 50501)
+++ /trunk/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp	(revision 50502)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2012-2014 Oracle Corporation
+ * Copyright (C) 2012 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -87,12 +87,16 @@
 }
 
-// implementation of wrapped private getters/setters for attributes
+// implementation of public getters/setters for attributes
 /////////////////////////////////////////////////////////////////////////////
 
-HRESULT GuestFsObjInfo::getAccessTime(LONG64 *aAccessTime)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aAccessTime = mData.mAccessTime;
@@ -102,9 +106,13 @@
 }
 
-HRESULT GuestFsObjInfo::getAllocatedSize(LONG64 *aAllocatedSize)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aAllocatedSize = mData.mAllocatedSize;
@@ -114,9 +122,13 @@
 }
 
-HRESULT GuestFsObjInfo::getBirthTime(LONG64 *aBirthTime)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aBirthTime = mData.mBirthTime;
@@ -126,9 +138,13 @@
 }
 
-HRESULT GuestFsObjInfo::getChangeTime(LONG64 *aChangeTime)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aChangeTime = mData.mChangeTime;
@@ -138,11 +154,13 @@
 }
 
-
-
-HRESULT GuestFsObjInfo::getDeviceNumber(ULONG *aDeviceNumber)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aDeviceNumber = mData.mDeviceNumber;
@@ -152,21 +170,29 @@
 }
 
-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
+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);
 
     *aGenerationId = mData.mGenerationID;
@@ -176,9 +202,13 @@
 }
 
-HRESULT GuestFsObjInfo::getGID(ULONG *aGID)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aGID = mData.mGID;
@@ -188,21 +218,29 @@
 }
 
-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
+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);
 
     *aHardLinks = mData.mNumHardLinks;
@@ -212,9 +250,13 @@
 }
 
-HRESULT GuestFsObjInfo::getModificationTime(LONG64 *aModificationTime)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aModificationTime = mData.mModificationTime;
@@ -224,21 +266,29 @@
 }
 
-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
+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);
 
     *aNodeId = mData.mNodeID;
@@ -248,9 +298,13 @@
 }
 
-HRESULT GuestFsObjInfo::getNodeIdDevice(ULONG *aNodeIdDevice)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aNodeIdDevice = mData.mNodeIDDevice;
@@ -260,9 +314,13 @@
 }
 
-HRESULT GuestFsObjInfo::getObjectSize(LONG64 *aObjectSize)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aObjectSize = mData.mObjectSize;
@@ -272,9 +330,13 @@
 }
 
-HRESULT GuestFsObjInfo::getType(FsObjType_T *aType)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aType = mData.mType;
@@ -284,9 +346,13 @@
 }
 
-HRESULT GuestFsObjInfo::getUID(ULONG *aUID)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aUID = mData.mUID;
@@ -296,9 +362,13 @@
 }
 
-HRESULT GuestFsObjInfo::getUserFlags(ULONG *aUserFlags)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
+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);
 
     *aUserFlags = mData.mUserFlags;
@@ -308,13 +378,34 @@
 }
 
-HRESULT GuestFsObjInfo::getUserName(com::Utf8Str &aUserName)
-{
-#ifndef VBOX_WITH_GUEST_CONTROL
-    ReturnComNotImplemented();
-#else
-
-    aUserName = mData.mUserName;
-
-    return S_OK;
-#endif /* VBOX_WITH_GUEST_CONTROL */
-}
+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 */
+}
+
Index: /trunk/src/VBox/Main/src-client/xpcom/module.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/xpcom/module.cpp	(revision 50501)
+++ /trunk/src/VBox/Main/src-client/xpcom/module.cpp	(revision 50502)
@@ -73,4 +73,6 @@
 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 50501)
+++ /trunk/src/VBox/Main/testcase/Makefile.kmk	(revision 50502)
@@ -182,6 +182,5 @@
 	tstGuestCtrlParseBuffer.cpp \
 	../src-client/GuestCtrlPrivate.cpp
-tstGuestCtrlParseBuffer_INCS     = ../include \
-								   $(VBOX_MAIN_APIWRAPPER_INCS)
+tstGuestCtrlParseBuffer_INCS     = ../include
 
 
@@ -194,6 +193,5 @@
 	tstGuestCtrlContextID.cpp \
 	../src-client/GuestCtrlPrivate.cpp
-tstGuestCtrlContextID_INCS     = ../include \
-								 $(VBOX_MAIN_APIWRAPPER_INCS)
+tstGuestCtrlContextID_INCS     = ../include
 
 
@@ -248,5 +246,4 @@
 	$(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
 	$(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
-	$(VBOX_MAIN_APIWRAPPER_INCS) \
 	$(dir $(VBOX_XML_SCHEMADEFS_H))
 tstMouseImpl_LIBS      = \
