

// ##### BEGINFILE "CloudNetworkWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for ICloudNetwork.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_CLOUDNETWORK

#include "CloudNetworkWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(CloudNetworkWrap)

//
// ICloudNetwork properties
//

STDMETHODIMP CloudNetworkWrap::COMGETTER(NetworkName)(BSTR *aNetworkName)
{
    LogRelFlow(("{%p} %s: enter aNetworkName=%p\n", this, "CloudNetwork::getNetworkName", aNetworkName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNetworkName);
        BSTROutConverter TmpNetworkName(aNetworkName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_NETWORKNAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getNetworkName(TmpNetworkName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_NETWORKNAME_RETURN(this, hrc, 0 /*normal*/,TmpNetworkName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_NETWORKNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_NETWORKNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNetworkName=%ls hrc=%Rhrc\n", this, "CloudNetwork::getNetworkName", *aNetworkName, hrc));
    return hrc;
}

STDMETHODIMP CloudNetworkWrap::COMSETTER(NetworkName)(IN_BSTR aNetworkName)
{
    LogRelFlow(("{%p} %s: enter aNetworkName=%ls\n", this, "CloudNetwork::setNetworkName", aNetworkName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpNetworkName(aNetworkName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_NETWORKNAME_ENTER(this, TmpNetworkName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setNetworkName(TmpNetworkName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_NETWORKNAME_RETURN(this, hrc, 0 /*normal*/,TmpNetworkName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_NETWORKNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_NETWORKNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "CloudNetwork::setNetworkName", hrc));
    return hrc;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(Enabled)(BOOL *aEnabled)
{
    LogRelFlow(("{%p} %s: enter aEnabled=%p\n", this, "CloudNetwork::getEnabled", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_ENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEnabled(aEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_ENABLED_RETURN(this, hrc, 0 /*normal*/,*aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_ENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_ENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEnabled=%RTbool hrc=%Rhrc\n", this, "CloudNetwork::getEnabled", *aEnabled, hrc));
    return hrc;
}

STDMETHODIMP CloudNetworkWrap::COMSETTER(Enabled)(BOOL aEnabled)
{
    LogRelFlow(("{%p} %s: enter aEnabled=%RTbool\n", this, "CloudNetwork::setEnabled", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_ENABLED_ENTER(this, aEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setEnabled(aEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_ENABLED_RETURN(this, hrc, 0 /*normal*/,aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_ENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_ENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "CloudNetwork::setEnabled", hrc));
    return hrc;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(Provider)(BSTR *aProvider)
{
    LogRelFlow(("{%p} %s: enter aProvider=%p\n", this, "CloudNetwork::getProvider", aProvider));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProvider);
        BSTROutConverter TmpProvider(aProvider);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_PROVIDER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProvider(TmpProvider.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_PROVIDER_RETURN(this, hrc, 0 /*normal*/,TmpProvider.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_PROVIDER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_PROVIDER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProvider=%ls hrc=%Rhrc\n", this, "CloudNetwork::getProvider", *aProvider, hrc));
    return hrc;
}

STDMETHODIMP CloudNetworkWrap::COMSETTER(Provider)(IN_BSTR aProvider)
{
    LogRelFlow(("{%p} %s: enter aProvider=%ls\n", this, "CloudNetwork::setProvider", aProvider));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpProvider(aProvider);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_PROVIDER_ENTER(this, TmpProvider.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProvider(TmpProvider.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_PROVIDER_RETURN(this, hrc, 0 /*normal*/,TmpProvider.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_PROVIDER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_PROVIDER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "CloudNetwork::setProvider", hrc));
    return hrc;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(Profile)(BSTR *aProfile)
{
    LogRelFlow(("{%p} %s: enter aProfile=%p\n", this, "CloudNetwork::getProfile", aProfile));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProfile);
        BSTROutConverter TmpProfile(aProfile);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_PROFILE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProfile(TmpProfile.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_PROFILE_RETURN(this, hrc, 0 /*normal*/,TmpProfile.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_PROFILE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_PROFILE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProfile=%ls hrc=%Rhrc\n", this, "CloudNetwork::getProfile", *aProfile, hrc));
    return hrc;
}

STDMETHODIMP CloudNetworkWrap::COMSETTER(Profile)(IN_BSTR aProfile)
{
    LogRelFlow(("{%p} %s: enter aProfile=%ls\n", this, "CloudNetwork::setProfile", aProfile));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpProfile(aProfile);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_PROFILE_ENTER(this, TmpProfile.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProfile(TmpProfile.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_PROFILE_RETURN(this, hrc, 0 /*normal*/,TmpProfile.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_PROFILE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_PROFILE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "CloudNetwork::setProfile", hrc));
    return hrc;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(NetworkId)(BSTR *aNetworkId)
{
    LogRelFlow(("{%p} %s: enter aNetworkId=%p\n", this, "CloudNetwork::getNetworkId", aNetworkId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNetworkId);
        BSTROutConverter TmpNetworkId(aNetworkId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_NETWORKID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getNetworkId(TmpNetworkId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_NETWORKID_RETURN(this, hrc, 0 /*normal*/,TmpNetworkId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_NETWORKID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_GET_NETWORKID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNetworkId=%ls hrc=%Rhrc\n", this, "CloudNetwork::getNetworkId", *aNetworkId, hrc));
    return hrc;
}

STDMETHODIMP CloudNetworkWrap::COMSETTER(NetworkId)(IN_BSTR aNetworkId)
{
    LogRelFlow(("{%p} %s: enter aNetworkId=%ls\n", this, "CloudNetwork::setNetworkId", aNetworkId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpNetworkId(aNetworkId);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_NETWORKID_ENTER(this, TmpNetworkId.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setNetworkId(TmpNetworkId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_NETWORKID_RETURN(this, hrc, 0 /*normal*/,TmpNetworkId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_NETWORKID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORK_SET_NETWORKID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "CloudNetwork::setNetworkId", hrc));
    return hrc;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute1ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute2ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute3ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute4ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute5ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute6ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute7ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute8ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute9ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute10ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute11ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::COMGETTER(InternalAndReservedAttribute12ICloudNetwork)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// ICloudNetwork methods
//

STDMETHODIMP CloudNetworkWrap::InternalAndReservedMethod1ICloudNetwork()
{
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::InternalAndReservedMethod2ICloudNetwork()
{
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::InternalAndReservedMethod3ICloudNetwork()
{
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkWrap::InternalAndReservedMethod4ICloudNetwork()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(CloudNetworkWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(CloudNetworkWrap, ICloudNetwork)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "CloudNetworkWrap.cpp"


// ##### BEGINFILE "DHCPConfigWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IDHCPConfig.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_DHCPCONFIG

#include "DHCPConfigWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(DHCPConfigWrap)

//
// IDHCPConfig properties
//

STDMETHODIMP DHCPConfigWrap::COMGETTER(Scope)(DHCPConfigScope_T *aScope)
{
    LogRelFlow(("{%p} %s: enter aScope=%p\n", this, "DHCPConfig::getScope", aScope));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aScope);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_SCOPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getScope(aScope);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_SCOPE_RETURN(this, hrc, 0 /*normal*/,*aScope);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_SCOPE_RETURN(this, hrc, 1 /*hrc exception*/,*aScope);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_SCOPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aScope);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aScope=%RU32 hrc=%Rhrc\n", this, "DHCPConfig::getScope", *aScope, hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(MinLeaseTime)(ULONG *aMinLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aMinLeaseTime=%p\n", this, "DHCPConfig::getMinLeaseTime", aMinLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMinLeaseTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_MINLEASETIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMinLeaseTime(aMinLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_MINLEASETIME_RETURN(this, hrc, 0 /*normal*/,*aMinLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_MINLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,*aMinLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_MINLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aMinLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMinLeaseTime=%RU32 hrc=%Rhrc\n", this, "DHCPConfig::getMinLeaseTime", *aMinLeaseTime, hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::COMSETTER(MinLeaseTime)(ULONG aMinLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aMinLeaseTime=%RU32\n", this, "DHCPConfig::setMinLeaseTime", aMinLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_MINLEASETIME_ENTER(this, aMinLeaseTime);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMinLeaseTime(aMinLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_MINLEASETIME_RETURN(this, hrc, 0 /*normal*/,aMinLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_MINLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,aMinLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_MINLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,aMinLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPConfig::setMinLeaseTime", hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(DefaultLeaseTime)(ULONG *aDefaultLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aDefaultLeaseTime=%p\n", this, "DHCPConfig::getDefaultLeaseTime", aDefaultLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDefaultLeaseTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_DEFAULTLEASETIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDefaultLeaseTime(aDefaultLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_DEFAULTLEASETIME_RETURN(this, hrc, 0 /*normal*/,*aDefaultLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_DEFAULTLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,*aDefaultLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_DEFAULTLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aDefaultLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDefaultLeaseTime=%RU32 hrc=%Rhrc\n", this, "DHCPConfig::getDefaultLeaseTime", *aDefaultLeaseTime, hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::COMSETTER(DefaultLeaseTime)(ULONG aDefaultLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aDefaultLeaseTime=%RU32\n", this, "DHCPConfig::setDefaultLeaseTime", aDefaultLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_DEFAULTLEASETIME_ENTER(this, aDefaultLeaseTime);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDefaultLeaseTime(aDefaultLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_DEFAULTLEASETIME_RETURN(this, hrc, 0 /*normal*/,aDefaultLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_DEFAULTLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,aDefaultLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_DEFAULTLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,aDefaultLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPConfig::setDefaultLeaseTime", hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(MaxLeaseTime)(ULONG *aMaxLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aMaxLeaseTime=%p\n", this, "DHCPConfig::getMaxLeaseTime", aMaxLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxLeaseTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_MAXLEASETIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxLeaseTime(aMaxLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_MAXLEASETIME_RETURN(this, hrc, 0 /*normal*/,*aMaxLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_MAXLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,*aMaxLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_MAXLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaxLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaxLeaseTime=%RU32 hrc=%Rhrc\n", this, "DHCPConfig::getMaxLeaseTime", *aMaxLeaseTime, hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::COMSETTER(MaxLeaseTime)(ULONG aMaxLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aMaxLeaseTime=%RU32\n", this, "DHCPConfig::setMaxLeaseTime", aMaxLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_MAXLEASETIME_ENTER(this, aMaxLeaseTime);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMaxLeaseTime(aMaxLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_MAXLEASETIME_RETURN(this, hrc, 0 /*normal*/,aMaxLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_MAXLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,aMaxLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_MAXLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,aMaxLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPConfig::setMaxLeaseTime", hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(ForcedOptions)(ComSafeArrayOut(DHCPOption_T, aForcedOptions))
{
    LogRelFlow(("{%p} %s: enter aForcedOptions=%p\n", this, "DHCPConfig::getForcedOptions", aForcedOptions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aForcedOptions);
        ArrayOutConverter<DHCPOption_T> TmpForcedOptions(ComSafeArrayOutArg(aForcedOptions));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_FORCEDOPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getForcedOptions(TmpForcedOptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_FORCEDOPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpForcedOptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_FORCEDOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_FORCEDOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aForcedOptions=%zu hrc=%Rhrc\n", this, "DHCPConfig::getForcedOptions", ComSafeArraySize(*aForcedOptions), hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::COMSETTER(ForcedOptions)(ComSafeArrayIn(DHCPOption_T, aForcedOptions))
{
    LogRelFlow(("{%p} %s: enter aForcedOptions=%zu\n", this, "DHCPConfig::setForcedOptions", ComSafeArraySize(aForcedOptions)));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        ArrayInConverter<DHCPOption_T> TmpForcedOptions(ComSafeArrayInArg(aForcedOptions));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_FORCEDOPTIONS_ENTER(this, (uint32_t)TmpForcedOptions.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setForcedOptions(TmpForcedOptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_FORCEDOPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpForcedOptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_FORCEDOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_FORCEDOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPConfig::setForcedOptions", hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(SuppressedOptions)(ComSafeArrayOut(DHCPOption_T, aSuppressedOptions))
{
    LogRelFlow(("{%p} %s: enter aSuppressedOptions=%p\n", this, "DHCPConfig::getSuppressedOptions", aSuppressedOptions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSuppressedOptions);
        ArrayOutConverter<DHCPOption_T> TmpSuppressedOptions(ComSafeArrayOutArg(aSuppressedOptions));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_SUPPRESSEDOPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSuppressedOptions(TmpSuppressedOptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSuppressedOptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSuppressedOptions=%zu hrc=%Rhrc\n", this, "DHCPConfig::getSuppressedOptions", ComSafeArraySize(*aSuppressedOptions), hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::COMSETTER(SuppressedOptions)(ComSafeArrayIn(DHCPOption_T, aSuppressedOptions))
{
    LogRelFlow(("{%p} %s: enter aSuppressedOptions=%zu\n", this, "DHCPConfig::setSuppressedOptions", ComSafeArraySize(aSuppressedOptions)));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        ArrayInConverter<DHCPOption_T> TmpSuppressedOptions(ComSafeArrayInArg(aSuppressedOptions));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_SUPPRESSEDOPTIONS_ENTER(this, (uint32_t)TmpSuppressedOptions.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setSuppressedOptions(TmpSuppressedOptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSuppressedOptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPConfig::setSuppressedOptions", hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute1IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute2IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute3IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute4IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute5IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute6IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute7IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute8IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute9IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute10IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute11IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute12IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute13IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute14IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute15IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::COMGETTER(InternalAndReservedAttribute16IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IDHCPConfig methods
//

STDMETHODIMP DHCPConfigWrap::SetOption(DHCPOption_T aOption,
                                       DHCPOptionEncoding_T aEncoding,
                                       IN_BSTR aValue)
{
    LogRelFlow(("{%p} %s:enter aOption=%RU32 aEncoding=%RU32 aValue=%ls\n", this, "DHCPConfig::setOption", aOption, aEncoding, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        BSTRInConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SETOPTION_ENTER(this, aOption, aEncoding, TmpValue.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setOption(aOption,
                            aEncoding,
                            TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SETOPTION_RETURN(this, hrc, 0 /*normal*/, aOption, aEncoding, TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SETOPTION_RETURN(this, hrc, 1 /*hrc exception*/, aOption, aEncoding, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_SETOPTION_RETURN(this, hrc, 9 /*unhandled exception*/, aOption, aEncoding, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPConfig::setOption", hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::RemoveOption(DHCPOption_T aOption)
{
    LogRelFlow(("{%p} %s:enter aOption=%RU32\n", this, "DHCPConfig::removeOption", aOption));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVEOPTION_ENTER(this, aOption);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeOption(aOption);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVEOPTION_RETURN(this, hrc, 0 /*normal*/, aOption);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVEOPTION_RETURN(this, hrc, 1 /*hrc exception*/, aOption);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVEOPTION_RETURN(this, hrc, 9 /*unhandled exception*/, aOption);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPConfig::removeOption", hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::RemoveAllOptions()
{
    LogRelFlow(("{%p} %s:enter\n", this, "DHCPConfig::removeAllOptions"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVEALLOPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeAllOptions();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVEALLOPTIONS_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVEALLOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVEALLOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPConfig::removeAllOptions", hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::GetOption(DHCPOption_T aOption,
                                       DHCPOptionEncoding_T *aEncoding,
                                       BSTR *aValue)
{
    LogRelFlow(("{%p} %s:enter aOption=%RU32 aEncoding=%p aValue=%p\n", this, "DHCPConfig::getOption", aOption, aEncoding, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEncoding);
        CheckComArgOutPointerValidThrow(aValue);


        
        
        BSTROutConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GETOPTION_ENTER(this, aOption);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOption(aOption,
                            aEncoding,
                            TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GETOPTION_RETURN(this, hrc, 0 /*normal*/, aOption, *aEncoding, TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GETOPTION_RETURN(this, hrc, 1 /*hrc exception*/, aOption, *aEncoding, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GETOPTION_RETURN(this, hrc, 9 /*unhandled exception*/, aOption, *aEncoding, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEncoding=%RU32 aValue=%ls hrc=%Rhrc\n", this, "DHCPConfig::getOption", *aEncoding, *aValue, hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::GetAllOptions(ComSafeArrayOut(DHCPOption_T, aOptions),
                                           ComSafeArrayOut(DHCPOptionEncoding_T, aEncodings),
                                           ComSafeArrayOut(BSTR, aValues))
{
    LogRelFlow(("{%p} %s:enter aOptions=%p aEncodings=%p aValues=%p\n", this, "DHCPConfig::getAllOptions", aOptions, aEncodings, aValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOptions);
        CheckComArgOutPointerValidThrow(aEncodings);
        CheckComArgOutPointerValidThrow(aValues);


        ArrayOutConverter<DHCPOption_T> TmpOptions(ComSafeArrayOutArg(aOptions));
        ArrayOutConverter<DHCPOptionEncoding_T> TmpEncodings(ComSafeArrayOutArg(aEncodings));
        ArrayBSTROutConverter TmpValues(ComSafeArrayOutArg(aValues));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GETALLOPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAllOptions(TmpOptions.array(),
                                TmpEncodings.array(),
                                TmpValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GETALLOPTIONS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpOptions.array().size(), NULL /*for now*/, (uint32_t)TmpEncodings.array().size(), NULL /*for now*/, (uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GETALLOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_GETALLOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOptions=%zu *aEncodings=%zu aValues=%zu hrc=%Rhrc\n", this, "DHCPConfig::getAllOptions", ComSafeArraySize(*aOptions), ComSafeArraySize(*aEncodings), ComSafeArraySize(*aValues), hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::Remove()
{
    LogRelFlow(("{%p} %s:enter\n", this, "DHCPConfig::remove"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = remove();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVE_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVE_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPCONFIG_REMOVE_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPConfig::remove", hrc));
    return hrc;
}

STDMETHODIMP DHCPConfigWrap::InternalAndReservedMethod1IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::InternalAndReservedMethod2IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::InternalAndReservedMethod3IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::InternalAndReservedMethod4IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::InternalAndReservedMethod5IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::InternalAndReservedMethod6IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::InternalAndReservedMethod7IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPConfigWrap::InternalAndReservedMethod8IDHCPConfig()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(DHCPConfigWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(DHCPConfigWrap, IDHCPConfig)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "DHCPConfigWrap.cpp"


// ##### BEGINFILE "DHCPGroupConditionWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IDHCPGroupCondition.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_DHCPGROUPCONDITION

#include "DHCPGroupConditionWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(DHCPGroupConditionWrap)

//
// IDHCPGroupCondition properties
//

STDMETHODIMP DHCPGroupConditionWrap::COMGETTER(Inclusive)(BOOL *aInclusive)
{
    LogRelFlow(("{%p} %s: enter aInclusive=%p\n", this, "DHCPGroupCondition::getInclusive", aInclusive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aInclusive);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_INCLUSIVE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getInclusive(aInclusive);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_INCLUSIVE_RETURN(this, hrc, 0 /*normal*/,*aInclusive != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_INCLUSIVE_RETURN(this, hrc, 1 /*hrc exception*/,*aInclusive != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_INCLUSIVE_RETURN(this, hrc, 9 /*unhandled exception*/,*aInclusive != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aInclusive=%RTbool hrc=%Rhrc\n", this, "DHCPGroupCondition::getInclusive", *aInclusive, hrc));
    return hrc;
}

STDMETHODIMP DHCPGroupConditionWrap::COMSETTER(Inclusive)(BOOL aInclusive)
{
    LogRelFlow(("{%p} %s: enter aInclusive=%RTbool\n", this, "DHCPGroupCondition::setInclusive", aInclusive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_INCLUSIVE_ENTER(this, aInclusive != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setInclusive(aInclusive != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_INCLUSIVE_RETURN(this, hrc, 0 /*normal*/,aInclusive != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_INCLUSIVE_RETURN(this, hrc, 1 /*hrc exception*/,aInclusive != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_INCLUSIVE_RETURN(this, hrc, 9 /*unhandled exception*/,aInclusive != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPGroupCondition::setInclusive", hrc));
    return hrc;
}

STDMETHODIMP DHCPGroupConditionWrap::COMGETTER(Type)(DHCPGroupConditionType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "DHCPGroupCondition::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "DHCPGroupCondition::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP DHCPGroupConditionWrap::COMSETTER(Type)(DHCPGroupConditionType_T aType)
{
    LogRelFlow(("{%p} %s: enter aType=%RU32\n", this, "DHCPGroupCondition::setType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_TYPE_ENTER(this, aType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_TYPE_RETURN(this, hrc, 0 /*normal*/,aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPGroupCondition::setType", hrc));
    return hrc;
}

STDMETHODIMP DHCPGroupConditionWrap::COMGETTER(Value)(BSTR *aValue)
{
    LogRelFlow(("{%p} %s: enter aValue=%p\n", this, "DHCPGroupCondition::getValue", aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);
        BSTROutConverter TmpValue(aValue);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_VALUE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getValue(TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_VALUE_RETURN(this, hrc, 0 /*normal*/,TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_VALUE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_GET_VALUE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aValue=%ls hrc=%Rhrc\n", this, "DHCPGroupCondition::getValue", *aValue, hrc));
    return hrc;
}

STDMETHODIMP DHCPGroupConditionWrap::COMSETTER(Value)(IN_BSTR aValue)
{
    LogRelFlow(("{%p} %s: enter aValue=%ls\n", this, "DHCPGroupCondition::setValue", aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_VALUE_ENTER(this, TmpValue.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setValue(TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_VALUE_RETURN(this, hrc, 0 /*normal*/,TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_VALUE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_SET_VALUE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPGroupCondition::setValue", hrc));
    return hrc;
}

STDMETHODIMP DHCPGroupConditionWrap::COMGETTER(InternalAndReservedAttribute1IDHCPGroupCondition)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPGroupConditionWrap::COMGETTER(InternalAndReservedAttribute2IDHCPGroupCondition)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPGroupConditionWrap::COMGETTER(InternalAndReservedAttribute3IDHCPGroupCondition)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IDHCPGroupCondition methods
//

STDMETHODIMP DHCPGroupConditionWrap::Remove()
{
    LogRelFlow(("{%p} %s:enter\n", this, "DHCPGroupCondition::remove"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_REMOVE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = remove();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_REMOVE_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_REMOVE_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPGROUPCONDITION_REMOVE_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPGroupCondition::remove", hrc));
    return hrc;
}

STDMETHODIMP DHCPGroupConditionWrap::InternalAndReservedMethod1IDHCPGroupCondition()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPGroupConditionWrap::InternalAndReservedMethod2IDHCPGroupCondition()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPGroupConditionWrap::InternalAndReservedMethod3IDHCPGroupCondition()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(DHCPGroupConditionWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(DHCPGroupConditionWrap, IDHCPGroupCondition)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "DHCPGroupConditionWrap.cpp"


// ##### BEGINFILE "DHCPIndividualConfigWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IDHCPIndividualConfig.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_DHCPINDIVIDUALCONFIG

#include "DHCPIndividualConfigWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(DHCPIndividualConfigWrap)

//
// IDHCPConfig properties
//

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(Scope)(DHCPConfigScope_T *aScope)
{
    LogRelFlow(("{%p} %s: enter aScope=%p\n", this, "DHCPIndividualConfig::getScope", aScope));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aScope);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SCOPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getScope(aScope);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SCOPE_RETURN(this, hrc, 0 /*normal*/,*aScope);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SCOPE_RETURN(this, hrc, 1 /*hrc exception*/,*aScope);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SCOPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aScope);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aScope=%RU32 hrc=%Rhrc\n", this, "DHCPIndividualConfig::getScope", *aScope, hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(MinLeaseTime)(ULONG *aMinLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aMinLeaseTime=%p\n", this, "DHCPIndividualConfig::getMinLeaseTime", aMinLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMinLeaseTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MINLEASETIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMinLeaseTime(aMinLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MINLEASETIME_RETURN(this, hrc, 0 /*normal*/,*aMinLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MINLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,*aMinLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MINLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aMinLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMinLeaseTime=%RU32 hrc=%Rhrc\n", this, "DHCPIndividualConfig::getMinLeaseTime", *aMinLeaseTime, hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMSETTER(MinLeaseTime)(ULONG aMinLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aMinLeaseTime=%RU32\n", this, "DHCPIndividualConfig::setMinLeaseTime", aMinLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_MINLEASETIME_ENTER(this, aMinLeaseTime);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMinLeaseTime(aMinLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_MINLEASETIME_RETURN(this, hrc, 0 /*normal*/,aMinLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_MINLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,aMinLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_MINLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,aMinLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPIndividualConfig::setMinLeaseTime", hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(DefaultLeaseTime)(ULONG *aDefaultLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aDefaultLeaseTime=%p\n", this, "DHCPIndividualConfig::getDefaultLeaseTime", aDefaultLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDefaultLeaseTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_DEFAULTLEASETIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDefaultLeaseTime(aDefaultLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_DEFAULTLEASETIME_RETURN(this, hrc, 0 /*normal*/,*aDefaultLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_DEFAULTLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,*aDefaultLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_DEFAULTLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aDefaultLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDefaultLeaseTime=%RU32 hrc=%Rhrc\n", this, "DHCPIndividualConfig::getDefaultLeaseTime", *aDefaultLeaseTime, hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMSETTER(DefaultLeaseTime)(ULONG aDefaultLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aDefaultLeaseTime=%RU32\n", this, "DHCPIndividualConfig::setDefaultLeaseTime", aDefaultLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_DEFAULTLEASETIME_ENTER(this, aDefaultLeaseTime);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDefaultLeaseTime(aDefaultLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_DEFAULTLEASETIME_RETURN(this, hrc, 0 /*normal*/,aDefaultLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_DEFAULTLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,aDefaultLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_DEFAULTLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,aDefaultLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPIndividualConfig::setDefaultLeaseTime", hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(MaxLeaseTime)(ULONG *aMaxLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aMaxLeaseTime=%p\n", this, "DHCPIndividualConfig::getMaxLeaseTime", aMaxLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxLeaseTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MAXLEASETIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxLeaseTime(aMaxLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MAXLEASETIME_RETURN(this, hrc, 0 /*normal*/,*aMaxLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MAXLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,*aMaxLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MAXLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaxLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaxLeaseTime=%RU32 hrc=%Rhrc\n", this, "DHCPIndividualConfig::getMaxLeaseTime", *aMaxLeaseTime, hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMSETTER(MaxLeaseTime)(ULONG aMaxLeaseTime)
{
    LogRelFlow(("{%p} %s: enter aMaxLeaseTime=%RU32\n", this, "DHCPIndividualConfig::setMaxLeaseTime", aMaxLeaseTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_MAXLEASETIME_ENTER(this, aMaxLeaseTime);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMaxLeaseTime(aMaxLeaseTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_MAXLEASETIME_RETURN(this, hrc, 0 /*normal*/,aMaxLeaseTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_MAXLEASETIME_RETURN(this, hrc, 1 /*hrc exception*/,aMaxLeaseTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_MAXLEASETIME_RETURN(this, hrc, 9 /*unhandled exception*/,aMaxLeaseTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPIndividualConfig::setMaxLeaseTime", hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(ForcedOptions)(ComSafeArrayOut(DHCPOption_T, aForcedOptions))
{
    LogRelFlow(("{%p} %s: enter aForcedOptions=%p\n", this, "DHCPIndividualConfig::getForcedOptions", aForcedOptions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aForcedOptions);
        ArrayOutConverter<DHCPOption_T> TmpForcedOptions(ComSafeArrayOutArg(aForcedOptions));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_FORCEDOPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getForcedOptions(TmpForcedOptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_FORCEDOPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpForcedOptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_FORCEDOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_FORCEDOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aForcedOptions=%zu hrc=%Rhrc\n", this, "DHCPIndividualConfig::getForcedOptions", ComSafeArraySize(*aForcedOptions), hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMSETTER(ForcedOptions)(ComSafeArrayIn(DHCPOption_T, aForcedOptions))
{
    LogRelFlow(("{%p} %s: enter aForcedOptions=%zu\n", this, "DHCPIndividualConfig::setForcedOptions", ComSafeArraySize(aForcedOptions)));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        ArrayInConverter<DHCPOption_T> TmpForcedOptions(ComSafeArrayInArg(aForcedOptions));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_FORCEDOPTIONS_ENTER(this, (uint32_t)TmpForcedOptions.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setForcedOptions(TmpForcedOptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_FORCEDOPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpForcedOptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_FORCEDOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_FORCEDOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPIndividualConfig::setForcedOptions", hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(SuppressedOptions)(ComSafeArrayOut(DHCPOption_T, aSuppressedOptions))
{
    LogRelFlow(("{%p} %s: enter aSuppressedOptions=%p\n", this, "DHCPIndividualConfig::getSuppressedOptions", aSuppressedOptions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSuppressedOptions);
        ArrayOutConverter<DHCPOption_T> TmpSuppressedOptions(ComSafeArrayOutArg(aSuppressedOptions));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SUPPRESSEDOPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSuppressedOptions(TmpSuppressedOptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSuppressedOptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSuppressedOptions=%zu hrc=%Rhrc\n", this, "DHCPIndividualConfig::getSuppressedOptions", ComSafeArraySize(*aSuppressedOptions), hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMSETTER(SuppressedOptions)(ComSafeArrayIn(DHCPOption_T, aSuppressedOptions))
{
    LogRelFlow(("{%p} %s: enter aSuppressedOptions=%zu\n", this, "DHCPIndividualConfig::setSuppressedOptions", ComSafeArraySize(aSuppressedOptions)));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        ArrayInConverter<DHCPOption_T> TmpSuppressedOptions(ComSafeArrayInArg(aSuppressedOptions));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_SUPPRESSEDOPTIONS_ENTER(this, (uint32_t)TmpSuppressedOptions.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setSuppressedOptions(TmpSuppressedOptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSuppressedOptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_SUPPRESSEDOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPIndividualConfig::setSuppressedOptions", hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute1IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute2IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute3IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute4IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute5IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute6IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute7IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute8IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute9IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute10IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute11IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute12IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute13IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute14IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute15IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute16IDHCPConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IDHCPIndividualConfig properties
//

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(MACAddress)(BSTR *aMACAddress)
{
    LogRelFlow(("{%p} %s: enter aMACAddress=%p\n", this, "DHCPIndividualConfig::getMACAddress", aMACAddress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMACAddress);
        BSTROutConverter TmpMACAddress(aMACAddress);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MACADDRESS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMACAddress(TmpMACAddress.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MACADDRESS_RETURN(this, hrc, 0 /*normal*/,TmpMACAddress.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MACADDRESS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MACADDRESS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMACAddress=%ls hrc=%Rhrc\n", this, "DHCPIndividualConfig::getMACAddress", *aMACAddress, hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(MachineId)(BSTR *aMachineId)
{
    LogRelFlow(("{%p} %s: enter aMachineId=%p\n", this, "DHCPIndividualConfig::getMachineId", aMachineId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMachineId);
        UuidOutConverter TmpMachineId(aMachineId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MACHINEID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMachineId(TmpMachineId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MACHINEID_RETURN(this, hrc, 0 /*normal*/,TmpMachineId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MACHINEID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_MACHINEID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMachineId=%ls hrc=%Rhrc\n", this, "DHCPIndividualConfig::getMachineId", *aMachineId, hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(Slot)(ULONG *aSlot)
{
    LogRelFlow(("{%p} %s: enter aSlot=%p\n", this, "DHCPIndividualConfig::getSlot", aSlot));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSlot);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SLOT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSlot(aSlot);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SLOT_RETURN(this, hrc, 0 /*normal*/,*aSlot);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SLOT_RETURN(this, hrc, 1 /*hrc exception*/,*aSlot);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_SLOT_RETURN(this, hrc, 9 /*unhandled exception*/,*aSlot);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSlot=%RU32 hrc=%Rhrc\n", this, "DHCPIndividualConfig::getSlot", *aSlot, hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(FixedAddress)(BSTR *aFixedAddress)
{
    LogRelFlow(("{%p} %s: enter aFixedAddress=%p\n", this, "DHCPIndividualConfig::getFixedAddress", aFixedAddress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFixedAddress);
        BSTROutConverter TmpFixedAddress(aFixedAddress);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_FIXEDADDRESS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFixedAddress(TmpFixedAddress.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_FIXEDADDRESS_RETURN(this, hrc, 0 /*normal*/,TmpFixedAddress.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_FIXEDADDRESS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GET_FIXEDADDRESS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFixedAddress=%ls hrc=%Rhrc\n", this, "DHCPIndividualConfig::getFixedAddress", *aFixedAddress, hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMSETTER(FixedAddress)(IN_BSTR aFixedAddress)
{
    LogRelFlow(("{%p} %s: enter aFixedAddress=%ls\n", this, "DHCPIndividualConfig::setFixedAddress", aFixedAddress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpFixedAddress(aFixedAddress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_FIXEDADDRESS_ENTER(this, TmpFixedAddress.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setFixedAddress(TmpFixedAddress.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_FIXEDADDRESS_RETURN(this, hrc, 0 /*normal*/,TmpFixedAddress.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_FIXEDADDRESS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SET_FIXEDADDRESS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPIndividualConfig::setFixedAddress", hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute1IDHCPIndividualConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute2IDHCPIndividualConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute3IDHCPIndividualConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute4IDHCPIndividualConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute5IDHCPIndividualConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute6IDHCPIndividualConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute7IDHCPIndividualConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::COMGETTER(InternalAndReservedAttribute8IDHCPIndividualConfig)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IDHCPConfig methods
//

STDMETHODIMP DHCPIndividualConfigWrap::SetOption(DHCPOption_T aOption,
                                                 DHCPOptionEncoding_T aEncoding,
                                                 IN_BSTR aValue)
{
    LogRelFlow(("{%p} %s:enter aOption=%RU32 aEncoding=%RU32 aValue=%ls\n", this, "DHCPIndividualConfig::setOption", aOption, aEncoding, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        BSTRInConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SETOPTION_ENTER(this, aOption, aEncoding, TmpValue.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setOption(aOption,
                            aEncoding,
                            TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SETOPTION_RETURN(this, hrc, 0 /*normal*/, aOption, aEncoding, TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SETOPTION_RETURN(this, hrc, 1 /*hrc exception*/, aOption, aEncoding, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_SETOPTION_RETURN(this, hrc, 9 /*unhandled exception*/, aOption, aEncoding, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPIndividualConfig::setOption", hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::RemoveOption(DHCPOption_T aOption)
{
    LogRelFlow(("{%p} %s:enter aOption=%RU32\n", this, "DHCPIndividualConfig::removeOption", aOption));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVEOPTION_ENTER(this, aOption);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeOption(aOption);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVEOPTION_RETURN(this, hrc, 0 /*normal*/, aOption);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVEOPTION_RETURN(this, hrc, 1 /*hrc exception*/, aOption);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVEOPTION_RETURN(this, hrc, 9 /*unhandled exception*/, aOption);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPIndividualConfig::removeOption", hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::RemoveAllOptions()
{
    LogRelFlow(("{%p} %s:enter\n", this, "DHCPIndividualConfig::removeAllOptions"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVEALLOPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeAllOptions();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVEALLOPTIONS_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVEALLOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVEALLOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPIndividualConfig::removeAllOptions", hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::GetOption(DHCPOption_T aOption,
                                                 DHCPOptionEncoding_T *aEncoding,
                                                 BSTR *aValue)
{
    LogRelFlow(("{%p} %s:enter aOption=%RU32 aEncoding=%p aValue=%p\n", this, "DHCPIndividualConfig::getOption", aOption, aEncoding, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEncoding);
        CheckComArgOutPointerValidThrow(aValue);


        
        
        BSTROutConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GETOPTION_ENTER(this, aOption);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOption(aOption,
                            aEncoding,
                            TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GETOPTION_RETURN(this, hrc, 0 /*normal*/, aOption, *aEncoding, TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GETOPTION_RETURN(this, hrc, 1 /*hrc exception*/, aOption, *aEncoding, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GETOPTION_RETURN(this, hrc, 9 /*unhandled exception*/, aOption, *aEncoding, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEncoding=%RU32 aValue=%ls hrc=%Rhrc\n", this, "DHCPIndividualConfig::getOption", *aEncoding, *aValue, hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::GetAllOptions(ComSafeArrayOut(DHCPOption_T, aOptions),
                                                     ComSafeArrayOut(DHCPOptionEncoding_T, aEncodings),
                                                     ComSafeArrayOut(BSTR, aValues))
{
    LogRelFlow(("{%p} %s:enter aOptions=%p aEncodings=%p aValues=%p\n", this, "DHCPIndividualConfig::getAllOptions", aOptions, aEncodings, aValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOptions);
        CheckComArgOutPointerValidThrow(aEncodings);
        CheckComArgOutPointerValidThrow(aValues);


        ArrayOutConverter<DHCPOption_T> TmpOptions(ComSafeArrayOutArg(aOptions));
        ArrayOutConverter<DHCPOptionEncoding_T> TmpEncodings(ComSafeArrayOutArg(aEncodings));
        ArrayBSTROutConverter TmpValues(ComSafeArrayOutArg(aValues));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GETALLOPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAllOptions(TmpOptions.array(),
                                TmpEncodings.array(),
                                TmpValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GETALLOPTIONS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpOptions.array().size(), NULL /*for now*/, (uint32_t)TmpEncodings.array().size(), NULL /*for now*/, (uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GETALLOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_GETALLOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOptions=%zu *aEncodings=%zu aValues=%zu hrc=%Rhrc\n", this, "DHCPIndividualConfig::getAllOptions", ComSafeArraySize(*aOptions), ComSafeArraySize(*aEncodings), ComSafeArraySize(*aValues), hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::Remove()
{
    LogRelFlow(("{%p} %s:enter\n", this, "DHCPIndividualConfig::remove"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = remove();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVE_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVE_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DHCPINDIVIDUALCONFIG_REMOVE_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DHCPIndividualConfig::remove", hrc));
    return hrc;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod1IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod2IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod3IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod4IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod5IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod6IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod7IDHCPConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod8IDHCPConfig()
{
    return E_NOTIMPL;
}

//
// IDHCPIndividualConfig methods
//

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod1IDHCPIndividualConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod2IDHCPIndividualConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod3IDHCPIndividualConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod4IDHCPIndividualConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod5IDHCPIndividualConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod6IDHCPIndividualConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod7IDHCPIndividualConfig()
{
    return E_NOTIMPL;
}

STDMETHODIMP DHCPIndividualConfigWrap::InternalAndReservedMethod8IDHCPIndividualConfig()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(DHCPIndividualConfigWrap)
NS_IMPL_THREADSAFE_ISUPPORTS2_CI(DHCPIndividualConfigWrap, IDHCPIndividualConfig, IDHCPConfig)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "DHCPIndividualConfigWrap.cpp"


// ##### BEGINFILE "ApplianceWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IAppliance.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_APPLIANCE

#include "ApplianceWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(ApplianceWrap)

//
// IAppliance properties
//

STDMETHODIMP ApplianceWrap::COMGETTER(Path)(BSTR *aPath)
{
    LogRelFlow(("{%p} %s: enter aPath=%p\n", this, "Appliance::getPath", aPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPath);
        BSTROutConverter TmpPath(aPath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_PATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPath(TmpPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_PATH_RETURN(this, hrc, 0 /*normal*/,TmpPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_PATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_PATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPath=%ls hrc=%Rhrc\n", this, "Appliance::getPath", *aPath, hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::COMGETTER(Disks)(ComSafeArrayOut(BSTR, aDisks))
{
    LogRelFlow(("{%p} %s: enter aDisks=%p\n", this, "Appliance::getDisks", aDisks));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDisks);
        ArrayBSTROutConverter TmpDisks(ComSafeArrayOutArg(aDisks));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_DISKS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDisks(TmpDisks.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_DISKS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpDisks.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_DISKS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_DISKS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDisks=%zu hrc=%Rhrc\n", this, "Appliance::getDisks", ComSafeArraySize(*aDisks), hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::COMGETTER(VirtualSystemDescriptions)(ComSafeArrayOut(IVirtualSystemDescription *, aVirtualSystemDescriptions))
{
    LogRelFlow(("{%p} %s: enter aVirtualSystemDescriptions=%p\n", this, "Appliance::getVirtualSystemDescriptions", aVirtualSystemDescriptions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVirtualSystemDescriptions);
        ArrayComTypeOutConverter<IVirtualSystemDescription> TmpVirtualSystemDescriptions(ComSafeArrayOutArg(aVirtualSystemDescriptions));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_VIRTUALSYSTEMDESCRIPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVirtualSystemDescriptions(TmpVirtualSystemDescriptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_VIRTUALSYSTEMDESCRIPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpVirtualSystemDescriptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_VIRTUALSYSTEMDESCRIPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_VIRTUALSYSTEMDESCRIPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVirtualSystemDescriptions=%zu hrc=%Rhrc\n", this, "Appliance::getVirtualSystemDescriptions", ComSafeArraySize(*aVirtualSystemDescriptions), hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::COMGETTER(Machines)(ComSafeArrayOut(BSTR, aMachines))
{
    LogRelFlow(("{%p} %s: enter aMachines=%p\n", this, "Appliance::getMachines", aMachines));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMachines);
        ArrayBSTROutConverter TmpMachines(ComSafeArrayOutArg(aMachines));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_MACHINES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMachines(TmpMachines.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_MACHINES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpMachines.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_MACHINES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_MACHINES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMachines=%zu hrc=%Rhrc\n", this, "Appliance::getMachines", ComSafeArraySize(*aMachines), hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::COMGETTER(Certificate)(ICertificate **aCertificate)
{
    LogRelFlow(("{%p} %s: enter aCertificate=%p\n", this, "Appliance::getCertificate", aCertificate));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCertificate);
        ComTypeOutConverter<ICertificate> TmpCertificate(aCertificate);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_CERTIFICATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCertificate(TmpCertificate.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_CERTIFICATE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpCertificate.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_CERTIFICATE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GET_CERTIFICATE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCertificate=%p hrc=%Rhrc\n", this, "Appliance::getCertificate", *aCertificate, hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::COMGETTER(InternalAndReservedAttribute1IAppliance)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::COMGETTER(InternalAndReservedAttribute2IAppliance)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::COMGETTER(InternalAndReservedAttribute3IAppliance)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::COMGETTER(InternalAndReservedAttribute4IAppliance)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::COMGETTER(InternalAndReservedAttribute5IAppliance)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::COMGETTER(InternalAndReservedAttribute6IAppliance)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::COMGETTER(InternalAndReservedAttribute7IAppliance)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::COMGETTER(InternalAndReservedAttribute8IAppliance)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IAppliance methods
//

STDMETHODIMP ApplianceWrap::Read(IN_BSTR aFile,
                                 IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aFile=%ls aProgress=%p\n", this, "Appliance::read", aFile, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        BSTRInConverter TmpFile(aFile);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_READ_ENTER(this, TmpFile.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = read(TmpFile.str(),
                       TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_READ_RETURN(this, hrc, 0 /*normal*/, TmpFile.str().c_str(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_READ_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_READ_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Appliance::read", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::Interpret()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Appliance::interpret"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_INTERPRET_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = interpret();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_INTERPRET_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_INTERPRET_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_INTERPRET_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Appliance::interpret", hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::ImportMachines(ComSafeArrayIn(ImportOptions_T, aOptions),
                                           IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aOptions=%zu aProgress=%p\n", this, "Appliance::importMachines", aOptions, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ArrayInConverter<ImportOptions_T> TmpOptions(ComSafeArrayInArg(aOptions));
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_IMPORTMACHINES_ENTER(this, (uint32_t)TmpOptions.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = importMachines(TmpOptions.array(),
                                 TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_IMPORTMACHINES_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpOptions.array().size(), NULL /*for now*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_IMPORTMACHINES_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_IMPORTMACHINES_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Appliance::importMachines", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::CreateVFSExplorer(IN_BSTR aURI,
                                              IVFSExplorer **aExplorer)
{
    LogRelFlow(("{%p} %s:enter aURI=%ls aExplorer=%p\n", this, "Appliance::createVFSExplorer", aURI, aExplorer));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aExplorer);


        BSTRInConverter TmpURI(aURI);
        ComTypeOutConverter<IVFSExplorer> TmpExplorer(aExplorer);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_CREATEVFSEXPLORER_ENTER(this, TmpURI.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createVFSExplorer(TmpURI.str(),
                                    TmpExplorer.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_CREATEVFSEXPLORER_RETURN(this, hrc, 0 /*normal*/, TmpURI.str().c_str(), (void *)TmpExplorer.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_CREATEVFSEXPLORER_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_CREATEVFSEXPLORER_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aExplorer=%p hrc=%Rhrc\n", this, "Appliance::createVFSExplorer", *aExplorer, hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::Write(IN_BSTR aFormat,
                                  ComSafeArrayIn(ExportOptions_T, aOptions),
                                  IN_BSTR aPath,
                                  IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aFormat=%ls aOptions=%zu aPath=%ls aProgress=%p\n", this, "Appliance::write", aFormat, aOptions, aPath, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        BSTRInConverter TmpFormat(aFormat);
        ArrayInConverter<ExportOptions_T> TmpOptions(ComSafeArrayInArg(aOptions));
        BSTRInConverter TmpPath(aPath);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_WRITE_ENTER(this, TmpFormat.str().c_str(), (uint32_t)TmpOptions.array().size(), NULL /*for now*/, TmpPath.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = write(TmpFormat.str(),
                        TmpOptions.array(),
                        TmpPath.str(),
                        TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_WRITE_RETURN(this, hrc, 0 /*normal*/, TmpFormat.str().c_str(), (uint32_t)TmpOptions.array().size(), NULL /*for now*/, TmpPath.str().c_str(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_WRITE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_WRITE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Appliance::write", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::GetWarnings(ComSafeArrayOut(BSTR, aWarnings))
{
    LogRelFlow(("{%p} %s:enter aWarnings=%p\n", this, "Appliance::getWarnings", aWarnings));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWarnings);


        ArrayBSTROutConverter TmpWarnings(ComSafeArrayOutArg(aWarnings));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETWARNINGS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWarnings(TmpWarnings.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETWARNINGS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpWarnings.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETWARNINGS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETWARNINGS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aWarnings=%zu hrc=%Rhrc\n", this, "Appliance::getWarnings", ComSafeArraySize(*aWarnings), hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::GetPasswordIds(ComSafeArrayOut(BSTR, aIdentifiers))
{
    LogRelFlow(("{%p} %s:enter aIdentifiers=%p\n", this, "Appliance::getPasswordIds", aIdentifiers));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aIdentifiers);


        ArrayBSTROutConverter TmpIdentifiers(ComSafeArrayOutArg(aIdentifiers));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETPASSWORDIDS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPasswordIds(TmpIdentifiers.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETPASSWORDIDS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpIdentifiers.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETPASSWORDIDS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETPASSWORDIDS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aIdentifiers=%zu hrc=%Rhrc\n", this, "Appliance::getPasswordIds", ComSafeArraySize(*aIdentifiers), hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::GetMediumIdsForPasswordId(IN_BSTR aPasswordId,
                                                      ComSafeArrayOut(BSTR, aIdentifiers))
{
    LogRelFlow(("{%p} %s:enter aPasswordId=%ls aIdentifiers=%p\n", this, "Appliance::getMediumIdsForPasswordId", aPasswordId, aIdentifiers));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aIdentifiers);


        BSTRInConverter TmpPasswordId(aPasswordId);
        ArrayUuidOutConverter TmpIdentifiers(ComSafeArrayOutArg(aIdentifiers));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETMEDIUMIDSFORPASSWORDID_ENTER(this, TmpPasswordId.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMediumIdsForPasswordId(TmpPasswordId.str(),
                                            TmpIdentifiers.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETMEDIUMIDSFORPASSWORDID_RETURN(this, hrc, 0 /*normal*/, TmpPasswordId.str().c_str(), (uint32_t)TmpIdentifiers.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETMEDIUMIDSFORPASSWORDID_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_GETMEDIUMIDSFORPASSWORDID_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aIdentifiers=%zu hrc=%Rhrc\n", this, "Appliance::getMediumIdsForPasswordId", ComSafeArraySize(*aIdentifiers), hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::AddPasswords(ComSafeArrayIn(IN_BSTR, aIdentifiers),
                                         ComSafeArrayIn(IN_BSTR, aPasswords))
{
    LogRelFlow(("{%p} %s:enter aIdentifiers=%zu aPasswords=%zu\n", this, "Appliance::addPasswords", aIdentifiers, aPasswords));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ArrayBSTRInConverter TmpIdentifiers(ComSafeArrayInArg(aIdentifiers));
        ArrayBSTRInConverter TmpPasswords(ComSafeArrayInArg(aPasswords));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_ADDPASSWORDS_ENTER(this, (uint32_t)TmpIdentifiers.array().size(), NULL /*for now*/, (uint32_t)TmpPasswords.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = addPasswords(TmpIdentifiers.array(),
                               TmpPasswords.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_ADDPASSWORDS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpIdentifiers.array().size(), NULL /*for now*/, (uint32_t)TmpPasswords.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_ADDPASSWORDS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_ADDPASSWORDS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Appliance::addPasswords", hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::CreateVirtualSystemDescriptions(ULONG aRequested,
                                                            ULONG *aCreated)
{
    LogRelFlow(("{%p} %s:enter aRequested=%RU32 aCreated=%p\n", this, "Appliance::createVirtualSystemDescriptions", aRequested, aCreated));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCreated);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_CREATEVIRTUALSYSTEMDESCRIPTIONS_ENTER(this, aRequested);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createVirtualSystemDescriptions(aRequested,
                                                  aCreated);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_CREATEVIRTUALSYSTEMDESCRIPTIONS_RETURN(this, hrc, 0 /*normal*/, aRequested, *aCreated);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_CREATEVIRTUALSYSTEMDESCRIPTIONS_RETURN(this, hrc, 1 /*hrc exception*/, aRequested, *aCreated);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_APPLIANCE_CREATEVIRTUALSYSTEMDESCRIPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/, aRequested, *aCreated);
#endif
    }

    LogRelFlow(("{%p} %s: leave aCreated=%RU32 hrc=%Rhrc\n", this, "Appliance::createVirtualSystemDescriptions", *aCreated, hrc));
    return hrc;
}

STDMETHODIMP ApplianceWrap::InternalAndReservedMethod1IAppliance()
{
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::InternalAndReservedMethod2IAppliance()
{
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::InternalAndReservedMethod3IAppliance()
{
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::InternalAndReservedMethod4IAppliance()
{
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::InternalAndReservedMethod5IAppliance()
{
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::InternalAndReservedMethod6IAppliance()
{
    return E_NOTIMPL;
}

STDMETHODIMP ApplianceWrap::InternalAndReservedMethod7IAppliance()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(ApplianceWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ApplianceWrap, IAppliance)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "ApplianceWrap.cpp"


// ##### BEGINFILE "UnattendedWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IUnattended.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_UNATTENDED

#include "UnattendedWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(UnattendedWrap)

//
// IUnattended properties
//

STDMETHODIMP UnattendedWrap::COMGETTER(IsoPath)(BSTR *aIsoPath)
{
    LogRelFlow(("{%p} %s: enter aIsoPath=%p\n", this, "Unattended::getIsoPath", aIsoPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aIsoPath);
        BSTROutConverter TmpIsoPath(aIsoPath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_ISOPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getIsoPath(TmpIsoPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_ISOPATH_RETURN(this, hrc, 0 /*normal*/,TmpIsoPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_ISOPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_ISOPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aIsoPath=%ls hrc=%Rhrc\n", this, "Unattended::getIsoPath", *aIsoPath, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(IsoPath)(IN_BSTR aIsoPath)
{
    LogRelFlow(("{%p} %s: enter aIsoPath=%ls\n", this, "Unattended::setIsoPath", aIsoPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpIsoPath(aIsoPath);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_ISOPATH_ENTER(this, TmpIsoPath.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setIsoPath(TmpIsoPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_ISOPATH_RETURN(this, hrc, 0 /*normal*/,TmpIsoPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_ISOPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_ISOPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setIsoPath", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(Machine)(IMachine **aMachine)
{
    LogRelFlow(("{%p} %s: enter aMachine=%p\n", this, "Unattended::getMachine", aMachine));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMachine);
        ComTypeOutConverter<IMachine> TmpMachine(aMachine);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_MACHINE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMachine(TmpMachine.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_MACHINE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpMachine.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_MACHINE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_MACHINE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMachine=%p hrc=%Rhrc\n", this, "Unattended::getMachine", *aMachine, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(Machine)(IMachine *aMachine)
{
    LogRelFlow(("{%p} %s: enter aMachine=%p\n", this, "Unattended::setMachine", aMachine));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        ComTypeInConverter<IMachine> TmpMachine(aMachine);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_MACHINE_ENTER(this, (void *)TmpMachine.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMachine(TmpMachine.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_MACHINE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpMachine.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_MACHINE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_MACHINE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setMachine", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(User)(BSTR *aUser)
{
    LogRelFlow(("{%p} %s: enter aUser=%p\n", this, "Unattended::getUser", aUser));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUser);
        BSTROutConverter TmpUser(aUser);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_USER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUser(TmpUser.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_USER_RETURN(this, hrc, 0 /*normal*/,TmpUser.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_USER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_USER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUser=%ls hrc=%Rhrc\n", this, "Unattended::getUser", *aUser, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(User)(IN_BSTR aUser)
{
    LogRelFlow(("{%p} %s: enter aUser=%ls\n", this, "Unattended::setUser", aUser));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpUser(aUser);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_USER_ENTER(this, TmpUser.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setUser(TmpUser.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_USER_RETURN(this, hrc, 0 /*normal*/,TmpUser.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_USER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_USER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setUser", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(Password)(BSTR *aPassword)
{
    LogRelFlow(("{%p} %s: enter aPassword=%p\n", this, "Unattended::getPassword", aPassword));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPassword);
        BSTROutConverter TmpPassword(aPassword);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PASSWORD_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPassword(TmpPassword.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PASSWORD_RETURN(this, hrc, 0 /*normal*/,TmpPassword.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PASSWORD_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PASSWORD_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPassword=%ls hrc=%Rhrc\n", this, "Unattended::getPassword", *aPassword, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(Password)(IN_BSTR aPassword)
{
    LogRelFlow(("{%p} %s: enter aPassword=%ls\n", this, "Unattended::setPassword", aPassword));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpPassword(aPassword);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PASSWORD_ENTER(this, TmpPassword.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setPassword(TmpPassword.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PASSWORD_RETURN(this, hrc, 0 /*normal*/,TmpPassword.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PASSWORD_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PASSWORD_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setPassword", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(FullUserName)(BSTR *aFullUserName)
{
    LogRelFlow(("{%p} %s: enter aFullUserName=%p\n", this, "Unattended::getFullUserName", aFullUserName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFullUserName);
        BSTROutConverter TmpFullUserName(aFullUserName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_FULLUSERNAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFullUserName(TmpFullUserName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_FULLUSERNAME_RETURN(this, hrc, 0 /*normal*/,TmpFullUserName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_FULLUSERNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_FULLUSERNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFullUserName=%ls hrc=%Rhrc\n", this, "Unattended::getFullUserName", *aFullUserName, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(FullUserName)(IN_BSTR aFullUserName)
{
    LogRelFlow(("{%p} %s: enter aFullUserName=%ls\n", this, "Unattended::setFullUserName", aFullUserName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpFullUserName(aFullUserName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_FULLUSERNAME_ENTER(this, TmpFullUserName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setFullUserName(TmpFullUserName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_FULLUSERNAME_RETURN(this, hrc, 0 /*normal*/,TmpFullUserName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_FULLUSERNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_FULLUSERNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setFullUserName", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(ProductKey)(BSTR *aProductKey)
{
    LogRelFlow(("{%p} %s: enter aProductKey=%p\n", this, "Unattended::getProductKey", aProductKey));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProductKey);
        BSTROutConverter TmpProductKey(aProductKey);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PRODUCTKEY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProductKey(TmpProductKey.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PRODUCTKEY_RETURN(this, hrc, 0 /*normal*/,TmpProductKey.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PRODUCTKEY_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PRODUCTKEY_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProductKey=%ls hrc=%Rhrc\n", this, "Unattended::getProductKey", *aProductKey, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(ProductKey)(IN_BSTR aProductKey)
{
    LogRelFlow(("{%p} %s: enter aProductKey=%ls\n", this, "Unattended::setProductKey", aProductKey));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpProductKey(aProductKey);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PRODUCTKEY_ENTER(this, TmpProductKey.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProductKey(TmpProductKey.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PRODUCTKEY_RETURN(this, hrc, 0 /*normal*/,TmpProductKey.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PRODUCTKEY_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PRODUCTKEY_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setProductKey", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(AdditionsIsoPath)(BSTR *aAdditionsIsoPath)
{
    LogRelFlow(("{%p} %s: enter aAdditionsIsoPath=%p\n", this, "Unattended::getAdditionsIsoPath", aAdditionsIsoPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAdditionsIsoPath);
        BSTROutConverter TmpAdditionsIsoPath(aAdditionsIsoPath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_ADDITIONSISOPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAdditionsIsoPath(TmpAdditionsIsoPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_ADDITIONSISOPATH_RETURN(this, hrc, 0 /*normal*/,TmpAdditionsIsoPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_ADDITIONSISOPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_ADDITIONSISOPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAdditionsIsoPath=%ls hrc=%Rhrc\n", this, "Unattended::getAdditionsIsoPath", *aAdditionsIsoPath, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(AdditionsIsoPath)(IN_BSTR aAdditionsIsoPath)
{
    LogRelFlow(("{%p} %s: enter aAdditionsIsoPath=%ls\n", this, "Unattended::setAdditionsIsoPath", aAdditionsIsoPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpAdditionsIsoPath(aAdditionsIsoPath);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_ADDITIONSISOPATH_ENTER(this, TmpAdditionsIsoPath.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAdditionsIsoPath(TmpAdditionsIsoPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_ADDITIONSISOPATH_RETURN(this, hrc, 0 /*normal*/,TmpAdditionsIsoPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_ADDITIONSISOPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_ADDITIONSISOPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setAdditionsIsoPath", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InstallGuestAdditions)(BOOL *aInstallGuestAdditions)
{
    LogRelFlow(("{%p} %s: enter aInstallGuestAdditions=%p\n", this, "Unattended::getInstallGuestAdditions", aInstallGuestAdditions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aInstallGuestAdditions);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_INSTALLGUESTADDITIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getInstallGuestAdditions(aInstallGuestAdditions);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_INSTALLGUESTADDITIONS_RETURN(this, hrc, 0 /*normal*/,*aInstallGuestAdditions != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_INSTALLGUESTADDITIONS_RETURN(this, hrc, 1 /*hrc exception*/,*aInstallGuestAdditions != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_INSTALLGUESTADDITIONS_RETURN(this, hrc, 9 /*unhandled exception*/,*aInstallGuestAdditions != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aInstallGuestAdditions=%RTbool hrc=%Rhrc\n", this, "Unattended::getInstallGuestAdditions", *aInstallGuestAdditions, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(InstallGuestAdditions)(BOOL aInstallGuestAdditions)
{
    LogRelFlow(("{%p} %s: enter aInstallGuestAdditions=%RTbool\n", this, "Unattended::setInstallGuestAdditions", aInstallGuestAdditions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_INSTALLGUESTADDITIONS_ENTER(this, aInstallGuestAdditions != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setInstallGuestAdditions(aInstallGuestAdditions != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_INSTALLGUESTADDITIONS_RETURN(this, hrc, 0 /*normal*/,aInstallGuestAdditions != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_INSTALLGUESTADDITIONS_RETURN(this, hrc, 1 /*hrc exception*/,aInstallGuestAdditions != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_INSTALLGUESTADDITIONS_RETURN(this, hrc, 9 /*unhandled exception*/,aInstallGuestAdditions != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setInstallGuestAdditions", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(ValidationKitIsoPath)(BSTR *aValidationKitIsoPath)
{
    LogRelFlow(("{%p} %s: enter aValidationKitIsoPath=%p\n", this, "Unattended::getValidationKitIsoPath", aValidationKitIsoPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValidationKitIsoPath);
        BSTROutConverter TmpValidationKitIsoPath(aValidationKitIsoPath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_VALIDATIONKITISOPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getValidationKitIsoPath(TmpValidationKitIsoPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_VALIDATIONKITISOPATH_RETURN(this, hrc, 0 /*normal*/,TmpValidationKitIsoPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_VALIDATIONKITISOPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_VALIDATIONKITISOPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aValidationKitIsoPath=%ls hrc=%Rhrc\n", this, "Unattended::getValidationKitIsoPath", *aValidationKitIsoPath, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(ValidationKitIsoPath)(IN_BSTR aValidationKitIsoPath)
{
    LogRelFlow(("{%p} %s: enter aValidationKitIsoPath=%ls\n", this, "Unattended::setValidationKitIsoPath", aValidationKitIsoPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpValidationKitIsoPath(aValidationKitIsoPath);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_VALIDATIONKITISOPATH_ENTER(this, TmpValidationKitIsoPath.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setValidationKitIsoPath(TmpValidationKitIsoPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_VALIDATIONKITISOPATH_RETURN(this, hrc, 0 /*normal*/,TmpValidationKitIsoPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_VALIDATIONKITISOPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_VALIDATIONKITISOPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setValidationKitIsoPath", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InstallTestExecService)(BOOL *aInstallTestExecService)
{
    LogRelFlow(("{%p} %s: enter aInstallTestExecService=%p\n", this, "Unattended::getInstallTestExecService", aInstallTestExecService));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aInstallTestExecService);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_INSTALLTESTEXECSERVICE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getInstallTestExecService(aInstallTestExecService);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_INSTALLTESTEXECSERVICE_RETURN(this, hrc, 0 /*normal*/,*aInstallTestExecService != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_INSTALLTESTEXECSERVICE_RETURN(this, hrc, 1 /*hrc exception*/,*aInstallTestExecService != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_INSTALLTESTEXECSERVICE_RETURN(this, hrc, 9 /*unhandled exception*/,*aInstallTestExecService != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aInstallTestExecService=%RTbool hrc=%Rhrc\n", this, "Unattended::getInstallTestExecService", *aInstallTestExecService, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(InstallTestExecService)(BOOL aInstallTestExecService)
{
    LogRelFlow(("{%p} %s: enter aInstallTestExecService=%RTbool\n", this, "Unattended::setInstallTestExecService", aInstallTestExecService));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_INSTALLTESTEXECSERVICE_ENTER(this, aInstallTestExecService != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setInstallTestExecService(aInstallTestExecService != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_INSTALLTESTEXECSERVICE_RETURN(this, hrc, 0 /*normal*/,aInstallTestExecService != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_INSTALLTESTEXECSERVICE_RETURN(this, hrc, 1 /*hrc exception*/,aInstallTestExecService != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_INSTALLTESTEXECSERVICE_RETURN(this, hrc, 9 /*unhandled exception*/,aInstallTestExecService != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setInstallTestExecService", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(TimeZone)(BSTR *aTimeZone)
{
    LogRelFlow(("{%p} %s: enter aTimeZone=%p\n", this, "Unattended::getTimeZone", aTimeZone));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aTimeZone);
        BSTROutConverter TmpTimeZone(aTimeZone);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_TIMEZONE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getTimeZone(TmpTimeZone.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_TIMEZONE_RETURN(this, hrc, 0 /*normal*/,TmpTimeZone.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_TIMEZONE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_TIMEZONE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aTimeZone=%ls hrc=%Rhrc\n", this, "Unattended::getTimeZone", *aTimeZone, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(TimeZone)(IN_BSTR aTimeZone)
{
    LogRelFlow(("{%p} %s: enter aTimeZone=%ls\n", this, "Unattended::setTimeZone", aTimeZone));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpTimeZone(aTimeZone);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_TIMEZONE_ENTER(this, TmpTimeZone.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setTimeZone(TmpTimeZone.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_TIMEZONE_RETURN(this, hrc, 0 /*normal*/,TmpTimeZone.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_TIMEZONE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_TIMEZONE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setTimeZone", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(Locale)(BSTR *aLocale)
{
    LogRelFlow(("{%p} %s: enter aLocale=%p\n", this, "Unattended::getLocale", aLocale));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLocale);
        BSTROutConverter TmpLocale(aLocale);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_LOCALE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLocale(TmpLocale.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_LOCALE_RETURN(this, hrc, 0 /*normal*/,TmpLocale.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_LOCALE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_LOCALE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLocale=%ls hrc=%Rhrc\n", this, "Unattended::getLocale", *aLocale, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(Locale)(IN_BSTR aLocale)
{
    LogRelFlow(("{%p} %s: enter aLocale=%ls\n", this, "Unattended::setLocale", aLocale));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpLocale(aLocale);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_LOCALE_ENTER(this, TmpLocale.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setLocale(TmpLocale.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_LOCALE_RETURN(this, hrc, 0 /*normal*/,TmpLocale.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_LOCALE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_LOCALE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setLocale", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(Language)(BSTR *aLanguage)
{
    LogRelFlow(("{%p} %s: enter aLanguage=%p\n", this, "Unattended::getLanguage", aLanguage));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLanguage);
        BSTROutConverter TmpLanguage(aLanguage);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_LANGUAGE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLanguage(TmpLanguage.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_LANGUAGE_RETURN(this, hrc, 0 /*normal*/,TmpLanguage.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_LANGUAGE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_LANGUAGE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLanguage=%ls hrc=%Rhrc\n", this, "Unattended::getLanguage", *aLanguage, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(Language)(IN_BSTR aLanguage)
{
    LogRelFlow(("{%p} %s: enter aLanguage=%ls\n", this, "Unattended::setLanguage", aLanguage));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpLanguage(aLanguage);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_LANGUAGE_ENTER(this, TmpLanguage.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setLanguage(TmpLanguage.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_LANGUAGE_RETURN(this, hrc, 0 /*normal*/,TmpLanguage.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_LANGUAGE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_LANGUAGE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setLanguage", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(Country)(BSTR *aCountry)
{
    LogRelFlow(("{%p} %s: enter aCountry=%p\n", this, "Unattended::getCountry", aCountry));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCountry);
        BSTROutConverter TmpCountry(aCountry);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_COUNTRY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCountry(TmpCountry.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_COUNTRY_RETURN(this, hrc, 0 /*normal*/,TmpCountry.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_COUNTRY_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_COUNTRY_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCountry=%ls hrc=%Rhrc\n", this, "Unattended::getCountry", *aCountry, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(Country)(IN_BSTR aCountry)
{
    LogRelFlow(("{%p} %s: enter aCountry=%ls\n", this, "Unattended::setCountry", aCountry));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpCountry(aCountry);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_COUNTRY_ENTER(this, TmpCountry.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCountry(TmpCountry.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_COUNTRY_RETURN(this, hrc, 0 /*normal*/,TmpCountry.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_COUNTRY_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_COUNTRY_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setCountry", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(Proxy)(BSTR *aProxy)
{
    LogRelFlow(("{%p} %s: enter aProxy=%p\n", this, "Unattended::getProxy", aProxy));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProxy);
        BSTROutConverter TmpProxy(aProxy);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PROXY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProxy(TmpProxy.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PROXY_RETURN(this, hrc, 0 /*normal*/,TmpProxy.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PROXY_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PROXY_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProxy=%ls hrc=%Rhrc\n", this, "Unattended::getProxy", *aProxy, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(Proxy)(IN_BSTR aProxy)
{
    LogRelFlow(("{%p} %s: enter aProxy=%ls\n", this, "Unattended::setProxy", aProxy));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpProxy(aProxy);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PROXY_ENTER(this, TmpProxy.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProxy(TmpProxy.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PROXY_RETURN(this, hrc, 0 /*normal*/,TmpProxy.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PROXY_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PROXY_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setProxy", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(PackageSelectionAdjustments)(BSTR *aPackageSelectionAdjustments)
{
    LogRelFlow(("{%p} %s: enter aPackageSelectionAdjustments=%p\n", this, "Unattended::getPackageSelectionAdjustments", aPackageSelectionAdjustments));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPackageSelectionAdjustments);
        BSTROutConverter TmpPackageSelectionAdjustments(aPackageSelectionAdjustments);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PACKAGESELECTIONADJUSTMENTS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPackageSelectionAdjustments(TmpPackageSelectionAdjustments.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PACKAGESELECTIONADJUSTMENTS_RETURN(this, hrc, 0 /*normal*/,TmpPackageSelectionAdjustments.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PACKAGESELECTIONADJUSTMENTS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_PACKAGESELECTIONADJUSTMENTS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPackageSelectionAdjustments=%ls hrc=%Rhrc\n", this, "Unattended::getPackageSelectionAdjustments", *aPackageSelectionAdjustments, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(PackageSelectionAdjustments)(IN_BSTR aPackageSelectionAdjustments)
{
    LogRelFlow(("{%p} %s: enter aPackageSelectionAdjustments=%ls\n", this, "Unattended::setPackageSelectionAdjustments", aPackageSelectionAdjustments));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpPackageSelectionAdjustments(aPackageSelectionAdjustments);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PACKAGESELECTIONADJUSTMENTS_ENTER(this, TmpPackageSelectionAdjustments.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setPackageSelectionAdjustments(TmpPackageSelectionAdjustments.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PACKAGESELECTIONADJUSTMENTS_RETURN(this, hrc, 0 /*normal*/,TmpPackageSelectionAdjustments.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PACKAGESELECTIONADJUSTMENTS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_PACKAGESELECTIONADJUSTMENTS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setPackageSelectionAdjustments", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(Hostname)(BSTR *aHostname)
{
    LogRelFlow(("{%p} %s: enter aHostname=%p\n", this, "Unattended::getHostname", aHostname));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHostname);
        BSTROutConverter TmpHostname(aHostname);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_HOSTNAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHostname(TmpHostname.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_HOSTNAME_RETURN(this, hrc, 0 /*normal*/,TmpHostname.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_HOSTNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_HOSTNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHostname=%ls hrc=%Rhrc\n", this, "Unattended::getHostname", *aHostname, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(Hostname)(IN_BSTR aHostname)
{
    LogRelFlow(("{%p} %s: enter aHostname=%ls\n", this, "Unattended::setHostname", aHostname));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpHostname(aHostname);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_HOSTNAME_ENTER(this, TmpHostname.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setHostname(TmpHostname.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_HOSTNAME_RETURN(this, hrc, 0 /*normal*/,TmpHostname.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_HOSTNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_HOSTNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setHostname", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(AuxiliaryBasePath)(BSTR *aAuxiliaryBasePath)
{
    LogRelFlow(("{%p} %s: enter aAuxiliaryBasePath=%p\n", this, "Unattended::getAuxiliaryBasePath", aAuxiliaryBasePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAuxiliaryBasePath);
        BSTROutConverter TmpAuxiliaryBasePath(aAuxiliaryBasePath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_AUXILIARYBASEPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAuxiliaryBasePath(TmpAuxiliaryBasePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_AUXILIARYBASEPATH_RETURN(this, hrc, 0 /*normal*/,TmpAuxiliaryBasePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_AUXILIARYBASEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_AUXILIARYBASEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAuxiliaryBasePath=%ls hrc=%Rhrc\n", this, "Unattended::getAuxiliaryBasePath", *aAuxiliaryBasePath, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(AuxiliaryBasePath)(IN_BSTR aAuxiliaryBasePath)
{
    LogRelFlow(("{%p} %s: enter aAuxiliaryBasePath=%ls\n", this, "Unattended::setAuxiliaryBasePath", aAuxiliaryBasePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpAuxiliaryBasePath(aAuxiliaryBasePath);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_AUXILIARYBASEPATH_ENTER(this, TmpAuxiliaryBasePath.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAuxiliaryBasePath(TmpAuxiliaryBasePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_AUXILIARYBASEPATH_RETURN(this, hrc, 0 /*normal*/,TmpAuxiliaryBasePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_AUXILIARYBASEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_AUXILIARYBASEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setAuxiliaryBasePath", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(ImageIndex)(ULONG *aImageIndex)
{
    LogRelFlow(("{%p} %s: enter aImageIndex=%p\n", this, "Unattended::getImageIndex", aImageIndex));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aImageIndex);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_IMAGEINDEX_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getImageIndex(aImageIndex);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_IMAGEINDEX_RETURN(this, hrc, 0 /*normal*/,*aImageIndex);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_IMAGEINDEX_RETURN(this, hrc, 1 /*hrc exception*/,*aImageIndex);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_IMAGEINDEX_RETURN(this, hrc, 9 /*unhandled exception*/,*aImageIndex);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aImageIndex=%RU32 hrc=%Rhrc\n", this, "Unattended::getImageIndex", *aImageIndex, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(ImageIndex)(ULONG aImageIndex)
{
    LogRelFlow(("{%p} %s: enter aImageIndex=%RU32\n", this, "Unattended::setImageIndex", aImageIndex));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_IMAGEINDEX_ENTER(this, aImageIndex);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setImageIndex(aImageIndex);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_IMAGEINDEX_RETURN(this, hrc, 0 /*normal*/,aImageIndex);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_IMAGEINDEX_RETURN(this, hrc, 1 /*hrc exception*/,aImageIndex);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_IMAGEINDEX_RETURN(this, hrc, 9 /*unhandled exception*/,aImageIndex);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setImageIndex", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(ScriptTemplatePath)(BSTR *aScriptTemplatePath)
{
    LogRelFlow(("{%p} %s: enter aScriptTemplatePath=%p\n", this, "Unattended::getScriptTemplatePath", aScriptTemplatePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aScriptTemplatePath);
        BSTROutConverter TmpScriptTemplatePath(aScriptTemplatePath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_SCRIPTTEMPLATEPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getScriptTemplatePath(TmpScriptTemplatePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_SCRIPTTEMPLATEPATH_RETURN(this, hrc, 0 /*normal*/,TmpScriptTemplatePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_SCRIPTTEMPLATEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_SCRIPTTEMPLATEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aScriptTemplatePath=%ls hrc=%Rhrc\n", this, "Unattended::getScriptTemplatePath", *aScriptTemplatePath, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(ScriptTemplatePath)(IN_BSTR aScriptTemplatePath)
{
    LogRelFlow(("{%p} %s: enter aScriptTemplatePath=%ls\n", this, "Unattended::setScriptTemplatePath", aScriptTemplatePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpScriptTemplatePath(aScriptTemplatePath);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_SCRIPTTEMPLATEPATH_ENTER(this, TmpScriptTemplatePath.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setScriptTemplatePath(TmpScriptTemplatePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_SCRIPTTEMPLATEPATH_RETURN(this, hrc, 0 /*normal*/,TmpScriptTemplatePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_SCRIPTTEMPLATEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_SCRIPTTEMPLATEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setScriptTemplatePath", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(PostInstallScriptTemplatePath)(BSTR *aPostInstallScriptTemplatePath)
{
    LogRelFlow(("{%p} %s: enter aPostInstallScriptTemplatePath=%p\n", this, "Unattended::getPostInstallScriptTemplatePath", aPostInstallScriptTemplatePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPostInstallScriptTemplatePath);
        BSTROutConverter TmpPostInstallScriptTemplatePath(aPostInstallScriptTemplatePath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_POSTINSTALLSCRIPTTEMPLATEPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPostInstallScriptTemplatePath(TmpPostInstallScriptTemplatePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_POSTINSTALLSCRIPTTEMPLATEPATH_RETURN(this, hrc, 0 /*normal*/,TmpPostInstallScriptTemplatePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_POSTINSTALLSCRIPTTEMPLATEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_POSTINSTALLSCRIPTTEMPLATEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPostInstallScriptTemplatePath=%ls hrc=%Rhrc\n", this, "Unattended::getPostInstallScriptTemplatePath", *aPostInstallScriptTemplatePath, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(PostInstallScriptTemplatePath)(IN_BSTR aPostInstallScriptTemplatePath)
{
    LogRelFlow(("{%p} %s: enter aPostInstallScriptTemplatePath=%ls\n", this, "Unattended::setPostInstallScriptTemplatePath", aPostInstallScriptTemplatePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpPostInstallScriptTemplatePath(aPostInstallScriptTemplatePath);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_POSTINSTALLSCRIPTTEMPLATEPATH_ENTER(this, TmpPostInstallScriptTemplatePath.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setPostInstallScriptTemplatePath(TmpPostInstallScriptTemplatePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_POSTINSTALLSCRIPTTEMPLATEPATH_RETURN(this, hrc, 0 /*normal*/,TmpPostInstallScriptTemplatePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_POSTINSTALLSCRIPTTEMPLATEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_POSTINSTALLSCRIPTTEMPLATEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setPostInstallScriptTemplatePath", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(PostInstallCommand)(BSTR *aPostInstallCommand)
{
    LogRelFlow(("{%p} %s: enter aPostInstallCommand=%p\n", this, "Unattended::getPostInstallCommand", aPostInstallCommand));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPostInstallCommand);
        BSTROutConverter TmpPostInstallCommand(aPostInstallCommand);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_POSTINSTALLCOMMAND_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPostInstallCommand(TmpPostInstallCommand.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_POSTINSTALLCOMMAND_RETURN(this, hrc, 0 /*normal*/,TmpPostInstallCommand.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_POSTINSTALLCOMMAND_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_POSTINSTALLCOMMAND_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPostInstallCommand=%ls hrc=%Rhrc\n", this, "Unattended::getPostInstallCommand", *aPostInstallCommand, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(PostInstallCommand)(IN_BSTR aPostInstallCommand)
{
    LogRelFlow(("{%p} %s: enter aPostInstallCommand=%ls\n", this, "Unattended::setPostInstallCommand", aPostInstallCommand));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpPostInstallCommand(aPostInstallCommand);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_POSTINSTALLCOMMAND_ENTER(this, TmpPostInstallCommand.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setPostInstallCommand(TmpPostInstallCommand.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_POSTINSTALLCOMMAND_RETURN(this, hrc, 0 /*normal*/,TmpPostInstallCommand.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_POSTINSTALLCOMMAND_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_POSTINSTALLCOMMAND_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setPostInstallCommand", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(ExtraInstallKernelParameters)(BSTR *aExtraInstallKernelParameters)
{
    LogRelFlow(("{%p} %s: enter aExtraInstallKernelParameters=%p\n", this, "Unattended::getExtraInstallKernelParameters", aExtraInstallKernelParameters));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aExtraInstallKernelParameters);
        BSTROutConverter TmpExtraInstallKernelParameters(aExtraInstallKernelParameters);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_EXTRAINSTALLKERNELPARAMETERS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getExtraInstallKernelParameters(TmpExtraInstallKernelParameters.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_EXTRAINSTALLKERNELPARAMETERS_RETURN(this, hrc, 0 /*normal*/,TmpExtraInstallKernelParameters.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_EXTRAINSTALLKERNELPARAMETERS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_EXTRAINSTALLKERNELPARAMETERS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aExtraInstallKernelParameters=%ls hrc=%Rhrc\n", this, "Unattended::getExtraInstallKernelParameters", *aExtraInstallKernelParameters, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMSETTER(ExtraInstallKernelParameters)(IN_BSTR aExtraInstallKernelParameters)
{
    LogRelFlow(("{%p} %s: enter aExtraInstallKernelParameters=%ls\n", this, "Unattended::setExtraInstallKernelParameters", aExtraInstallKernelParameters));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpExtraInstallKernelParameters(aExtraInstallKernelParameters);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_EXTRAINSTALLKERNELPARAMETERS_ENTER(this, TmpExtraInstallKernelParameters.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setExtraInstallKernelParameters(TmpExtraInstallKernelParameters.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_EXTRAINSTALLKERNELPARAMETERS_RETURN(this, hrc, 0 /*normal*/,TmpExtraInstallKernelParameters.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_EXTRAINSTALLKERNELPARAMETERS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_SET_EXTRAINSTALLKERNELPARAMETERS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::setExtraInstallKernelParameters", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(DetectedOSTypeId)(BSTR *aDetectedOSTypeId)
{
    LogRelFlow(("{%p} %s: enter aDetectedOSTypeId=%p\n", this, "Unattended::getDetectedOSTypeId", aDetectedOSTypeId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDetectedOSTypeId);
        BSTROutConverter TmpDetectedOSTypeId(aDetectedOSTypeId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSTYPEID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDetectedOSTypeId(TmpDetectedOSTypeId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSTYPEID_RETURN(this, hrc, 0 /*normal*/,TmpDetectedOSTypeId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSTYPEID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSTYPEID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDetectedOSTypeId=%ls hrc=%Rhrc\n", this, "Unattended::getDetectedOSTypeId", *aDetectedOSTypeId, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(DetectedOSVersion)(BSTR *aDetectedOSVersion)
{
    LogRelFlow(("{%p} %s: enter aDetectedOSVersion=%p\n", this, "Unattended::getDetectedOSVersion", aDetectedOSVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDetectedOSVersion);
        BSTROutConverter TmpDetectedOSVersion(aDetectedOSVersion);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSVERSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDetectedOSVersion(TmpDetectedOSVersion.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSVERSION_RETURN(this, hrc, 0 /*normal*/,TmpDetectedOSVersion.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSVERSION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSVERSION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDetectedOSVersion=%ls hrc=%Rhrc\n", this, "Unattended::getDetectedOSVersion", *aDetectedOSVersion, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(DetectedOSFlavor)(BSTR *aDetectedOSFlavor)
{
    LogRelFlow(("{%p} %s: enter aDetectedOSFlavor=%p\n", this, "Unattended::getDetectedOSFlavor", aDetectedOSFlavor));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDetectedOSFlavor);
        BSTROutConverter TmpDetectedOSFlavor(aDetectedOSFlavor);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSFLAVOR_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDetectedOSFlavor(TmpDetectedOSFlavor.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSFLAVOR_RETURN(this, hrc, 0 /*normal*/,TmpDetectedOSFlavor.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSFLAVOR_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSFLAVOR_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDetectedOSFlavor=%ls hrc=%Rhrc\n", this, "Unattended::getDetectedOSFlavor", *aDetectedOSFlavor, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(DetectedOSLanguages)(BSTR *aDetectedOSLanguages)
{
    LogRelFlow(("{%p} %s: enter aDetectedOSLanguages=%p\n", this, "Unattended::getDetectedOSLanguages", aDetectedOSLanguages));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDetectedOSLanguages);
        BSTROutConverter TmpDetectedOSLanguages(aDetectedOSLanguages);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSLANGUAGES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDetectedOSLanguages(TmpDetectedOSLanguages.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSLANGUAGES_RETURN(this, hrc, 0 /*normal*/,TmpDetectedOSLanguages.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSLANGUAGES_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSLANGUAGES_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDetectedOSLanguages=%ls hrc=%Rhrc\n", this, "Unattended::getDetectedOSLanguages", *aDetectedOSLanguages, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(DetectedOSHints)(BSTR *aDetectedOSHints)
{
    LogRelFlow(("{%p} %s: enter aDetectedOSHints=%p\n", this, "Unattended::getDetectedOSHints", aDetectedOSHints));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDetectedOSHints);
        BSTROutConverter TmpDetectedOSHints(aDetectedOSHints);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSHINTS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDetectedOSHints(TmpDetectedOSHints.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSHINTS_RETURN(this, hrc, 0 /*normal*/,TmpDetectedOSHints.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSHINTS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_GET_DETECTEDOSHINTS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDetectedOSHints=%ls hrc=%Rhrc\n", this, "Unattended::getDetectedOSHints", *aDetectedOSHints, hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute1IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute2IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute3IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute4IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute5IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute6IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute7IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute8IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute9IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute10IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute11IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute12IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute13IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute14IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute15IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::COMGETTER(InternalAndReservedAttribute16IUnattended)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IUnattended methods
//

STDMETHODIMP UnattendedWrap::DetectIsoOS()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Unattended::detectIsoOS"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_DETECTISOOS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = detectIsoOS();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_DETECTISOOS_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_DETECTISOOS_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_DETECTISOOS_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::detectIsoOS", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::Prepare()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Unattended::prepare"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_PREPARE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = prepare();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_PREPARE_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_PREPARE_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_PREPARE_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::prepare", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::ConstructMedia()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Unattended::constructMedia"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_CONSTRUCTMEDIA_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = constructMedia();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_CONSTRUCTMEDIA_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_CONSTRUCTMEDIA_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_CONSTRUCTMEDIA_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::constructMedia", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::ReconfigureVM()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Unattended::reconfigureVM"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_RECONFIGUREVM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = reconfigureVM();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_RECONFIGUREVM_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_RECONFIGUREVM_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_RECONFIGUREVM_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::reconfigureVM", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::Done()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Unattended::done"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_DONE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = done();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_DONE_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_DONE_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_UNATTENDED_DONE_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Unattended::done", hrc));
    return hrc;
}

STDMETHODIMP UnattendedWrap::InternalAndReservedMethod1IUnattended()
{
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::InternalAndReservedMethod2IUnattended()
{
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::InternalAndReservedMethod3IUnattended()
{
    return E_NOTIMPL;
}

STDMETHODIMP UnattendedWrap::InternalAndReservedMethod4IUnattended()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(UnattendedWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(UnattendedWrap, IUnattended)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "UnattendedWrap.cpp"


// ##### BEGINFILE "GraphicsAdapterWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IGraphicsAdapter.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_GRAPHICSADAPTER

#include "GraphicsAdapterWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(GraphicsAdapterWrap)

//
// IGraphicsAdapter properties
//

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(GraphicsControllerType)(GraphicsControllerType_T *aGraphicsControllerType)
{
    LogRelFlow(("{%p} %s: enter aGraphicsControllerType=%p\n", this, "GraphicsAdapter::getGraphicsControllerType", aGraphicsControllerType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGraphicsControllerType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_GRAPHICSCONTROLLERTYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGraphicsControllerType(aGraphicsControllerType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_GRAPHICSCONTROLLERTYPE_RETURN(this, hrc, 0 /*normal*/,*aGraphicsControllerType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_GRAPHICSCONTROLLERTYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aGraphicsControllerType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_GRAPHICSCONTROLLERTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aGraphicsControllerType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aGraphicsControllerType=%RU32 hrc=%Rhrc\n", this, "GraphicsAdapter::getGraphicsControllerType", *aGraphicsControllerType, hrc));
    return hrc;
}

STDMETHODIMP GraphicsAdapterWrap::COMSETTER(GraphicsControllerType)(GraphicsControllerType_T aGraphicsControllerType)
{
    LogRelFlow(("{%p} %s: enter aGraphicsControllerType=%RU32\n", this, "GraphicsAdapter::setGraphicsControllerType", aGraphicsControllerType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_GRAPHICSCONTROLLERTYPE_ENTER(this, aGraphicsControllerType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setGraphicsControllerType(aGraphicsControllerType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_GRAPHICSCONTROLLERTYPE_RETURN(this, hrc, 0 /*normal*/,aGraphicsControllerType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_GRAPHICSCONTROLLERTYPE_RETURN(this, hrc, 1 /*hrc exception*/,aGraphicsControllerType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_GRAPHICSCONTROLLERTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,aGraphicsControllerType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GraphicsAdapter::setGraphicsControllerType", hrc));
    return hrc;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(VRAMSize)(ULONG *aVRAMSize)
{
    LogRelFlow(("{%p} %s: enter aVRAMSize=%p\n", this, "GraphicsAdapter::getVRAMSize", aVRAMSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVRAMSize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_VRAMSIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVRAMSize(aVRAMSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_VRAMSIZE_RETURN(this, hrc, 0 /*normal*/,*aVRAMSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_VRAMSIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aVRAMSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_VRAMSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aVRAMSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVRAMSize=%RU32 hrc=%Rhrc\n", this, "GraphicsAdapter::getVRAMSize", *aVRAMSize, hrc));
    return hrc;
}

STDMETHODIMP GraphicsAdapterWrap::COMSETTER(VRAMSize)(ULONG aVRAMSize)
{
    LogRelFlow(("{%p} %s: enter aVRAMSize=%RU32\n", this, "GraphicsAdapter::setVRAMSize", aVRAMSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_VRAMSIZE_ENTER(this, aVRAMSize);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVRAMSize(aVRAMSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_VRAMSIZE_RETURN(this, hrc, 0 /*normal*/,aVRAMSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_VRAMSIZE_RETURN(this, hrc, 1 /*hrc exception*/,aVRAMSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_VRAMSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,aVRAMSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GraphicsAdapter::setVRAMSize", hrc));
    return hrc;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(Accelerate3DEnabled)(BOOL *aAccelerate3DEnabled)
{
    LogRelFlow(("{%p} %s: enter aAccelerate3DEnabled=%p\n", this, "GraphicsAdapter::getAccelerate3DEnabled", aAccelerate3DEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAccelerate3DEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_ACCELERATE3DENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAccelerate3DEnabled(aAccelerate3DEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_ACCELERATE3DENABLED_RETURN(this, hrc, 0 /*normal*/,*aAccelerate3DEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_ACCELERATE3DENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aAccelerate3DEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_ACCELERATE3DENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aAccelerate3DEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAccelerate3DEnabled=%RTbool hrc=%Rhrc\n", this, "GraphicsAdapter::getAccelerate3DEnabled", *aAccelerate3DEnabled, hrc));
    return hrc;
}

STDMETHODIMP GraphicsAdapterWrap::COMSETTER(Accelerate3DEnabled)(BOOL aAccelerate3DEnabled)
{
    LogRelFlow(("{%p} %s: enter aAccelerate3DEnabled=%RTbool\n", this, "GraphicsAdapter::setAccelerate3DEnabled", aAccelerate3DEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_ACCELERATE3DENABLED_ENTER(this, aAccelerate3DEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAccelerate3DEnabled(aAccelerate3DEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_ACCELERATE3DENABLED_RETURN(this, hrc, 0 /*normal*/,aAccelerate3DEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_ACCELERATE3DENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aAccelerate3DEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_ACCELERATE3DENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aAccelerate3DEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GraphicsAdapter::setAccelerate3DEnabled", hrc));
    return hrc;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(Accelerate2DVideoEnabled)(BOOL *aAccelerate2DVideoEnabled)
{
    LogRelFlow(("{%p} %s: enter aAccelerate2DVideoEnabled=%p\n", this, "GraphicsAdapter::getAccelerate2DVideoEnabled", aAccelerate2DVideoEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAccelerate2DVideoEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_ACCELERATE2DVIDEOENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAccelerate2DVideoEnabled(aAccelerate2DVideoEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_ACCELERATE2DVIDEOENABLED_RETURN(this, hrc, 0 /*normal*/,*aAccelerate2DVideoEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_ACCELERATE2DVIDEOENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aAccelerate2DVideoEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_ACCELERATE2DVIDEOENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aAccelerate2DVideoEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAccelerate2DVideoEnabled=%RTbool hrc=%Rhrc\n", this, "GraphicsAdapter::getAccelerate2DVideoEnabled", *aAccelerate2DVideoEnabled, hrc));
    return hrc;
}

STDMETHODIMP GraphicsAdapterWrap::COMSETTER(Accelerate2DVideoEnabled)(BOOL aAccelerate2DVideoEnabled)
{
    LogRelFlow(("{%p} %s: enter aAccelerate2DVideoEnabled=%RTbool\n", this, "GraphicsAdapter::setAccelerate2DVideoEnabled", aAccelerate2DVideoEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_ACCELERATE2DVIDEOENABLED_ENTER(this, aAccelerate2DVideoEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAccelerate2DVideoEnabled(aAccelerate2DVideoEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_ACCELERATE2DVIDEOENABLED_RETURN(this, hrc, 0 /*normal*/,aAccelerate2DVideoEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_ACCELERATE2DVIDEOENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aAccelerate2DVideoEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_ACCELERATE2DVIDEOENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aAccelerate2DVideoEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GraphicsAdapter::setAccelerate2DVideoEnabled", hrc));
    return hrc;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(MonitorCount)(ULONG *aMonitorCount)
{
    LogRelFlow(("{%p} %s: enter aMonitorCount=%p\n", this, "GraphicsAdapter::getMonitorCount", aMonitorCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMonitorCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_MONITORCOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMonitorCount(aMonitorCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_MONITORCOUNT_RETURN(this, hrc, 0 /*normal*/,*aMonitorCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_MONITORCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aMonitorCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_GET_MONITORCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aMonitorCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMonitorCount=%RU32 hrc=%Rhrc\n", this, "GraphicsAdapter::getMonitorCount", *aMonitorCount, hrc));
    return hrc;
}

STDMETHODIMP GraphicsAdapterWrap::COMSETTER(MonitorCount)(ULONG aMonitorCount)
{
    LogRelFlow(("{%p} %s: enter aMonitorCount=%RU32\n", this, "GraphicsAdapter::setMonitorCount", aMonitorCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_MONITORCOUNT_ENTER(this, aMonitorCount);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMonitorCount(aMonitorCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_MONITORCOUNT_RETURN(this, hrc, 0 /*normal*/,aMonitorCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_MONITORCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,aMonitorCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GRAPHICSADAPTER_SET_MONITORCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,aMonitorCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GraphicsAdapter::setMonitorCount", hrc));
    return hrc;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(InternalAndReservedAttribute1IGraphicsAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(InternalAndReservedAttribute2IGraphicsAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(InternalAndReservedAttribute3IGraphicsAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(InternalAndReservedAttribute4IGraphicsAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(InternalAndReservedAttribute5IGraphicsAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(InternalAndReservedAttribute6IGraphicsAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(InternalAndReservedAttribute7IGraphicsAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GraphicsAdapterWrap::COMGETTER(InternalAndReservedAttribute8IGraphicsAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IGraphicsAdapter methods
//

STDMETHODIMP GraphicsAdapterWrap::InternalAndReservedMethod1IGraphicsAdapter()
{
    return E_NOTIMPL;
}

STDMETHODIMP GraphicsAdapterWrap::InternalAndReservedMethod2IGraphicsAdapter()
{
    return E_NOTIMPL;
}

STDMETHODIMP GraphicsAdapterWrap::InternalAndReservedMethod3IGraphicsAdapter()
{
    return E_NOTIMPL;
}

STDMETHODIMP GraphicsAdapterWrap::InternalAndReservedMethod4IGraphicsAdapter()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(GraphicsAdapterWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(GraphicsAdapterWrap, IGraphicsAdapter)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "GraphicsAdapterWrap.cpp"


// ##### BEGINFILE "RecordingScreenSettingsWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IRecordingScreenSettings.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_RECORDINGSCREENSETTINGS

#include "RecordingScreenSettingsWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(RecordingScreenSettingsWrap)

//
// IRecordingScreenSettings properties
//

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(Id)(ULONG *aId)
{
    LogRelFlow(("{%p} %s: enter aId=%p\n", this, "RecordingScreenSettings::getId", aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aId);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_ID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getId(aId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_ID_RETURN(this, hrc, 0 /*normal*/,*aId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_ID_RETURN(this, hrc, 1 /*hrc exception*/,*aId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_ID_RETURN(this, hrc, 9 /*unhandled exception*/,*aId);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aId=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getId", *aId, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(Enabled)(BOOL *aEnabled)
{
    LogRelFlow(("{%p} %s: enter aEnabled=%p\n", this, "RecordingScreenSettings::getEnabled", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_ENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEnabled(aEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_ENABLED_RETURN(this, hrc, 0 /*normal*/,*aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_ENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_ENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEnabled=%RTbool hrc=%Rhrc\n", this, "RecordingScreenSettings::getEnabled", *aEnabled, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(Enabled)(BOOL aEnabled)
{
    LogRelFlow(("{%p} %s: enter aEnabled=%RTbool\n", this, "RecordingScreenSettings::setEnabled", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_ENABLED_ENTER(this, aEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setEnabled(aEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_ENABLED_RETURN(this, hrc, 0 /*normal*/,aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_ENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_ENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setEnabled", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(Features)(ULONG *aFeatures)
{
    LogRelFlow(("{%p} %s: enter aFeatures=%p\n", this, "RecordingScreenSettings::getFeatures", aFeatures));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFeatures);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_FEATURES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFeatures(aFeatures);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_FEATURES_RETURN(this, hrc, 0 /*normal*/,*aFeatures);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_FEATURES_RETURN(this, hrc, 1 /*hrc exception*/,*aFeatures);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_FEATURES_RETURN(this, hrc, 9 /*unhandled exception*/,*aFeatures);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFeatures=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getFeatures", *aFeatures, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(Features)(ULONG aFeatures)
{
    LogRelFlow(("{%p} %s: enter aFeatures=%RU32\n", this, "RecordingScreenSettings::setFeatures", aFeatures));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_FEATURES_ENTER(this, aFeatures);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setFeatures(aFeatures);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_FEATURES_RETURN(this, hrc, 0 /*normal*/,aFeatures);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_FEATURES_RETURN(this, hrc, 1 /*hrc exception*/,aFeatures);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_FEATURES_RETURN(this, hrc, 9 /*unhandled exception*/,aFeatures);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setFeatures", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(Destination)(RecordingDestination_T *aDestination)
{
    LogRelFlow(("{%p} %s: enter aDestination=%p\n", this, "RecordingScreenSettings::getDestination", aDestination));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDestination);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_DESTINATION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDestination(aDestination);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_DESTINATION_RETURN(this, hrc, 0 /*normal*/,*aDestination);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_DESTINATION_RETURN(this, hrc, 1 /*hrc exception*/,*aDestination);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_DESTINATION_RETURN(this, hrc, 9 /*unhandled exception*/,*aDestination);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDestination=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getDestination", *aDestination, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(Destination)(RecordingDestination_T aDestination)
{
    LogRelFlow(("{%p} %s: enter aDestination=%RU32\n", this, "RecordingScreenSettings::setDestination", aDestination));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_DESTINATION_ENTER(this, aDestination);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDestination(aDestination);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_DESTINATION_RETURN(this, hrc, 0 /*normal*/,aDestination);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_DESTINATION_RETURN(this, hrc, 1 /*hrc exception*/,aDestination);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_DESTINATION_RETURN(this, hrc, 9 /*unhandled exception*/,aDestination);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setDestination", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(Filename)(BSTR *aFilename)
{
    LogRelFlow(("{%p} %s: enter aFilename=%p\n", this, "RecordingScreenSettings::getFilename", aFilename));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFilename);
        BSTROutConverter TmpFilename(aFilename);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_FILENAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFilename(TmpFilename.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_FILENAME_RETURN(this, hrc, 0 /*normal*/,TmpFilename.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_FILENAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_FILENAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFilename=%ls hrc=%Rhrc\n", this, "RecordingScreenSettings::getFilename", *aFilename, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(Filename)(IN_BSTR aFilename)
{
    LogRelFlow(("{%p} %s: enter aFilename=%ls\n", this, "RecordingScreenSettings::setFilename", aFilename));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpFilename(aFilename);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_FILENAME_ENTER(this, TmpFilename.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setFilename(TmpFilename.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_FILENAME_RETURN(this, hrc, 0 /*normal*/,TmpFilename.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_FILENAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_FILENAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setFilename", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(MaxTime)(ULONG *aMaxTime)
{
    LogRelFlow(("{%p} %s: enter aMaxTime=%p\n", this, "RecordingScreenSettings::getMaxTime", aMaxTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_MAXTIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxTime(aMaxTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_MAXTIME_RETURN(this, hrc, 0 /*normal*/,*aMaxTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_MAXTIME_RETURN(this, hrc, 1 /*hrc exception*/,*aMaxTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_MAXTIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaxTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaxTime=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getMaxTime", *aMaxTime, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(MaxTime)(ULONG aMaxTime)
{
    LogRelFlow(("{%p} %s: enter aMaxTime=%RU32\n", this, "RecordingScreenSettings::setMaxTime", aMaxTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_MAXTIME_ENTER(this, aMaxTime);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMaxTime(aMaxTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_MAXTIME_RETURN(this, hrc, 0 /*normal*/,aMaxTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_MAXTIME_RETURN(this, hrc, 1 /*hrc exception*/,aMaxTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_MAXTIME_RETURN(this, hrc, 9 /*unhandled exception*/,aMaxTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setMaxTime", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(MaxFileSize)(ULONG *aMaxFileSize)
{
    LogRelFlow(("{%p} %s: enter aMaxFileSize=%p\n", this, "RecordingScreenSettings::getMaxFileSize", aMaxFileSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxFileSize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_MAXFILESIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxFileSize(aMaxFileSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_MAXFILESIZE_RETURN(this, hrc, 0 /*normal*/,*aMaxFileSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_MAXFILESIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aMaxFileSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_MAXFILESIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaxFileSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaxFileSize=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getMaxFileSize", *aMaxFileSize, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(MaxFileSize)(ULONG aMaxFileSize)
{
    LogRelFlow(("{%p} %s: enter aMaxFileSize=%RU32\n", this, "RecordingScreenSettings::setMaxFileSize", aMaxFileSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_MAXFILESIZE_ENTER(this, aMaxFileSize);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMaxFileSize(aMaxFileSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_MAXFILESIZE_RETURN(this, hrc, 0 /*normal*/,aMaxFileSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_MAXFILESIZE_RETURN(this, hrc, 1 /*hrc exception*/,aMaxFileSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_MAXFILESIZE_RETURN(this, hrc, 9 /*unhandled exception*/,aMaxFileSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setMaxFileSize", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(Options)(BSTR *aOptions)
{
    LogRelFlow(("{%p} %s: enter aOptions=%p\n", this, "RecordingScreenSettings::getOptions", aOptions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOptions);
        BSTROutConverter TmpOptions(aOptions);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_OPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOptions(TmpOptions.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_OPTIONS_RETURN(this, hrc, 0 /*normal*/,TmpOptions.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_OPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_OPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOptions=%ls hrc=%Rhrc\n", this, "RecordingScreenSettings::getOptions", *aOptions, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(Options)(IN_BSTR aOptions)
{
    LogRelFlow(("{%p} %s: enter aOptions=%ls\n", this, "RecordingScreenSettings::setOptions", aOptions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpOptions(aOptions);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_OPTIONS_ENTER(this, TmpOptions.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setOptions(TmpOptions.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_OPTIONS_RETURN(this, hrc, 0 /*normal*/,TmpOptions.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_OPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_OPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setOptions", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(AudioCodec)(RecordingAudioCodec_T *aAudioCodec)
{
    LogRelFlow(("{%p} %s: enter aAudioCodec=%p\n", this, "RecordingScreenSettings::getAudioCodec", aAudioCodec));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAudioCodec);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOCODEC_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAudioCodec(aAudioCodec);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOCODEC_RETURN(this, hrc, 0 /*normal*/,*aAudioCodec);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOCODEC_RETURN(this, hrc, 1 /*hrc exception*/,*aAudioCodec);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOCODEC_RETURN(this, hrc, 9 /*unhandled exception*/,*aAudioCodec);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAudioCodec=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getAudioCodec", *aAudioCodec, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(AudioCodec)(RecordingAudioCodec_T aAudioCodec)
{
    LogRelFlow(("{%p} %s: enter aAudioCodec=%RU32\n", this, "RecordingScreenSettings::setAudioCodec", aAudioCodec));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOCODEC_ENTER(this, aAudioCodec);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAudioCodec(aAudioCodec);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOCODEC_RETURN(this, hrc, 0 /*normal*/,aAudioCodec);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOCODEC_RETURN(this, hrc, 1 /*hrc exception*/,aAudioCodec);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOCODEC_RETURN(this, hrc, 9 /*unhandled exception*/,aAudioCodec);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setAudioCodec", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(AudioHz)(ULONG *aAudioHz)
{
    LogRelFlow(("{%p} %s: enter aAudioHz=%p\n", this, "RecordingScreenSettings::getAudioHz", aAudioHz));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAudioHz);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOHZ_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAudioHz(aAudioHz);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOHZ_RETURN(this, hrc, 0 /*normal*/,*aAudioHz);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOHZ_RETURN(this, hrc, 1 /*hrc exception*/,*aAudioHz);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOHZ_RETURN(this, hrc, 9 /*unhandled exception*/,*aAudioHz);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAudioHz=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getAudioHz", *aAudioHz, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(AudioHz)(ULONG aAudioHz)
{
    LogRelFlow(("{%p} %s: enter aAudioHz=%RU32\n", this, "RecordingScreenSettings::setAudioHz", aAudioHz));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOHZ_ENTER(this, aAudioHz);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAudioHz(aAudioHz);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOHZ_RETURN(this, hrc, 0 /*normal*/,aAudioHz);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOHZ_RETURN(this, hrc, 1 /*hrc exception*/,aAudioHz);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOHZ_RETURN(this, hrc, 9 /*unhandled exception*/,aAudioHz);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setAudioHz", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(AudioBits)(ULONG *aAudioBits)
{
    LogRelFlow(("{%p} %s: enter aAudioBits=%p\n", this, "RecordingScreenSettings::getAudioBits", aAudioBits));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAudioBits);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOBITS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAudioBits(aAudioBits);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOBITS_RETURN(this, hrc, 0 /*normal*/,*aAudioBits);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOBITS_RETURN(this, hrc, 1 /*hrc exception*/,*aAudioBits);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOBITS_RETURN(this, hrc, 9 /*unhandled exception*/,*aAudioBits);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAudioBits=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getAudioBits", *aAudioBits, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(AudioBits)(ULONG aAudioBits)
{
    LogRelFlow(("{%p} %s: enter aAudioBits=%RU32\n", this, "RecordingScreenSettings::setAudioBits", aAudioBits));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOBITS_ENTER(this, aAudioBits);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAudioBits(aAudioBits);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOBITS_RETURN(this, hrc, 0 /*normal*/,aAudioBits);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOBITS_RETURN(this, hrc, 1 /*hrc exception*/,aAudioBits);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOBITS_RETURN(this, hrc, 9 /*unhandled exception*/,aAudioBits);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setAudioBits", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(AudioChannels)(ULONG *aAudioChannels)
{
    LogRelFlow(("{%p} %s: enter aAudioChannels=%p\n", this, "RecordingScreenSettings::getAudioChannels", aAudioChannels));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAudioChannels);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOCHANNELS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAudioChannels(aAudioChannels);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOCHANNELS_RETURN(this, hrc, 0 /*normal*/,*aAudioChannels);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOCHANNELS_RETURN(this, hrc, 1 /*hrc exception*/,*aAudioChannels);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_AUDIOCHANNELS_RETURN(this, hrc, 9 /*unhandled exception*/,*aAudioChannels);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAudioChannels=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getAudioChannels", *aAudioChannels, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(AudioChannels)(ULONG aAudioChannels)
{
    LogRelFlow(("{%p} %s: enter aAudioChannels=%RU32\n", this, "RecordingScreenSettings::setAudioChannels", aAudioChannels));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOCHANNELS_ENTER(this, aAudioChannels);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAudioChannels(aAudioChannels);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOCHANNELS_RETURN(this, hrc, 0 /*normal*/,aAudioChannels);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOCHANNELS_RETURN(this, hrc, 1 /*hrc exception*/,aAudioChannels);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_AUDIOCHANNELS_RETURN(this, hrc, 9 /*unhandled exception*/,aAudioChannels);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setAudioChannels", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(VideoCodec)(RecordingVideoCodec_T *aVideoCodec)
{
    LogRelFlow(("{%p} %s: enter aVideoCodec=%p\n", this, "RecordingScreenSettings::getVideoCodec", aVideoCodec));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVideoCodec);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOCODEC_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVideoCodec(aVideoCodec);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOCODEC_RETURN(this, hrc, 0 /*normal*/,*aVideoCodec);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOCODEC_RETURN(this, hrc, 1 /*hrc exception*/,*aVideoCodec);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOCODEC_RETURN(this, hrc, 9 /*unhandled exception*/,*aVideoCodec);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVideoCodec=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getVideoCodec", *aVideoCodec, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(VideoCodec)(RecordingVideoCodec_T aVideoCodec)
{
    LogRelFlow(("{%p} %s: enter aVideoCodec=%RU32\n", this, "RecordingScreenSettings::setVideoCodec", aVideoCodec));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOCODEC_ENTER(this, aVideoCodec);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVideoCodec(aVideoCodec);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOCODEC_RETURN(this, hrc, 0 /*normal*/,aVideoCodec);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOCODEC_RETURN(this, hrc, 1 /*hrc exception*/,aVideoCodec);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOCODEC_RETURN(this, hrc, 9 /*unhandled exception*/,aVideoCodec);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setVideoCodec", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(VideoWidth)(ULONG *aVideoWidth)
{
    LogRelFlow(("{%p} %s: enter aVideoWidth=%p\n", this, "RecordingScreenSettings::getVideoWidth", aVideoWidth));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVideoWidth);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOWIDTH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVideoWidth(aVideoWidth);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOWIDTH_RETURN(this, hrc, 0 /*normal*/,*aVideoWidth);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOWIDTH_RETURN(this, hrc, 1 /*hrc exception*/,*aVideoWidth);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOWIDTH_RETURN(this, hrc, 9 /*unhandled exception*/,*aVideoWidth);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVideoWidth=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getVideoWidth", *aVideoWidth, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(VideoWidth)(ULONG aVideoWidth)
{
    LogRelFlow(("{%p} %s: enter aVideoWidth=%RU32\n", this, "RecordingScreenSettings::setVideoWidth", aVideoWidth));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOWIDTH_ENTER(this, aVideoWidth);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVideoWidth(aVideoWidth);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOWIDTH_RETURN(this, hrc, 0 /*normal*/,aVideoWidth);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOWIDTH_RETURN(this, hrc, 1 /*hrc exception*/,aVideoWidth);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOWIDTH_RETURN(this, hrc, 9 /*unhandled exception*/,aVideoWidth);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setVideoWidth", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(VideoHeight)(ULONG *aVideoHeight)
{
    LogRelFlow(("{%p} %s: enter aVideoHeight=%p\n", this, "RecordingScreenSettings::getVideoHeight", aVideoHeight));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVideoHeight);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOHEIGHT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVideoHeight(aVideoHeight);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOHEIGHT_RETURN(this, hrc, 0 /*normal*/,*aVideoHeight);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOHEIGHT_RETURN(this, hrc, 1 /*hrc exception*/,*aVideoHeight);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOHEIGHT_RETURN(this, hrc, 9 /*unhandled exception*/,*aVideoHeight);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVideoHeight=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getVideoHeight", *aVideoHeight, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(VideoHeight)(ULONG aVideoHeight)
{
    LogRelFlow(("{%p} %s: enter aVideoHeight=%RU32\n", this, "RecordingScreenSettings::setVideoHeight", aVideoHeight));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOHEIGHT_ENTER(this, aVideoHeight);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVideoHeight(aVideoHeight);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOHEIGHT_RETURN(this, hrc, 0 /*normal*/,aVideoHeight);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOHEIGHT_RETURN(this, hrc, 1 /*hrc exception*/,aVideoHeight);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOHEIGHT_RETURN(this, hrc, 9 /*unhandled exception*/,aVideoHeight);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setVideoHeight", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(VideoRate)(ULONG *aVideoRate)
{
    LogRelFlow(("{%p} %s: enter aVideoRate=%p\n", this, "RecordingScreenSettings::getVideoRate", aVideoRate));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVideoRate);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEORATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVideoRate(aVideoRate);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEORATE_RETURN(this, hrc, 0 /*normal*/,*aVideoRate);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEORATE_RETURN(this, hrc, 1 /*hrc exception*/,*aVideoRate);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEORATE_RETURN(this, hrc, 9 /*unhandled exception*/,*aVideoRate);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVideoRate=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getVideoRate", *aVideoRate, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(VideoRate)(ULONG aVideoRate)
{
    LogRelFlow(("{%p} %s: enter aVideoRate=%RU32\n", this, "RecordingScreenSettings::setVideoRate", aVideoRate));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEORATE_ENTER(this, aVideoRate);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVideoRate(aVideoRate);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEORATE_RETURN(this, hrc, 0 /*normal*/,aVideoRate);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEORATE_RETURN(this, hrc, 1 /*hrc exception*/,aVideoRate);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEORATE_RETURN(this, hrc, 9 /*unhandled exception*/,aVideoRate);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setVideoRate", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(VideoRateControlMode)(RecordingVideoRateControlMode_T *aVideoRateControlMode)
{
    LogRelFlow(("{%p} %s: enter aVideoRateControlMode=%p\n", this, "RecordingScreenSettings::getVideoRateControlMode", aVideoRateControlMode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVideoRateControlMode);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEORATECONTROLMODE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVideoRateControlMode(aVideoRateControlMode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEORATECONTROLMODE_RETURN(this, hrc, 0 /*normal*/,*aVideoRateControlMode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEORATECONTROLMODE_RETURN(this, hrc, 1 /*hrc exception*/,*aVideoRateControlMode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEORATECONTROLMODE_RETURN(this, hrc, 9 /*unhandled exception*/,*aVideoRateControlMode);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVideoRateControlMode=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getVideoRateControlMode", *aVideoRateControlMode, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(VideoRateControlMode)(RecordingVideoRateControlMode_T aVideoRateControlMode)
{
    LogRelFlow(("{%p} %s: enter aVideoRateControlMode=%RU32\n", this, "RecordingScreenSettings::setVideoRateControlMode", aVideoRateControlMode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEORATECONTROLMODE_ENTER(this, aVideoRateControlMode);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVideoRateControlMode(aVideoRateControlMode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEORATECONTROLMODE_RETURN(this, hrc, 0 /*normal*/,aVideoRateControlMode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEORATECONTROLMODE_RETURN(this, hrc, 1 /*hrc exception*/,aVideoRateControlMode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEORATECONTROLMODE_RETURN(this, hrc, 9 /*unhandled exception*/,aVideoRateControlMode);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setVideoRateControlMode", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(VideoFPS)(ULONG *aVideoFPS)
{
    LogRelFlow(("{%p} %s: enter aVideoFPS=%p\n", this, "RecordingScreenSettings::getVideoFPS", aVideoFPS));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVideoFPS);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOFPS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVideoFPS(aVideoFPS);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOFPS_RETURN(this, hrc, 0 /*normal*/,*aVideoFPS);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOFPS_RETURN(this, hrc, 1 /*hrc exception*/,*aVideoFPS);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOFPS_RETURN(this, hrc, 9 /*unhandled exception*/,*aVideoFPS);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVideoFPS=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getVideoFPS", *aVideoFPS, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(VideoFPS)(ULONG aVideoFPS)
{
    LogRelFlow(("{%p} %s: enter aVideoFPS=%RU32\n", this, "RecordingScreenSettings::setVideoFPS", aVideoFPS));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOFPS_ENTER(this, aVideoFPS);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVideoFPS(aVideoFPS);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOFPS_RETURN(this, hrc, 0 /*normal*/,aVideoFPS);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOFPS_RETURN(this, hrc, 1 /*hrc exception*/,aVideoFPS);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOFPS_RETURN(this, hrc, 9 /*unhandled exception*/,aVideoFPS);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setVideoFPS", hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMGETTER(VideoScalingMethod)(RecordingVideoScalingMethod_T *aVideoScalingMethod)
{
    LogRelFlow(("{%p} %s: enter aVideoScalingMethod=%p\n", this, "RecordingScreenSettings::getVideoScalingMethod", aVideoScalingMethod));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVideoScalingMethod);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOSCALINGMETHOD_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVideoScalingMethod(aVideoScalingMethod);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOSCALINGMETHOD_RETURN(this, hrc, 0 /*normal*/,*aVideoScalingMethod);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOSCALINGMETHOD_RETURN(this, hrc, 1 /*hrc exception*/,*aVideoScalingMethod);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_GET_VIDEOSCALINGMETHOD_RETURN(this, hrc, 9 /*unhandled exception*/,*aVideoScalingMethod);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVideoScalingMethod=%RU32 hrc=%Rhrc\n", this, "RecordingScreenSettings::getVideoScalingMethod", *aVideoScalingMethod, hrc));
    return hrc;
}

STDMETHODIMP RecordingScreenSettingsWrap::COMSETTER(VideoScalingMethod)(RecordingVideoScalingMethod_T aVideoScalingMethod)
{
    LogRelFlow(("{%p} %s: enter aVideoScalingMethod=%RU32\n", this, "RecordingScreenSettings::setVideoScalingMethod", aVideoScalingMethod));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOSCALINGMETHOD_ENTER(this, aVideoScalingMethod);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVideoScalingMethod(aVideoScalingMethod);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOSCALINGMETHOD_RETURN(this, hrc, 0 /*normal*/,aVideoScalingMethod);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOSCALINGMETHOD_RETURN(this, hrc, 1 /*hrc exception*/,aVideoScalingMethod);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_SET_VIDEOSCALINGMETHOD_RETURN(this, hrc, 9 /*unhandled exception*/,aVideoScalingMethod);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "RecordingScreenSettings::setVideoScalingMethod", hrc));
    return hrc;
}


//
// IRecordingScreenSettings methods
//

STDMETHODIMP RecordingScreenSettingsWrap::IsFeatureEnabled(RecordingFeature_T aFeature,
                                                           BOOL *aEnabled)
{
    LogRelFlow(("{%p} %s:enter aFeature=%RU32 aEnabled=%p\n", this, "RecordingScreenSettings::isFeatureEnabled", aFeature, aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEnabled);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_ISFEATUREENABLED_ENTER(this, aFeature);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = isFeatureEnabled(aFeature,
                                   aEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_ISFEATUREENABLED_RETURN(this, hrc, 0 /*normal*/, aFeature, *aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_ISFEATUREENABLED_RETURN(this, hrc, 1 /*hrc exception*/, aFeature, *aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RECORDINGSCREENSETTINGS_ISFEATUREENABLED_RETURN(this, hrc, 9 /*unhandled exception*/, aFeature, *aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aEnabled=%RTbool hrc=%Rhrc\n", this, "RecordingScreenSettings::isFeatureEnabled", *aEnabled, hrc));
    return hrc;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(RecordingScreenSettingsWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(RecordingScreenSettingsWrap, IRecordingScreenSettings)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "RecordingScreenSettingsWrap.cpp"


// ##### BEGINFILE "PCIAddressWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IPCIAddress.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_PCIADDRESS

#include "PCIAddressWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(PCIAddressWrap)

//
// IPCIAddress properties
//

STDMETHODIMP PCIAddressWrap::COMGETTER(Bus)(SHORT *aBus)
{
    LogRelFlow(("{%p} %s: enter aBus=%p\n", this, "PCIAddress::getBus", aBus));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBus);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_BUS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBus(aBus);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_BUS_RETURN(this, hrc, 0 /*normal*/,*aBus);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_BUS_RETURN(this, hrc, 1 /*hrc exception*/,*aBus);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_BUS_RETURN(this, hrc, 9 /*unhandled exception*/,*aBus);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBus=%RI16 hrc=%Rhrc\n", this, "PCIAddress::getBus", *aBus, hrc));
    return hrc;
}

STDMETHODIMP PCIAddressWrap::COMSETTER(Bus)(SHORT aBus)
{
    LogRelFlow(("{%p} %s: enter aBus=%RI16\n", this, "PCIAddress::setBus", aBus));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_BUS_ENTER(this, aBus);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setBus(aBus);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_BUS_RETURN(this, hrc, 0 /*normal*/,aBus);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_BUS_RETURN(this, hrc, 1 /*hrc exception*/,aBus);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_BUS_RETURN(this, hrc, 9 /*unhandled exception*/,aBus);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "PCIAddress::setBus", hrc));
    return hrc;
}

STDMETHODIMP PCIAddressWrap::COMGETTER(Device)(SHORT *aDevice)
{
    LogRelFlow(("{%p} %s: enter aDevice=%p\n", this, "PCIAddress::getDevice", aDevice));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDevice);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_DEVICE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDevice(aDevice);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_DEVICE_RETURN(this, hrc, 0 /*normal*/,*aDevice);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_DEVICE_RETURN(this, hrc, 1 /*hrc exception*/,*aDevice);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_DEVICE_RETURN(this, hrc, 9 /*unhandled exception*/,*aDevice);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDevice=%RI16 hrc=%Rhrc\n", this, "PCIAddress::getDevice", *aDevice, hrc));
    return hrc;
}

STDMETHODIMP PCIAddressWrap::COMSETTER(Device)(SHORT aDevice)
{
    LogRelFlow(("{%p} %s: enter aDevice=%RI16\n", this, "PCIAddress::setDevice", aDevice));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_DEVICE_ENTER(this, aDevice);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDevice(aDevice);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_DEVICE_RETURN(this, hrc, 0 /*normal*/,aDevice);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_DEVICE_RETURN(this, hrc, 1 /*hrc exception*/,aDevice);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_DEVICE_RETURN(this, hrc, 9 /*unhandled exception*/,aDevice);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "PCIAddress::setDevice", hrc));
    return hrc;
}

STDMETHODIMP PCIAddressWrap::COMGETTER(DevFunction)(SHORT *aDevFunction)
{
    LogRelFlow(("{%p} %s: enter aDevFunction=%p\n", this, "PCIAddress::getDevFunction", aDevFunction));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDevFunction);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_DEVFUNCTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDevFunction(aDevFunction);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_DEVFUNCTION_RETURN(this, hrc, 0 /*normal*/,*aDevFunction);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_DEVFUNCTION_RETURN(this, hrc, 1 /*hrc exception*/,*aDevFunction);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_GET_DEVFUNCTION_RETURN(this, hrc, 9 /*unhandled exception*/,*aDevFunction);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDevFunction=%RI16 hrc=%Rhrc\n", this, "PCIAddress::getDevFunction", *aDevFunction, hrc));
    return hrc;
}

STDMETHODIMP PCIAddressWrap::COMSETTER(DevFunction)(SHORT aDevFunction)
{
    LogRelFlow(("{%p} %s: enter aDevFunction=%RI16\n", this, "PCIAddress::setDevFunction", aDevFunction));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_DEVFUNCTION_ENTER(this, aDevFunction);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDevFunction(aDevFunction);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_DEVFUNCTION_RETURN(this, hrc, 0 /*normal*/,aDevFunction);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_DEVFUNCTION_RETURN(this, hrc, 1 /*hrc exception*/,aDevFunction);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_SET_DEVFUNCTION_RETURN(this, hrc, 9 /*unhandled exception*/,aDevFunction);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "PCIAddress::setDevFunction", hrc));
    return hrc;
}


//
// IPCIAddress methods
//

STDMETHODIMP PCIAddressWrap::AsLong(LONG *aResult)
{
    LogRelFlow(("{%p} %s:enter aResult=%p\n", this, "PCIAddress::asLong", aResult));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResult);


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_ASLONG_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = asLong(aResult);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_ASLONG_RETURN(this, hrc, 0 /*normal*/, *aResult);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_ASLONG_RETURN(this, hrc, 1 /*hrc exception*/, *aResult);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_ASLONG_RETURN(this, hrc, 9 /*unhandled exception*/, *aResult);
#endif
    }

    LogRelFlow(("{%p} %s: leave aResult=%RI32 hrc=%Rhrc\n", this, "PCIAddress::asLong", *aResult, hrc));
    return hrc;
}

STDMETHODIMP PCIAddressWrap::FromLong(LONG aNumber)
{
    LogRelFlow(("{%p} %s:enter aNumber=%RI32\n", this, "PCIAddress::fromLong", aNumber));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_FROMLONG_ENTER(this, aNumber);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = fromLong(aNumber);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_FROMLONG_RETURN(this, hrc, 0 /*normal*/, aNumber);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_FROMLONG_RETURN(this, hrc, 1 /*hrc exception*/, aNumber);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PCIADDRESS_FROMLONG_RETURN(this, hrc, 9 /*unhandled exception*/, aNumber);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "PCIAddress::fromLong", hrc));
    return hrc;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(PCIAddressWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(PCIAddressWrap, IPCIAddress)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "PCIAddressWrap.cpp"


// ##### BEGINFILE "MachineWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IMachine.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_MACHINE

#include "MachineWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(MachineWrap)

//
// IMachine properties
//

STDMETHODIMP MachineWrap::COMGETTER(Parent)(IVirtualBox **aParent)
{
    LogRelFlow(("{%p} %s: enter aParent=%p\n", this, "Machine::getParent", aParent));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aParent);
        ComTypeOutConverter<IVirtualBox> TmpParent(aParent);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARENT_ENTER(this);
#endif
        AutoLimitedCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getParent(TmpParent.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARENT_RETURN(this, hrc, 0 /*normal*/,(void *)TmpParent.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARENT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARENT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aParent=%p hrc=%Rhrc\n", this, "Machine::getParent", *aParent, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(Icon)(ComSafeArrayOut(BYTE, aIcon))
{
    LogRelFlow(("{%p} %s: enter aIcon=%p\n", this, "Machine::getIcon", aIcon));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aIcon);
        ArrayOutConverter<BYTE> TmpIcon(ComSafeArrayOutArg(aIcon));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ICON_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getIcon(TmpIcon.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ICON_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpIcon.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ICON_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ICON_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aIcon=%zu hrc=%Rhrc\n", this, "Machine::getIcon", ComSafeArraySize(*aIcon), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(Icon)(ComSafeArrayIn(BYTE, aIcon))
{
    LogRelFlow(("{%p} %s: enter aIcon=%zu\n", this, "Machine::setIcon", ComSafeArraySize(aIcon)));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        ArrayInConverter<BYTE> TmpIcon(ComSafeArrayInArg(aIcon));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_ICON_ENTER(this, (uint32_t)TmpIcon.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setIcon(TmpIcon.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_ICON_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpIcon.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_ICON_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_ICON_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setIcon", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(Accessible)(BOOL *aAccessible)
{
    LogRelFlow(("{%p} %s: enter aAccessible=%p\n", this, "Machine::getAccessible", aAccessible));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAccessible);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ACCESSIBLE_ENTER(this);
#endif
        AutoLimitedCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAccessible(aAccessible);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ACCESSIBLE_RETURN(this, hrc, 0 /*normal*/,*aAccessible != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ACCESSIBLE_RETURN(this, hrc, 1 /*hrc exception*/,*aAccessible != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ACCESSIBLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aAccessible != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAccessible=%RTbool hrc=%Rhrc\n", this, "Machine::getAccessible", *aAccessible, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(AccessError)(IVirtualBoxErrorInfo **aAccessError)
{
    LogRelFlow(("{%p} %s: enter aAccessError=%p\n", this, "Machine::getAccessError", aAccessError));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAccessError);
        ComTypeOutConverter<IVirtualBoxErrorInfo> TmpAccessError(aAccessError);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ACCESSERROR_ENTER(this);
#endif
        AutoLimitedCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAccessError(TmpAccessError.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ACCESSERROR_RETURN(this, hrc, 0 /*normal*/,(void *)TmpAccessError.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ACCESSERROR_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ACCESSERROR_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAccessError=%p hrc=%Rhrc\n", this, "Machine::getAccessError", *aAccessError, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "Machine::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "Machine::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(Name)(IN_BSTR aName)
{
    LogRelFlow(("{%p} %s: enter aName=%ls\n", this, "Machine::setName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpName(aName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_NAME_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setName", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(Description)(BSTR *aDescription)
{
    LogRelFlow(("{%p} %s: enter aDescription=%p\n", this, "Machine::getDescription", aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDescription);
        BSTROutConverter TmpDescription(aDescription);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DESCRIPTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDescription(TmpDescription.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DESCRIPTION_RETURN(this, hrc, 0 /*normal*/,TmpDescription.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DESCRIPTION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DESCRIPTION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDescription=%ls hrc=%Rhrc\n", this, "Machine::getDescription", *aDescription, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(Description)(IN_BSTR aDescription)
{
    LogRelFlow(("{%p} %s: enter aDescription=%ls\n", this, "Machine::setDescription", aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpDescription(aDescription);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DESCRIPTION_ENTER(this, TmpDescription.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDescription(TmpDescription.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DESCRIPTION_RETURN(this, hrc, 0 /*normal*/,TmpDescription.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DESCRIPTION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DESCRIPTION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setDescription", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(Id)(BSTR *aId)
{
    LogRelFlow(("{%p} %s: enter aId=%p\n", this, "Machine::getId", aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aId);
        UuidOutConverter TmpId(aId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ID_ENTER(this);
#endif
        AutoLimitedCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getId(TmpId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ID_RETURN(this, hrc, 0 /*normal*/,TmpId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aId=%ls hrc=%Rhrc\n", this, "Machine::getId", *aId, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(Groups)(ComSafeArrayOut(BSTR, aGroups))
{
    LogRelFlow(("{%p} %s: enter aGroups=%p\n", this, "Machine::getGroups", aGroups));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGroups);
        ArrayBSTROutConverter TmpGroups(ComSafeArrayOutArg(aGroups));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_GROUPS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGroups(TmpGroups.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_GROUPS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpGroups.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_GROUPS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_GROUPS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aGroups=%zu hrc=%Rhrc\n", this, "Machine::getGroups", ComSafeArraySize(*aGroups), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(Groups)(ComSafeArrayIn(IN_BSTR, aGroups))
{
    LogRelFlow(("{%p} %s: enter aGroups=%zu\n", this, "Machine::setGroups", ComSafeArraySize(aGroups)));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        ArrayBSTRInConverter TmpGroups(ComSafeArrayInArg(aGroups));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_GROUPS_ENTER(this, (uint32_t)TmpGroups.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setGroups(TmpGroups.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_GROUPS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpGroups.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_GROUPS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_GROUPS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setGroups", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(OSTypeId)(BSTR *aOSTypeId)
{
    LogRelFlow(("{%p} %s: enter aOSTypeId=%p\n", this, "Machine::getOSTypeId", aOSTypeId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOSTypeId);
        BSTROutConverter TmpOSTypeId(aOSTypeId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_OSTYPEID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOSTypeId(TmpOSTypeId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_OSTYPEID_RETURN(this, hrc, 0 /*normal*/,TmpOSTypeId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_OSTYPEID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_OSTYPEID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOSTypeId=%ls hrc=%Rhrc\n", this, "Machine::getOSTypeId", *aOSTypeId, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(OSTypeId)(IN_BSTR aOSTypeId)
{
    LogRelFlow(("{%p} %s: enter aOSTypeId=%ls\n", this, "Machine::setOSTypeId", aOSTypeId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpOSTypeId(aOSTypeId);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_OSTYPEID_ENTER(this, TmpOSTypeId.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setOSTypeId(TmpOSTypeId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_OSTYPEID_RETURN(this, hrc, 0 /*normal*/,TmpOSTypeId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_OSTYPEID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_OSTYPEID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setOSTypeId", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(HardwareVersion)(BSTR *aHardwareVersion)
{
    LogRelFlow(("{%p} %s: enter aHardwareVersion=%p\n", this, "Machine::getHardwareVersion", aHardwareVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHardwareVersion);
        BSTROutConverter TmpHardwareVersion(aHardwareVersion);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HARDWAREVERSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHardwareVersion(TmpHardwareVersion.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HARDWAREVERSION_RETURN(this, hrc, 0 /*normal*/,TmpHardwareVersion.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HARDWAREVERSION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HARDWAREVERSION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHardwareVersion=%ls hrc=%Rhrc\n", this, "Machine::getHardwareVersion", *aHardwareVersion, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(HardwareVersion)(IN_BSTR aHardwareVersion)
{
    LogRelFlow(("{%p} %s: enter aHardwareVersion=%ls\n", this, "Machine::setHardwareVersion", aHardwareVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpHardwareVersion(aHardwareVersion);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HARDWAREVERSION_ENTER(this, TmpHardwareVersion.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setHardwareVersion(TmpHardwareVersion.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HARDWAREVERSION_RETURN(this, hrc, 0 /*normal*/,TmpHardwareVersion.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HARDWAREVERSION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HARDWAREVERSION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setHardwareVersion", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(HardwareUUID)(BSTR *aHardwareUUID)
{
    LogRelFlow(("{%p} %s: enter aHardwareUUID=%p\n", this, "Machine::getHardwareUUID", aHardwareUUID));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHardwareUUID);
        UuidOutConverter TmpHardwareUUID(aHardwareUUID);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HARDWAREUUID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHardwareUUID(TmpHardwareUUID.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HARDWAREUUID_RETURN(this, hrc, 0 /*normal*/,TmpHardwareUUID.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HARDWAREUUID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HARDWAREUUID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHardwareUUID=%ls hrc=%Rhrc\n", this, "Machine::getHardwareUUID", *aHardwareUUID, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(HardwareUUID)(IN_BSTR aHardwareUUID)
{
    LogRelFlow(("{%p} %s: enter aHardwareUUID=%ls\n", this, "Machine::setHardwareUUID", aHardwareUUID));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        UuidInConverter TmpHardwareUUID(aHardwareUUID);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HARDWAREUUID_ENTER(this, TmpHardwareUUID.uuid().toStringCurly().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setHardwareUUID(TmpHardwareUUID.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HARDWAREUUID_RETURN(this, hrc, 0 /*normal*/,TmpHardwareUUID.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HARDWAREUUID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HARDWAREUUID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setHardwareUUID", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(CPUCount)(ULONG *aCPUCount)
{
    LogRelFlow(("{%p} %s: enter aCPUCount=%p\n", this, "Machine::getCPUCount", aCPUCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCPUCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUCOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCPUCount(aCPUCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUCOUNT_RETURN(this, hrc, 0 /*normal*/,*aCPUCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aCPUCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aCPUCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCPUCount=%RU32 hrc=%Rhrc\n", this, "Machine::getCPUCount", *aCPUCount, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(CPUCount)(ULONG aCPUCount)
{
    LogRelFlow(("{%p} %s: enter aCPUCount=%RU32\n", this, "Machine::setCPUCount", aCPUCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUCOUNT_ENTER(this, aCPUCount);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCPUCount(aCPUCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUCOUNT_RETURN(this, hrc, 0 /*normal*/,aCPUCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,aCPUCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,aCPUCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setCPUCount", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(CPUHotPlugEnabled)(BOOL *aCPUHotPlugEnabled)
{
    LogRelFlow(("{%p} %s: enter aCPUHotPlugEnabled=%p\n", this, "Machine::getCPUHotPlugEnabled", aCPUHotPlugEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCPUHotPlugEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUHOTPLUGENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCPUHotPlugEnabled(aCPUHotPlugEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUHOTPLUGENABLED_RETURN(this, hrc, 0 /*normal*/,*aCPUHotPlugEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUHOTPLUGENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aCPUHotPlugEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUHOTPLUGENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aCPUHotPlugEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCPUHotPlugEnabled=%RTbool hrc=%Rhrc\n", this, "Machine::getCPUHotPlugEnabled", *aCPUHotPlugEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(CPUHotPlugEnabled)(BOOL aCPUHotPlugEnabled)
{
    LogRelFlow(("{%p} %s: enter aCPUHotPlugEnabled=%RTbool\n", this, "Machine::setCPUHotPlugEnabled", aCPUHotPlugEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUHOTPLUGENABLED_ENTER(this, aCPUHotPlugEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCPUHotPlugEnabled(aCPUHotPlugEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUHOTPLUGENABLED_RETURN(this, hrc, 0 /*normal*/,aCPUHotPlugEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUHOTPLUGENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aCPUHotPlugEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUHOTPLUGENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aCPUHotPlugEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setCPUHotPlugEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(CPUExecutionCap)(ULONG *aCPUExecutionCap)
{
    LogRelFlow(("{%p} %s: enter aCPUExecutionCap=%p\n", this, "Machine::getCPUExecutionCap", aCPUExecutionCap));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCPUExecutionCap);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUEXECUTIONCAP_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCPUExecutionCap(aCPUExecutionCap);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUEXECUTIONCAP_RETURN(this, hrc, 0 /*normal*/,*aCPUExecutionCap);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUEXECUTIONCAP_RETURN(this, hrc, 1 /*hrc exception*/,*aCPUExecutionCap);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUEXECUTIONCAP_RETURN(this, hrc, 9 /*unhandled exception*/,*aCPUExecutionCap);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCPUExecutionCap=%RU32 hrc=%Rhrc\n", this, "Machine::getCPUExecutionCap", *aCPUExecutionCap, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(CPUExecutionCap)(ULONG aCPUExecutionCap)
{
    LogRelFlow(("{%p} %s: enter aCPUExecutionCap=%RU32\n", this, "Machine::setCPUExecutionCap", aCPUExecutionCap));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUEXECUTIONCAP_ENTER(this, aCPUExecutionCap);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCPUExecutionCap(aCPUExecutionCap);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUEXECUTIONCAP_RETURN(this, hrc, 0 /*normal*/,aCPUExecutionCap);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUEXECUTIONCAP_RETURN(this, hrc, 1 /*hrc exception*/,aCPUExecutionCap);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUEXECUTIONCAP_RETURN(this, hrc, 9 /*unhandled exception*/,aCPUExecutionCap);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setCPUExecutionCap", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(CPUIDPortabilityLevel)(ULONG *aCPUIDPortabilityLevel)
{
    LogRelFlow(("{%p} %s: enter aCPUIDPortabilityLevel=%p\n", this, "Machine::getCPUIDPortabilityLevel", aCPUIDPortabilityLevel));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCPUIDPortabilityLevel);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUIDPORTABILITYLEVEL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCPUIDPortabilityLevel(aCPUIDPortabilityLevel);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUIDPORTABILITYLEVEL_RETURN(this, hrc, 0 /*normal*/,*aCPUIDPortabilityLevel);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUIDPORTABILITYLEVEL_RETURN(this, hrc, 1 /*hrc exception*/,*aCPUIDPortabilityLevel);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUIDPORTABILITYLEVEL_RETURN(this, hrc, 9 /*unhandled exception*/,*aCPUIDPortabilityLevel);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCPUIDPortabilityLevel=%RU32 hrc=%Rhrc\n", this, "Machine::getCPUIDPortabilityLevel", *aCPUIDPortabilityLevel, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(CPUIDPortabilityLevel)(ULONG aCPUIDPortabilityLevel)
{
    LogRelFlow(("{%p} %s: enter aCPUIDPortabilityLevel=%RU32\n", this, "Machine::setCPUIDPortabilityLevel", aCPUIDPortabilityLevel));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUIDPORTABILITYLEVEL_ENTER(this, aCPUIDPortabilityLevel);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCPUIDPortabilityLevel(aCPUIDPortabilityLevel);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUIDPORTABILITYLEVEL_RETURN(this, hrc, 0 /*normal*/,aCPUIDPortabilityLevel);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUIDPORTABILITYLEVEL_RETURN(this, hrc, 1 /*hrc exception*/,aCPUIDPortabilityLevel);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUIDPORTABILITYLEVEL_RETURN(this, hrc, 9 /*unhandled exception*/,aCPUIDPortabilityLevel);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setCPUIDPortabilityLevel", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(MemorySize)(ULONG *aMemorySize)
{
    LogRelFlow(("{%p} %s: enter aMemorySize=%p\n", this, "Machine::getMemorySize", aMemorySize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMemorySize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEMORYSIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMemorySize(aMemorySize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEMORYSIZE_RETURN(this, hrc, 0 /*normal*/,*aMemorySize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEMORYSIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aMemorySize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEMORYSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aMemorySize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMemorySize=%RU32 hrc=%Rhrc\n", this, "Machine::getMemorySize", *aMemorySize, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(MemorySize)(ULONG aMemorySize)
{
    LogRelFlow(("{%p} %s: enter aMemorySize=%RU32\n", this, "Machine::setMemorySize", aMemorySize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_MEMORYSIZE_ENTER(this, aMemorySize);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMemorySize(aMemorySize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_MEMORYSIZE_RETURN(this, hrc, 0 /*normal*/,aMemorySize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_MEMORYSIZE_RETURN(this, hrc, 1 /*hrc exception*/,aMemorySize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_MEMORYSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,aMemorySize);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setMemorySize", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(MemoryBalloonSize)(ULONG *aMemoryBalloonSize)
{
    LogRelFlow(("{%p} %s: enter aMemoryBalloonSize=%p\n", this, "Machine::getMemoryBalloonSize", aMemoryBalloonSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMemoryBalloonSize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEMORYBALLOONSIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMemoryBalloonSize(aMemoryBalloonSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEMORYBALLOONSIZE_RETURN(this, hrc, 0 /*normal*/,*aMemoryBalloonSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEMORYBALLOONSIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aMemoryBalloonSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEMORYBALLOONSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aMemoryBalloonSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMemoryBalloonSize=%RU32 hrc=%Rhrc\n", this, "Machine::getMemoryBalloonSize", *aMemoryBalloonSize, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(MemoryBalloonSize)(ULONG aMemoryBalloonSize)
{
    LogRelFlow(("{%p} %s: enter aMemoryBalloonSize=%RU32\n", this, "Machine::setMemoryBalloonSize", aMemoryBalloonSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_MEMORYBALLOONSIZE_ENTER(this, aMemoryBalloonSize);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMemoryBalloonSize(aMemoryBalloonSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_MEMORYBALLOONSIZE_RETURN(this, hrc, 0 /*normal*/,aMemoryBalloonSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_MEMORYBALLOONSIZE_RETURN(this, hrc, 1 /*hrc exception*/,aMemoryBalloonSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_MEMORYBALLOONSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,aMemoryBalloonSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setMemoryBalloonSize", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(PageFusionEnabled)(BOOL *aPageFusionEnabled)
{
    LogRelFlow(("{%p} %s: enter aPageFusionEnabled=%p\n", this, "Machine::getPageFusionEnabled", aPageFusionEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPageFusionEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PAGEFUSIONENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPageFusionEnabled(aPageFusionEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PAGEFUSIONENABLED_RETURN(this, hrc, 0 /*normal*/,*aPageFusionEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PAGEFUSIONENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aPageFusionEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PAGEFUSIONENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aPageFusionEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPageFusionEnabled=%RTbool hrc=%Rhrc\n", this, "Machine::getPageFusionEnabled", *aPageFusionEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(PageFusionEnabled)(BOOL aPageFusionEnabled)
{
    LogRelFlow(("{%p} %s: enter aPageFusionEnabled=%RTbool\n", this, "Machine::setPageFusionEnabled", aPageFusionEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PAGEFUSIONENABLED_ENTER(this, aPageFusionEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setPageFusionEnabled(aPageFusionEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PAGEFUSIONENABLED_RETURN(this, hrc, 0 /*normal*/,aPageFusionEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PAGEFUSIONENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aPageFusionEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PAGEFUSIONENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aPageFusionEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setPageFusionEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(GraphicsAdapter)(IGraphicsAdapter **aGraphicsAdapter)
{
    LogRelFlow(("{%p} %s: enter aGraphicsAdapter=%p\n", this, "Machine::getGraphicsAdapter", aGraphicsAdapter));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGraphicsAdapter);
        ComTypeOutConverter<IGraphicsAdapter> TmpGraphicsAdapter(aGraphicsAdapter);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_GRAPHICSADAPTER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGraphicsAdapter(TmpGraphicsAdapter.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_GRAPHICSADAPTER_RETURN(this, hrc, 0 /*normal*/,(void *)TmpGraphicsAdapter.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_GRAPHICSADAPTER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_GRAPHICSADAPTER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aGraphicsAdapter=%p hrc=%Rhrc\n", this, "Machine::getGraphicsAdapter", *aGraphicsAdapter, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(BIOSSettings)(IBIOSSettings **aBIOSSettings)
{
    LogRelFlow(("{%p} %s: enter aBIOSSettings=%p\n", this, "Machine::getBIOSSettings", aBIOSSettings));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBIOSSettings);
        ComTypeOutConverter<IBIOSSettings> TmpBIOSSettings(aBIOSSettings);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_BIOSSETTINGS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBIOSSettings(TmpBIOSSettings.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_BIOSSETTINGS_RETURN(this, hrc, 0 /*normal*/,(void *)TmpBIOSSettings.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_BIOSSETTINGS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_BIOSSETTINGS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBIOSSettings=%p hrc=%Rhrc\n", this, "Machine::getBIOSSettings", *aBIOSSettings, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(RecordingSettings)(IRecordingSettings **aRecordingSettings)
{
    LogRelFlow(("{%p} %s: enter aRecordingSettings=%p\n", this, "Machine::getRecordingSettings", aRecordingSettings));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRecordingSettings);
        ComTypeOutConverter<IRecordingSettings> TmpRecordingSettings(aRecordingSettings);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_RECORDINGSETTINGS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRecordingSettings(TmpRecordingSettings.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_RECORDINGSETTINGS_RETURN(this, hrc, 0 /*normal*/,(void *)TmpRecordingSettings.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_RECORDINGSETTINGS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_RECORDINGSETTINGS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRecordingSettings=%p hrc=%Rhrc\n", this, "Machine::getRecordingSettings", *aRecordingSettings, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(FirmwareType)(FirmwareType_T *aFirmwareType)
{
    LogRelFlow(("{%p} %s: enter aFirmwareType=%p\n", this, "Machine::getFirmwareType", aFirmwareType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFirmwareType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_FIRMWARETYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFirmwareType(aFirmwareType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_FIRMWARETYPE_RETURN(this, hrc, 0 /*normal*/,*aFirmwareType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_FIRMWARETYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aFirmwareType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_FIRMWARETYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aFirmwareType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFirmwareType=%RU32 hrc=%Rhrc\n", this, "Machine::getFirmwareType", *aFirmwareType, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(FirmwareType)(FirmwareType_T aFirmwareType)
{
    LogRelFlow(("{%p} %s: enter aFirmwareType=%RU32\n", this, "Machine::setFirmwareType", aFirmwareType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_FIRMWARETYPE_ENTER(this, aFirmwareType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setFirmwareType(aFirmwareType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_FIRMWARETYPE_RETURN(this, hrc, 0 /*normal*/,aFirmwareType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_FIRMWARETYPE_RETURN(this, hrc, 1 /*hrc exception*/,aFirmwareType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_FIRMWARETYPE_RETURN(this, hrc, 9 /*unhandled exception*/,aFirmwareType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setFirmwareType", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(PointingHIDType)(PointingHIDType_T *aPointingHIDType)
{
    LogRelFlow(("{%p} %s: enter aPointingHIDType=%p\n", this, "Machine::getPointingHIDType", aPointingHIDType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPointingHIDType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_POINTINGHIDTYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPointingHIDType(aPointingHIDType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_POINTINGHIDTYPE_RETURN(this, hrc, 0 /*normal*/,*aPointingHIDType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_POINTINGHIDTYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aPointingHIDType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_POINTINGHIDTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aPointingHIDType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPointingHIDType=%RU32 hrc=%Rhrc\n", this, "Machine::getPointingHIDType", *aPointingHIDType, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(PointingHIDType)(PointingHIDType_T aPointingHIDType)
{
    LogRelFlow(("{%p} %s: enter aPointingHIDType=%RU32\n", this, "Machine::setPointingHIDType", aPointingHIDType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_POINTINGHIDTYPE_ENTER(this, aPointingHIDType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setPointingHIDType(aPointingHIDType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_POINTINGHIDTYPE_RETURN(this, hrc, 0 /*normal*/,aPointingHIDType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_POINTINGHIDTYPE_RETURN(this, hrc, 1 /*hrc exception*/,aPointingHIDType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_POINTINGHIDTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,aPointingHIDType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setPointingHIDType", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(KeyboardHIDType)(KeyboardHIDType_T *aKeyboardHIDType)
{
    LogRelFlow(("{%p} %s: enter aKeyboardHIDType=%p\n", this, "Machine::getKeyboardHIDType", aKeyboardHIDType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aKeyboardHIDType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_KEYBOARDHIDTYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getKeyboardHIDType(aKeyboardHIDType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_KEYBOARDHIDTYPE_RETURN(this, hrc, 0 /*normal*/,*aKeyboardHIDType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_KEYBOARDHIDTYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aKeyboardHIDType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_KEYBOARDHIDTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aKeyboardHIDType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aKeyboardHIDType=%RU32 hrc=%Rhrc\n", this, "Machine::getKeyboardHIDType", *aKeyboardHIDType, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(KeyboardHIDType)(KeyboardHIDType_T aKeyboardHIDType)
{
    LogRelFlow(("{%p} %s: enter aKeyboardHIDType=%RU32\n", this, "Machine::setKeyboardHIDType", aKeyboardHIDType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_KEYBOARDHIDTYPE_ENTER(this, aKeyboardHIDType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setKeyboardHIDType(aKeyboardHIDType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_KEYBOARDHIDTYPE_RETURN(this, hrc, 0 /*normal*/,aKeyboardHIDType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_KEYBOARDHIDTYPE_RETURN(this, hrc, 1 /*hrc exception*/,aKeyboardHIDType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_KEYBOARDHIDTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,aKeyboardHIDType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setKeyboardHIDType", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(HPETEnabled)(BOOL *aHPETEnabled)
{
    LogRelFlow(("{%p} %s: enter aHPETEnabled=%p\n", this, "Machine::getHPETEnabled", aHPETEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHPETEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HPETENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHPETEnabled(aHPETEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HPETENABLED_RETURN(this, hrc, 0 /*normal*/,*aHPETEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HPETENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aHPETEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_HPETENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aHPETEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHPETEnabled=%RTbool hrc=%Rhrc\n", this, "Machine::getHPETEnabled", *aHPETEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(HPETEnabled)(BOOL aHPETEnabled)
{
    LogRelFlow(("{%p} %s: enter aHPETEnabled=%RTbool\n", this, "Machine::setHPETEnabled", aHPETEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HPETENABLED_ENTER(this, aHPETEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setHPETEnabled(aHPETEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HPETENABLED_RETURN(this, hrc, 0 /*normal*/,aHPETEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HPETENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aHPETEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_HPETENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aHPETEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setHPETEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(ChipsetType)(ChipsetType_T *aChipsetType)
{
    LogRelFlow(("{%p} %s: enter aChipsetType=%p\n", this, "Machine::getChipsetType", aChipsetType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aChipsetType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CHIPSETTYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getChipsetType(aChipsetType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CHIPSETTYPE_RETURN(this, hrc, 0 /*normal*/,*aChipsetType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CHIPSETTYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aChipsetType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CHIPSETTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aChipsetType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aChipsetType=%RU32 hrc=%Rhrc\n", this, "Machine::getChipsetType", *aChipsetType, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(ChipsetType)(ChipsetType_T aChipsetType)
{
    LogRelFlow(("{%p} %s: enter aChipsetType=%RU32\n", this, "Machine::setChipsetType", aChipsetType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CHIPSETTYPE_ENTER(this, aChipsetType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setChipsetType(aChipsetType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CHIPSETTYPE_RETURN(this, hrc, 0 /*normal*/,aChipsetType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CHIPSETTYPE_RETURN(this, hrc, 1 /*hrc exception*/,aChipsetType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CHIPSETTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,aChipsetType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setChipsetType", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(SnapshotFolder)(BSTR *aSnapshotFolder)
{
    LogRelFlow(("{%p} %s: enter aSnapshotFolder=%p\n", this, "Machine::getSnapshotFolder", aSnapshotFolder));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSnapshotFolder);
        BSTROutConverter TmpSnapshotFolder(aSnapshotFolder);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SNAPSHOTFOLDER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSnapshotFolder(TmpSnapshotFolder.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SNAPSHOTFOLDER_RETURN(this, hrc, 0 /*normal*/,TmpSnapshotFolder.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SNAPSHOTFOLDER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SNAPSHOTFOLDER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSnapshotFolder=%ls hrc=%Rhrc\n", this, "Machine::getSnapshotFolder", *aSnapshotFolder, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(SnapshotFolder)(IN_BSTR aSnapshotFolder)
{
    LogRelFlow(("{%p} %s: enter aSnapshotFolder=%ls\n", this, "Machine::setSnapshotFolder", aSnapshotFolder));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpSnapshotFolder(aSnapshotFolder);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_SNAPSHOTFOLDER_ENTER(this, TmpSnapshotFolder.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setSnapshotFolder(TmpSnapshotFolder.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_SNAPSHOTFOLDER_RETURN(this, hrc, 0 /*normal*/,TmpSnapshotFolder.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_SNAPSHOTFOLDER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_SNAPSHOTFOLDER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setSnapshotFolder", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(VRDEServer)(IVRDEServer **aVRDEServer)
{
    LogRelFlow(("{%p} %s: enter aVRDEServer=%p\n", this, "Machine::getVRDEServer", aVRDEServer));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVRDEServer);
        ComTypeOutConverter<IVRDEServer> TmpVRDEServer(aVRDEServer);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_VRDESERVER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVRDEServer(TmpVRDEServer.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_VRDESERVER_RETURN(this, hrc, 0 /*normal*/,(void *)TmpVRDEServer.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_VRDESERVER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_VRDESERVER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVRDEServer=%p hrc=%Rhrc\n", this, "Machine::getVRDEServer", *aVRDEServer, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(EmulatedUSBCardReaderEnabled)(BOOL *aEmulatedUSBCardReaderEnabled)
{
    LogRelFlow(("{%p} %s: enter aEmulatedUSBCardReaderEnabled=%p\n", this, "Machine::getEmulatedUSBCardReaderEnabled", aEmulatedUSBCardReaderEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEmulatedUSBCardReaderEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_EMULATEDUSBCARDREADERENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEmulatedUSBCardReaderEnabled(aEmulatedUSBCardReaderEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_EMULATEDUSBCARDREADERENABLED_RETURN(this, hrc, 0 /*normal*/,*aEmulatedUSBCardReaderEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_EMULATEDUSBCARDREADERENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aEmulatedUSBCardReaderEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_EMULATEDUSBCARDREADERENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aEmulatedUSBCardReaderEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEmulatedUSBCardReaderEnabled=%RTbool hrc=%Rhrc\n", this, "Machine::getEmulatedUSBCardReaderEnabled", *aEmulatedUSBCardReaderEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(EmulatedUSBCardReaderEnabled)(BOOL aEmulatedUSBCardReaderEnabled)
{
    LogRelFlow(("{%p} %s: enter aEmulatedUSBCardReaderEnabled=%RTbool\n", this, "Machine::setEmulatedUSBCardReaderEnabled", aEmulatedUSBCardReaderEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_EMULATEDUSBCARDREADERENABLED_ENTER(this, aEmulatedUSBCardReaderEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setEmulatedUSBCardReaderEnabled(aEmulatedUSBCardReaderEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_EMULATEDUSBCARDREADERENABLED_RETURN(this, hrc, 0 /*normal*/,aEmulatedUSBCardReaderEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_EMULATEDUSBCARDREADERENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aEmulatedUSBCardReaderEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_EMULATEDUSBCARDREADERENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aEmulatedUSBCardReaderEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setEmulatedUSBCardReaderEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(MediumAttachments)(ComSafeArrayOut(IMediumAttachment *, aMediumAttachments))
{
    LogRelFlow(("{%p} %s: enter aMediumAttachments=%p\n", this, "Machine::getMediumAttachments", aMediumAttachments));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMediumAttachments);
        ArrayComTypeOutConverter<IMediumAttachment> TmpMediumAttachments(ComSafeArrayOutArg(aMediumAttachments));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEDIUMATTACHMENTS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMediumAttachments(TmpMediumAttachments.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEDIUMATTACHMENTS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpMediumAttachments.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEDIUMATTACHMENTS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_MEDIUMATTACHMENTS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMediumAttachments=%zu hrc=%Rhrc\n", this, "Machine::getMediumAttachments", ComSafeArraySize(*aMediumAttachments), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(USBControllers)(ComSafeArrayOut(IUSBController *, aUSBControllers))
{
    LogRelFlow(("{%p} %s: enter aUSBControllers=%p\n", this, "Machine::getUSBControllers", aUSBControllers));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUSBControllers);
        ArrayComTypeOutConverter<IUSBController> TmpUSBControllers(ComSafeArrayOutArg(aUSBControllers));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBCONTROLLERS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUSBControllers(TmpUSBControllers.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBCONTROLLERS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpUSBControllers.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBCONTROLLERS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBCONTROLLERS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUSBControllers=%zu hrc=%Rhrc\n", this, "Machine::getUSBControllers", ComSafeArraySize(*aUSBControllers), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(USBDeviceFilters)(IUSBDeviceFilters **aUSBDeviceFilters)
{
    LogRelFlow(("{%p} %s: enter aUSBDeviceFilters=%p\n", this, "Machine::getUSBDeviceFilters", aUSBDeviceFilters));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUSBDeviceFilters);
        ComTypeOutConverter<IUSBDeviceFilters> TmpUSBDeviceFilters(aUSBDeviceFilters);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBDEVICEFILTERS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUSBDeviceFilters(TmpUSBDeviceFilters.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBDEVICEFILTERS_RETURN(this, hrc, 0 /*normal*/,(void *)TmpUSBDeviceFilters.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBDEVICEFILTERS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBDEVICEFILTERS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUSBDeviceFilters=%p hrc=%Rhrc\n", this, "Machine::getUSBDeviceFilters", *aUSBDeviceFilters, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(AudioAdapter)(IAudioAdapter **aAudioAdapter)
{
    LogRelFlow(("{%p} %s: enter aAudioAdapter=%p\n", this, "Machine::getAudioAdapter", aAudioAdapter));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAudioAdapter);
        ComTypeOutConverter<IAudioAdapter> TmpAudioAdapter(aAudioAdapter);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUDIOADAPTER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAudioAdapter(TmpAudioAdapter.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUDIOADAPTER_RETURN(this, hrc, 0 /*normal*/,(void *)TmpAudioAdapter.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUDIOADAPTER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUDIOADAPTER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAudioAdapter=%p hrc=%Rhrc\n", this, "Machine::getAudioAdapter", *aAudioAdapter, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(StorageControllers)(ComSafeArrayOut(IStorageController *, aStorageControllers))
{
    LogRelFlow(("{%p} %s: enter aStorageControllers=%p\n", this, "Machine::getStorageControllers", aStorageControllers));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aStorageControllers);
        ArrayComTypeOutConverter<IStorageController> TmpStorageControllers(ComSafeArrayOutArg(aStorageControllers));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STORAGECONTROLLERS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getStorageControllers(TmpStorageControllers.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STORAGECONTROLLERS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpStorageControllers.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STORAGECONTROLLERS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STORAGECONTROLLERS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aStorageControllers=%zu hrc=%Rhrc\n", this, "Machine::getStorageControllers", ComSafeArraySize(*aStorageControllers), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(SettingsFilePath)(BSTR *aSettingsFilePath)
{
    LogRelFlow(("{%p} %s: enter aSettingsFilePath=%p\n", this, "Machine::getSettingsFilePath", aSettingsFilePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSettingsFilePath);
        BSTROutConverter TmpSettingsFilePath(aSettingsFilePath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSFILEPATH_ENTER(this);
#endif
        AutoLimitedCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSettingsFilePath(TmpSettingsFilePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSFILEPATH_RETURN(this, hrc, 0 /*normal*/,TmpSettingsFilePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSFILEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSFILEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSettingsFilePath=%ls hrc=%Rhrc\n", this, "Machine::getSettingsFilePath", *aSettingsFilePath, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(SettingsAuxFilePath)(BSTR *aSettingsAuxFilePath)
{
    LogRelFlow(("{%p} %s: enter aSettingsAuxFilePath=%p\n", this, "Machine::getSettingsAuxFilePath", aSettingsAuxFilePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSettingsAuxFilePath);
        BSTROutConverter TmpSettingsAuxFilePath(aSettingsAuxFilePath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSAUXFILEPATH_ENTER(this);
#endif
        AutoLimitedCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSettingsAuxFilePath(TmpSettingsAuxFilePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSAUXFILEPATH_RETURN(this, hrc, 0 /*normal*/,TmpSettingsAuxFilePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSAUXFILEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSAUXFILEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSettingsAuxFilePath=%ls hrc=%Rhrc\n", this, "Machine::getSettingsAuxFilePath", *aSettingsAuxFilePath, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(SettingsModified)(BOOL *aSettingsModified)
{
    LogRelFlow(("{%p} %s: enter aSettingsModified=%p\n", this, "Machine::getSettingsModified", aSettingsModified));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSettingsModified);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSMODIFIED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSettingsModified(aSettingsModified);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSMODIFIED_RETURN(this, hrc, 0 /*normal*/,*aSettingsModified != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSMODIFIED_RETURN(this, hrc, 1 /*hrc exception*/,*aSettingsModified != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SETTINGSMODIFIED_RETURN(this, hrc, 9 /*unhandled exception*/,*aSettingsModified != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSettingsModified=%RTbool hrc=%Rhrc\n", this, "Machine::getSettingsModified", *aSettingsModified, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(SessionState)(SessionState_T *aSessionState)
{
    LogRelFlow(("{%p} %s: enter aSessionState=%p\n", this, "Machine::getSessionState", aSessionState));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSessionState);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONSTATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSessionState(aSessionState);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONSTATE_RETURN(this, hrc, 0 /*normal*/,*aSessionState);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONSTATE_RETURN(this, hrc, 1 /*hrc exception*/,*aSessionState);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONSTATE_RETURN(this, hrc, 9 /*unhandled exception*/,*aSessionState);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSessionState=%RU32 hrc=%Rhrc\n", this, "Machine::getSessionState", *aSessionState, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(SessionName)(BSTR *aSessionName)
{
    LogRelFlow(("{%p} %s: enter aSessionName=%p\n", this, "Machine::getSessionName", aSessionName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSessionName);
        BSTROutConverter TmpSessionName(aSessionName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONNAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSessionName(TmpSessionName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONNAME_RETURN(this, hrc, 0 /*normal*/,TmpSessionName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSessionName=%ls hrc=%Rhrc\n", this, "Machine::getSessionName", *aSessionName, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(SessionPID)(ULONG *aSessionPID)
{
    LogRelFlow(("{%p} %s: enter aSessionPID=%p\n", this, "Machine::getSessionPID", aSessionPID));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSessionPID);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONPID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSessionPID(aSessionPID);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONPID_RETURN(this, hrc, 0 /*normal*/,*aSessionPID);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONPID_RETURN(this, hrc, 1 /*hrc exception*/,*aSessionPID);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SESSIONPID_RETURN(this, hrc, 9 /*unhandled exception*/,*aSessionPID);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSessionPID=%RU32 hrc=%Rhrc\n", this, "Machine::getSessionPID", *aSessionPID, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(State)(MachineState_T *aState)
{
    LogRelFlow(("{%p} %s: enter aState=%p\n", this, "Machine::getState", aState));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aState);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getState(aState);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STATE_RETURN(this, hrc, 0 /*normal*/,*aState);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STATE_RETURN(this, hrc, 1 /*hrc exception*/,*aState);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STATE_RETURN(this, hrc, 9 /*unhandled exception*/,*aState);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aState=%RU32 hrc=%Rhrc\n", this, "Machine::getState", *aState, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(LastStateChange)(LONG64 *aLastStateChange)
{
    LogRelFlow(("{%p} %s: enter aLastStateChange=%p\n", this, "Machine::getLastStateChange", aLastStateChange));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLastStateChange);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_LASTSTATECHANGE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLastStateChange(aLastStateChange);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_LASTSTATECHANGE_RETURN(this, hrc, 0 /*normal*/,*aLastStateChange);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_LASTSTATECHANGE_RETURN(this, hrc, 1 /*hrc exception*/,*aLastStateChange);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_LASTSTATECHANGE_RETURN(this, hrc, 9 /*unhandled exception*/,*aLastStateChange);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLastStateChange=%RI64 hrc=%Rhrc\n", this, "Machine::getLastStateChange", *aLastStateChange, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(StateFilePath)(BSTR *aStateFilePath)
{
    LogRelFlow(("{%p} %s: enter aStateFilePath=%p\n", this, "Machine::getStateFilePath", aStateFilePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aStateFilePath);
        BSTROutConverter TmpStateFilePath(aStateFilePath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STATEFILEPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getStateFilePath(TmpStateFilePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STATEFILEPATH_RETURN(this, hrc, 0 /*normal*/,TmpStateFilePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STATEFILEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_STATEFILEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aStateFilePath=%ls hrc=%Rhrc\n", this, "Machine::getStateFilePath", *aStateFilePath, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(LogFolder)(BSTR *aLogFolder)
{
    LogRelFlow(("{%p} %s: enter aLogFolder=%p\n", this, "Machine::getLogFolder", aLogFolder));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLogFolder);
        BSTROutConverter TmpLogFolder(aLogFolder);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_LOGFOLDER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLogFolder(TmpLogFolder.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_LOGFOLDER_RETURN(this, hrc, 0 /*normal*/,TmpLogFolder.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_LOGFOLDER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_LOGFOLDER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLogFolder=%ls hrc=%Rhrc\n", this, "Machine::getLogFolder", *aLogFolder, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(CurrentSnapshot)(ISnapshot **aCurrentSnapshot)
{
    LogRelFlow(("{%p} %s: enter aCurrentSnapshot=%p\n", this, "Machine::getCurrentSnapshot", aCurrentSnapshot));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCurrentSnapshot);
        ComTypeOutConverter<ISnapshot> TmpCurrentSnapshot(aCurrentSnapshot);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CURRENTSNAPSHOT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCurrentSnapshot(TmpCurrentSnapshot.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CURRENTSNAPSHOT_RETURN(this, hrc, 0 /*normal*/,(void *)TmpCurrentSnapshot.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CURRENTSNAPSHOT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CURRENTSNAPSHOT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCurrentSnapshot=%p hrc=%Rhrc\n", this, "Machine::getCurrentSnapshot", *aCurrentSnapshot, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(SnapshotCount)(ULONG *aSnapshotCount)
{
    LogRelFlow(("{%p} %s: enter aSnapshotCount=%p\n", this, "Machine::getSnapshotCount", aSnapshotCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSnapshotCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SNAPSHOTCOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSnapshotCount(aSnapshotCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SNAPSHOTCOUNT_RETURN(this, hrc, 0 /*normal*/,*aSnapshotCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SNAPSHOTCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aSnapshotCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SNAPSHOTCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aSnapshotCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSnapshotCount=%RU32 hrc=%Rhrc\n", this, "Machine::getSnapshotCount", *aSnapshotCount, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(CurrentStateModified)(BOOL *aCurrentStateModified)
{
    LogRelFlow(("{%p} %s: enter aCurrentStateModified=%p\n", this, "Machine::getCurrentStateModified", aCurrentStateModified));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCurrentStateModified);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CURRENTSTATEMODIFIED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCurrentStateModified(aCurrentStateModified);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CURRENTSTATEMODIFIED_RETURN(this, hrc, 0 /*normal*/,*aCurrentStateModified != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CURRENTSTATEMODIFIED_RETURN(this, hrc, 1 /*hrc exception*/,*aCurrentStateModified != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CURRENTSTATEMODIFIED_RETURN(this, hrc, 9 /*unhandled exception*/,*aCurrentStateModified != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCurrentStateModified=%RTbool hrc=%Rhrc\n", this, "Machine::getCurrentStateModified", *aCurrentStateModified, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(SharedFolders)(ComSafeArrayOut(ISharedFolder *, aSharedFolders))
{
    LogRelFlow(("{%p} %s: enter aSharedFolders=%p\n", this, "Machine::getSharedFolders", aSharedFolders));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSharedFolders);
        ArrayComTypeOutConverter<ISharedFolder> TmpSharedFolders(ComSafeArrayOutArg(aSharedFolders));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SHAREDFOLDERS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSharedFolders(TmpSharedFolders.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SHAREDFOLDERS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSharedFolders.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SHAREDFOLDERS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_SHAREDFOLDERS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSharedFolders=%zu hrc=%Rhrc\n", this, "Machine::getSharedFolders", ComSafeArraySize(*aSharedFolders), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(ClipboardMode)(ClipboardMode_T *aClipboardMode)
{
    LogRelFlow(("{%p} %s: enter aClipboardMode=%p\n", this, "Machine::getClipboardMode", aClipboardMode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aClipboardMode);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CLIPBOARDMODE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getClipboardMode(aClipboardMode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CLIPBOARDMODE_RETURN(this, hrc, 0 /*normal*/,*aClipboardMode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CLIPBOARDMODE_RETURN(this, hrc, 1 /*hrc exception*/,*aClipboardMode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CLIPBOARDMODE_RETURN(this, hrc, 9 /*unhandled exception*/,*aClipboardMode);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aClipboardMode=%RU32 hrc=%Rhrc\n", this, "Machine::getClipboardMode", *aClipboardMode, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(ClipboardMode)(ClipboardMode_T aClipboardMode)
{
    LogRelFlow(("{%p} %s: enter aClipboardMode=%RU32\n", this, "Machine::setClipboardMode", aClipboardMode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CLIPBOARDMODE_ENTER(this, aClipboardMode);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setClipboardMode(aClipboardMode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CLIPBOARDMODE_RETURN(this, hrc, 0 /*normal*/,aClipboardMode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CLIPBOARDMODE_RETURN(this, hrc, 1 /*hrc exception*/,aClipboardMode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CLIPBOARDMODE_RETURN(this, hrc, 9 /*unhandled exception*/,aClipboardMode);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setClipboardMode", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(ClipboardFileTransfersEnabled)(BOOL *aClipboardFileTransfersEnabled)
{
    LogRelFlow(("{%p} %s: enter aClipboardFileTransfersEnabled=%p\n", this, "Machine::getClipboardFileTransfersEnabled", aClipboardFileTransfersEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aClipboardFileTransfersEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CLIPBOARDFILETRANSFERSENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getClipboardFileTransfersEnabled(aClipboardFileTransfersEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CLIPBOARDFILETRANSFERSENABLED_RETURN(this, hrc, 0 /*normal*/,*aClipboardFileTransfersEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CLIPBOARDFILETRANSFERSENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aClipboardFileTransfersEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CLIPBOARDFILETRANSFERSENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aClipboardFileTransfersEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aClipboardFileTransfersEnabled=%RTbool hrc=%Rhrc\n", this, "Machine::getClipboardFileTransfersEnabled", *aClipboardFileTransfersEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(ClipboardFileTransfersEnabled)(BOOL aClipboardFileTransfersEnabled)
{
    LogRelFlow(("{%p} %s: enter aClipboardFileTransfersEnabled=%RTbool\n", this, "Machine::setClipboardFileTransfersEnabled", aClipboardFileTransfersEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CLIPBOARDFILETRANSFERSENABLED_ENTER(this, aClipboardFileTransfersEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setClipboardFileTransfersEnabled(aClipboardFileTransfersEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CLIPBOARDFILETRANSFERSENABLED_RETURN(this, hrc, 0 /*normal*/,aClipboardFileTransfersEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CLIPBOARDFILETRANSFERSENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aClipboardFileTransfersEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CLIPBOARDFILETRANSFERSENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aClipboardFileTransfersEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setClipboardFileTransfersEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(DnDMode)(DnDMode_T *aDnDMode)
{
    LogRelFlow(("{%p} %s: enter aDnDMode=%p\n", this, "Machine::getDnDMode", aDnDMode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDnDMode);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DNDMODE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDnDMode(aDnDMode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DNDMODE_RETURN(this, hrc, 0 /*normal*/,*aDnDMode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DNDMODE_RETURN(this, hrc, 1 /*hrc exception*/,*aDnDMode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DNDMODE_RETURN(this, hrc, 9 /*unhandled exception*/,*aDnDMode);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDnDMode=%RU32 hrc=%Rhrc\n", this, "Machine::getDnDMode", *aDnDMode, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(DnDMode)(DnDMode_T aDnDMode)
{
    LogRelFlow(("{%p} %s: enter aDnDMode=%RU32\n", this, "Machine::setDnDMode", aDnDMode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DNDMODE_ENTER(this, aDnDMode);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDnDMode(aDnDMode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DNDMODE_RETURN(this, hrc, 0 /*normal*/,aDnDMode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DNDMODE_RETURN(this, hrc, 1 /*hrc exception*/,aDnDMode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DNDMODE_RETURN(this, hrc, 9 /*unhandled exception*/,aDnDMode);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setDnDMode", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(TeleporterEnabled)(BOOL *aTeleporterEnabled)
{
    LogRelFlow(("{%p} %s: enter aTeleporterEnabled=%p\n", this, "Machine::getTeleporterEnabled", aTeleporterEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aTeleporterEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getTeleporterEnabled(aTeleporterEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERENABLED_RETURN(this, hrc, 0 /*normal*/,*aTeleporterEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aTeleporterEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aTeleporterEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aTeleporterEnabled=%RTbool hrc=%Rhrc\n", this, "Machine::getTeleporterEnabled", *aTeleporterEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(TeleporterEnabled)(BOOL aTeleporterEnabled)
{
    LogRelFlow(("{%p} %s: enter aTeleporterEnabled=%RTbool\n", this, "Machine::setTeleporterEnabled", aTeleporterEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERENABLED_ENTER(this, aTeleporterEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setTeleporterEnabled(aTeleporterEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERENABLED_RETURN(this, hrc, 0 /*normal*/,aTeleporterEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aTeleporterEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aTeleporterEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setTeleporterEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(TeleporterPort)(ULONG *aTeleporterPort)
{
    LogRelFlow(("{%p} %s: enter aTeleporterPort=%p\n", this, "Machine::getTeleporterPort", aTeleporterPort));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aTeleporterPort);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERPORT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getTeleporterPort(aTeleporterPort);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERPORT_RETURN(this, hrc, 0 /*normal*/,*aTeleporterPort);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERPORT_RETURN(this, hrc, 1 /*hrc exception*/,*aTeleporterPort);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERPORT_RETURN(this, hrc, 9 /*unhandled exception*/,*aTeleporterPort);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aTeleporterPort=%RU32 hrc=%Rhrc\n", this, "Machine::getTeleporterPort", *aTeleporterPort, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(TeleporterPort)(ULONG aTeleporterPort)
{
    LogRelFlow(("{%p} %s: enter aTeleporterPort=%RU32\n", this, "Machine::setTeleporterPort", aTeleporterPort));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERPORT_ENTER(this, aTeleporterPort);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setTeleporterPort(aTeleporterPort);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERPORT_RETURN(this, hrc, 0 /*normal*/,aTeleporterPort);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERPORT_RETURN(this, hrc, 1 /*hrc exception*/,aTeleporterPort);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERPORT_RETURN(this, hrc, 9 /*unhandled exception*/,aTeleporterPort);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setTeleporterPort", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(TeleporterAddress)(BSTR *aTeleporterAddress)
{
    LogRelFlow(("{%p} %s: enter aTeleporterAddress=%p\n", this, "Machine::getTeleporterAddress", aTeleporterAddress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aTeleporterAddress);
        BSTROutConverter TmpTeleporterAddress(aTeleporterAddress);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERADDRESS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getTeleporterAddress(TmpTeleporterAddress.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERADDRESS_RETURN(this, hrc, 0 /*normal*/,TmpTeleporterAddress.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERADDRESS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERADDRESS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aTeleporterAddress=%ls hrc=%Rhrc\n", this, "Machine::getTeleporterAddress", *aTeleporterAddress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(TeleporterAddress)(IN_BSTR aTeleporterAddress)
{
    LogRelFlow(("{%p} %s: enter aTeleporterAddress=%ls\n", this, "Machine::setTeleporterAddress", aTeleporterAddress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpTeleporterAddress(aTeleporterAddress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERADDRESS_ENTER(this, TmpTeleporterAddress.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setTeleporterAddress(TmpTeleporterAddress.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERADDRESS_RETURN(this, hrc, 0 /*normal*/,TmpTeleporterAddress.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERADDRESS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERADDRESS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setTeleporterAddress", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(TeleporterPassword)(BSTR *aTeleporterPassword)
{
    LogRelFlow(("{%p} %s: enter aTeleporterPassword=%p\n", this, "Machine::getTeleporterPassword", aTeleporterPassword));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aTeleporterPassword);
        BSTROutConverter TmpTeleporterPassword(aTeleporterPassword);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERPASSWORD_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getTeleporterPassword(TmpTeleporterPassword.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERPASSWORD_RETURN(this, hrc, 0 /*normal*/,TmpTeleporterPassword.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERPASSWORD_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TELEPORTERPASSWORD_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aTeleporterPassword=%ls hrc=%Rhrc\n", this, "Machine::getTeleporterPassword", *aTeleporterPassword, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(TeleporterPassword)(IN_BSTR aTeleporterPassword)
{
    LogRelFlow(("{%p} %s: enter aTeleporterPassword=%ls\n", this, "Machine::setTeleporterPassword", aTeleporterPassword));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpTeleporterPassword(aTeleporterPassword);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERPASSWORD_ENTER(this, TmpTeleporterPassword.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setTeleporterPassword(TmpTeleporterPassword.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERPASSWORD_RETURN(this, hrc, 0 /*normal*/,TmpTeleporterPassword.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERPASSWORD_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TELEPORTERPASSWORD_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setTeleporterPassword", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(ParavirtProvider)(ParavirtProvider_T *aParavirtProvider)
{
    LogRelFlow(("{%p} %s: enter aParavirtProvider=%p\n", this, "Machine::getParavirtProvider", aParavirtProvider));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aParavirtProvider);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARAVIRTPROVIDER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getParavirtProvider(aParavirtProvider);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARAVIRTPROVIDER_RETURN(this, hrc, 0 /*normal*/,*aParavirtProvider);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARAVIRTPROVIDER_RETURN(this, hrc, 1 /*hrc exception*/,*aParavirtProvider);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARAVIRTPROVIDER_RETURN(this, hrc, 9 /*unhandled exception*/,*aParavirtProvider);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aParavirtProvider=%RU32 hrc=%Rhrc\n", this, "Machine::getParavirtProvider", *aParavirtProvider, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(ParavirtProvider)(ParavirtProvider_T aParavirtProvider)
{
    LogRelFlow(("{%p} %s: enter aParavirtProvider=%RU32\n", this, "Machine::setParavirtProvider", aParavirtProvider));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PARAVIRTPROVIDER_ENTER(this, aParavirtProvider);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setParavirtProvider(aParavirtProvider);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PARAVIRTPROVIDER_RETURN(this, hrc, 0 /*normal*/,aParavirtProvider);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PARAVIRTPROVIDER_RETURN(this, hrc, 1 /*hrc exception*/,aParavirtProvider);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PARAVIRTPROVIDER_RETURN(this, hrc, 9 /*unhandled exception*/,aParavirtProvider);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setParavirtProvider", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(RTCUseUTC)(BOOL *aRTCUseUTC)
{
    LogRelFlow(("{%p} %s: enter aRTCUseUTC=%p\n", this, "Machine::getRTCUseUTC", aRTCUseUTC));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRTCUseUTC);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_RTCUSEUTC_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRTCUseUTC(aRTCUseUTC);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_RTCUSEUTC_RETURN(this, hrc, 0 /*normal*/,*aRTCUseUTC != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_RTCUSEUTC_RETURN(this, hrc, 1 /*hrc exception*/,*aRTCUseUTC != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_RTCUSEUTC_RETURN(this, hrc, 9 /*unhandled exception*/,*aRTCUseUTC != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRTCUseUTC=%RTbool hrc=%Rhrc\n", this, "Machine::getRTCUseUTC", *aRTCUseUTC, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(RTCUseUTC)(BOOL aRTCUseUTC)
{
    LogRelFlow(("{%p} %s: enter aRTCUseUTC=%RTbool\n", this, "Machine::setRTCUseUTC", aRTCUseUTC));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_RTCUSEUTC_ENTER(this, aRTCUseUTC != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setRTCUseUTC(aRTCUseUTC != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_RTCUSEUTC_RETURN(this, hrc, 0 /*normal*/,aRTCUseUTC != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_RTCUSEUTC_RETURN(this, hrc, 1 /*hrc exception*/,aRTCUseUTC != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_RTCUSEUTC_RETURN(this, hrc, 9 /*unhandled exception*/,aRTCUseUTC != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setRTCUseUTC", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(IOCacheEnabled)(BOOL *aIOCacheEnabled)
{
    LogRelFlow(("{%p} %s: enter aIOCacheEnabled=%p\n", this, "Machine::getIOCacheEnabled", aIOCacheEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aIOCacheEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_IOCACHEENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getIOCacheEnabled(aIOCacheEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_IOCACHEENABLED_RETURN(this, hrc, 0 /*normal*/,*aIOCacheEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_IOCACHEENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aIOCacheEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_IOCACHEENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aIOCacheEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aIOCacheEnabled=%RTbool hrc=%Rhrc\n", this, "Machine::getIOCacheEnabled", *aIOCacheEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(IOCacheEnabled)(BOOL aIOCacheEnabled)
{
    LogRelFlow(("{%p} %s: enter aIOCacheEnabled=%RTbool\n", this, "Machine::setIOCacheEnabled", aIOCacheEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_IOCACHEENABLED_ENTER(this, aIOCacheEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setIOCacheEnabled(aIOCacheEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_IOCACHEENABLED_RETURN(this, hrc, 0 /*normal*/,aIOCacheEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_IOCACHEENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aIOCacheEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_IOCACHEENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aIOCacheEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setIOCacheEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(IOCacheSize)(ULONG *aIOCacheSize)
{
    LogRelFlow(("{%p} %s: enter aIOCacheSize=%p\n", this, "Machine::getIOCacheSize", aIOCacheSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aIOCacheSize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_IOCACHESIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getIOCacheSize(aIOCacheSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_IOCACHESIZE_RETURN(this, hrc, 0 /*normal*/,*aIOCacheSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_IOCACHESIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aIOCacheSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_IOCACHESIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aIOCacheSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aIOCacheSize=%RU32 hrc=%Rhrc\n", this, "Machine::getIOCacheSize", *aIOCacheSize, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(IOCacheSize)(ULONG aIOCacheSize)
{
    LogRelFlow(("{%p} %s: enter aIOCacheSize=%RU32\n", this, "Machine::setIOCacheSize", aIOCacheSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_IOCACHESIZE_ENTER(this, aIOCacheSize);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setIOCacheSize(aIOCacheSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_IOCACHESIZE_RETURN(this, hrc, 0 /*normal*/,aIOCacheSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_IOCACHESIZE_RETURN(this, hrc, 1 /*hrc exception*/,aIOCacheSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_IOCACHESIZE_RETURN(this, hrc, 9 /*unhandled exception*/,aIOCacheSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setIOCacheSize", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(PCIDeviceAssignments)(ComSafeArrayOut(IPCIDeviceAttachment *, aPCIDeviceAssignments))
{
    LogRelFlow(("{%p} %s: enter aPCIDeviceAssignments=%p\n", this, "Machine::getPCIDeviceAssignments", aPCIDeviceAssignments));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPCIDeviceAssignments);
        ArrayComTypeOutConverter<IPCIDeviceAttachment> TmpPCIDeviceAssignments(ComSafeArrayOutArg(aPCIDeviceAssignments));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PCIDEVICEASSIGNMENTS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPCIDeviceAssignments(TmpPCIDeviceAssignments.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PCIDEVICEASSIGNMENTS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpPCIDeviceAssignments.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PCIDEVICEASSIGNMENTS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PCIDEVICEASSIGNMENTS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPCIDeviceAssignments=%zu hrc=%Rhrc\n", this, "Machine::getPCIDeviceAssignments", ComSafeArraySize(*aPCIDeviceAssignments), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(BandwidthControl)(IBandwidthControl **aBandwidthControl)
{
    LogRelFlow(("{%p} %s: enter aBandwidthControl=%p\n", this, "Machine::getBandwidthControl", aBandwidthControl));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBandwidthControl);
        ComTypeOutConverter<IBandwidthControl> TmpBandwidthControl(aBandwidthControl);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_BANDWIDTHCONTROL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBandwidthControl(TmpBandwidthControl.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_BANDWIDTHCONTROL_RETURN(this, hrc, 0 /*normal*/,(void *)TmpBandwidthControl.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_BANDWIDTHCONTROL_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_BANDWIDTHCONTROL_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBandwidthControl=%p hrc=%Rhrc\n", this, "Machine::getBandwidthControl", *aBandwidthControl, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(TracingEnabled)(BOOL *aTracingEnabled)
{
    LogRelFlow(("{%p} %s: enter aTracingEnabled=%p\n", this, "Machine::getTracingEnabled", aTracingEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aTracingEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TRACINGENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getTracingEnabled(aTracingEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TRACINGENABLED_RETURN(this, hrc, 0 /*normal*/,*aTracingEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TRACINGENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aTracingEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TRACINGENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aTracingEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aTracingEnabled=%RTbool hrc=%Rhrc\n", this, "Machine::getTracingEnabled", *aTracingEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(TracingEnabled)(BOOL aTracingEnabled)
{
    LogRelFlow(("{%p} %s: enter aTracingEnabled=%RTbool\n", this, "Machine::setTracingEnabled", aTracingEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TRACINGENABLED_ENTER(this, aTracingEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setTracingEnabled(aTracingEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TRACINGENABLED_RETURN(this, hrc, 0 /*normal*/,aTracingEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TRACINGENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aTracingEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TRACINGENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aTracingEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setTracingEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(TracingConfig)(BSTR *aTracingConfig)
{
    LogRelFlow(("{%p} %s: enter aTracingConfig=%p\n", this, "Machine::getTracingConfig", aTracingConfig));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aTracingConfig);
        BSTROutConverter TmpTracingConfig(aTracingConfig);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TRACINGCONFIG_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getTracingConfig(TmpTracingConfig.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TRACINGCONFIG_RETURN(this, hrc, 0 /*normal*/,TmpTracingConfig.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TRACINGCONFIG_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_TRACINGCONFIG_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aTracingConfig=%ls hrc=%Rhrc\n", this, "Machine::getTracingConfig", *aTracingConfig, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(TracingConfig)(IN_BSTR aTracingConfig)
{
    LogRelFlow(("{%p} %s: enter aTracingConfig=%ls\n", this, "Machine::setTracingConfig", aTracingConfig));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpTracingConfig(aTracingConfig);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TRACINGCONFIG_ENTER(this, TmpTracingConfig.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setTracingConfig(TmpTracingConfig.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TRACINGCONFIG_RETURN(this, hrc, 0 /*normal*/,TmpTracingConfig.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TRACINGCONFIG_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_TRACINGCONFIG_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setTracingConfig", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(AllowTracingToAccessVM)(BOOL *aAllowTracingToAccessVM)
{
    LogRelFlow(("{%p} %s: enter aAllowTracingToAccessVM=%p\n", this, "Machine::getAllowTracingToAccessVM", aAllowTracingToAccessVM));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAllowTracingToAccessVM);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ALLOWTRACINGTOACCESSVM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAllowTracingToAccessVM(aAllowTracingToAccessVM);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ALLOWTRACINGTOACCESSVM_RETURN(this, hrc, 0 /*normal*/,*aAllowTracingToAccessVM != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ALLOWTRACINGTOACCESSVM_RETURN(this, hrc, 1 /*hrc exception*/,*aAllowTracingToAccessVM != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_ALLOWTRACINGTOACCESSVM_RETURN(this, hrc, 9 /*unhandled exception*/,*aAllowTracingToAccessVM != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAllowTracingToAccessVM=%RTbool hrc=%Rhrc\n", this, "Machine::getAllowTracingToAccessVM", *aAllowTracingToAccessVM, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(AllowTracingToAccessVM)(BOOL aAllowTracingToAccessVM)
{
    LogRelFlow(("{%p} %s: enter aAllowTracingToAccessVM=%RTbool\n", this, "Machine::setAllowTracingToAccessVM", aAllowTracingToAccessVM));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_ALLOWTRACINGTOACCESSVM_ENTER(this, aAllowTracingToAccessVM != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAllowTracingToAccessVM(aAllowTracingToAccessVM != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_ALLOWTRACINGTOACCESSVM_RETURN(this, hrc, 0 /*normal*/,aAllowTracingToAccessVM != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_ALLOWTRACINGTOACCESSVM_RETURN(this, hrc, 1 /*hrc exception*/,aAllowTracingToAccessVM != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_ALLOWTRACINGTOACCESSVM_RETURN(this, hrc, 9 /*unhandled exception*/,aAllowTracingToAccessVM != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setAllowTracingToAccessVM", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(AutostartEnabled)(BOOL *aAutostartEnabled)
{
    LogRelFlow(("{%p} %s: enter aAutostartEnabled=%p\n", this, "Machine::getAutostartEnabled", aAutostartEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAutostartEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTARTENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAutostartEnabled(aAutostartEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTARTENABLED_RETURN(this, hrc, 0 /*normal*/,*aAutostartEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTARTENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aAutostartEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTARTENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aAutostartEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAutostartEnabled=%RTbool hrc=%Rhrc\n", this, "Machine::getAutostartEnabled", *aAutostartEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(AutostartEnabled)(BOOL aAutostartEnabled)
{
    LogRelFlow(("{%p} %s: enter aAutostartEnabled=%RTbool\n", this, "Machine::setAutostartEnabled", aAutostartEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTARTENABLED_ENTER(this, aAutostartEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAutostartEnabled(aAutostartEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTARTENABLED_RETURN(this, hrc, 0 /*normal*/,aAutostartEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTARTENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aAutostartEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTARTENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aAutostartEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setAutostartEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(AutostartDelay)(ULONG *aAutostartDelay)
{
    LogRelFlow(("{%p} %s: enter aAutostartDelay=%p\n", this, "Machine::getAutostartDelay", aAutostartDelay));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAutostartDelay);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTARTDELAY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAutostartDelay(aAutostartDelay);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTARTDELAY_RETURN(this, hrc, 0 /*normal*/,*aAutostartDelay);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTARTDELAY_RETURN(this, hrc, 1 /*hrc exception*/,*aAutostartDelay);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTARTDELAY_RETURN(this, hrc, 9 /*unhandled exception*/,*aAutostartDelay);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAutostartDelay=%RU32 hrc=%Rhrc\n", this, "Machine::getAutostartDelay", *aAutostartDelay, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(AutostartDelay)(ULONG aAutostartDelay)
{
    LogRelFlow(("{%p} %s: enter aAutostartDelay=%RU32\n", this, "Machine::setAutostartDelay", aAutostartDelay));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTARTDELAY_ENTER(this, aAutostartDelay);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAutostartDelay(aAutostartDelay);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTARTDELAY_RETURN(this, hrc, 0 /*normal*/,aAutostartDelay);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTARTDELAY_RETURN(this, hrc, 1 /*hrc exception*/,aAutostartDelay);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTARTDELAY_RETURN(this, hrc, 9 /*unhandled exception*/,aAutostartDelay);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setAutostartDelay", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(AutostopType)(AutostopType_T *aAutostopType)
{
    LogRelFlow(("{%p} %s: enter aAutostopType=%p\n", this, "Machine::getAutostopType", aAutostopType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAutostopType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTOPTYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAutostopType(aAutostopType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTOPTYPE_RETURN(this, hrc, 0 /*normal*/,*aAutostopType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTOPTYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aAutostopType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_AUTOSTOPTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aAutostopType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAutostopType=%RU32 hrc=%Rhrc\n", this, "Machine::getAutostopType", *aAutostopType, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(AutostopType)(AutostopType_T aAutostopType)
{
    LogRelFlow(("{%p} %s: enter aAutostopType=%RU32\n", this, "Machine::setAutostopType", aAutostopType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTOPTYPE_ENTER(this, aAutostopType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAutostopType(aAutostopType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTOPTYPE_RETURN(this, hrc, 0 /*normal*/,aAutostopType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTOPTYPE_RETURN(this, hrc, 1 /*hrc exception*/,aAutostopType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_AUTOSTOPTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,aAutostopType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setAutostopType", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(DefaultFrontend)(BSTR *aDefaultFrontend)
{
    LogRelFlow(("{%p} %s: enter aDefaultFrontend=%p\n", this, "Machine::getDefaultFrontend", aDefaultFrontend));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDefaultFrontend);
        BSTROutConverter TmpDefaultFrontend(aDefaultFrontend);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DEFAULTFRONTEND_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDefaultFrontend(TmpDefaultFrontend.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DEFAULTFRONTEND_RETURN(this, hrc, 0 /*normal*/,TmpDefaultFrontend.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DEFAULTFRONTEND_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_DEFAULTFRONTEND_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDefaultFrontend=%ls hrc=%Rhrc\n", this, "Machine::getDefaultFrontend", *aDefaultFrontend, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(DefaultFrontend)(IN_BSTR aDefaultFrontend)
{
    LogRelFlow(("{%p} %s: enter aDefaultFrontend=%ls\n", this, "Machine::setDefaultFrontend", aDefaultFrontend));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpDefaultFrontend(aDefaultFrontend);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DEFAULTFRONTEND_ENTER(this, TmpDefaultFrontend.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDefaultFrontend(TmpDefaultFrontend.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DEFAULTFRONTEND_RETURN(this, hrc, 0 /*normal*/,TmpDefaultFrontend.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DEFAULTFRONTEND_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_DEFAULTFRONTEND_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setDefaultFrontend", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(USBProxyAvailable)(BOOL *aUSBProxyAvailable)
{
    LogRelFlow(("{%p} %s: enter aUSBProxyAvailable=%p\n", this, "Machine::getUSBProxyAvailable", aUSBProxyAvailable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUSBProxyAvailable);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBPROXYAVAILABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUSBProxyAvailable(aUSBProxyAvailable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBPROXYAVAILABLE_RETURN(this, hrc, 0 /*normal*/,*aUSBProxyAvailable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBPROXYAVAILABLE_RETURN(this, hrc, 1 /*hrc exception*/,*aUSBProxyAvailable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_USBPROXYAVAILABLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aUSBProxyAvailable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUSBProxyAvailable=%RTbool hrc=%Rhrc\n", this, "Machine::getUSBProxyAvailable", *aUSBProxyAvailable, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(VMProcessPriority)(VMProcPriority_T *aVMProcessPriority)
{
    LogRelFlow(("{%p} %s: enter aVMProcessPriority=%p\n", this, "Machine::getVMProcessPriority", aVMProcessPriority));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVMProcessPriority);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_VMPROCESSPRIORITY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVMProcessPriority(aVMProcessPriority);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_VMPROCESSPRIORITY_RETURN(this, hrc, 0 /*normal*/,*aVMProcessPriority);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_VMPROCESSPRIORITY_RETURN(this, hrc, 1 /*hrc exception*/,*aVMProcessPriority);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_VMPROCESSPRIORITY_RETURN(this, hrc, 9 /*unhandled exception*/,*aVMProcessPriority);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVMProcessPriority=%RU32 hrc=%Rhrc\n", this, "Machine::getVMProcessPriority", *aVMProcessPriority, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(VMProcessPriority)(VMProcPriority_T aVMProcessPriority)
{
    LogRelFlow(("{%p} %s: enter aVMProcessPriority=%RU32\n", this, "Machine::setVMProcessPriority", aVMProcessPriority));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_VMPROCESSPRIORITY_ENTER(this, aVMProcessPriority);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVMProcessPriority(aVMProcessPriority);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_VMPROCESSPRIORITY_RETURN(this, hrc, 0 /*normal*/,aVMProcessPriority);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_VMPROCESSPRIORITY_RETURN(this, hrc, 1 /*hrc exception*/,aVMProcessPriority);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_VMPROCESSPRIORITY_RETURN(this, hrc, 9 /*unhandled exception*/,aVMProcessPriority);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setVMProcessPriority", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(ParavirtDebug)(BSTR *aParavirtDebug)
{
    LogRelFlow(("{%p} %s: enter aParavirtDebug=%p\n", this, "Machine::getParavirtDebug", aParavirtDebug));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aParavirtDebug);
        BSTROutConverter TmpParavirtDebug(aParavirtDebug);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARAVIRTDEBUG_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getParavirtDebug(TmpParavirtDebug.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARAVIRTDEBUG_RETURN(this, hrc, 0 /*normal*/,TmpParavirtDebug.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARAVIRTDEBUG_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_PARAVIRTDEBUG_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aParavirtDebug=%ls hrc=%Rhrc\n", this, "Machine::getParavirtDebug", *aParavirtDebug, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(ParavirtDebug)(IN_BSTR aParavirtDebug)
{
    LogRelFlow(("{%p} %s: enter aParavirtDebug=%ls\n", this, "Machine::setParavirtDebug", aParavirtDebug));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpParavirtDebug(aParavirtDebug);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PARAVIRTDEBUG_ENTER(this, TmpParavirtDebug.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setParavirtDebug(TmpParavirtDebug.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PARAVIRTDEBUG_RETURN(this, hrc, 0 /*normal*/,TmpParavirtDebug.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PARAVIRTDEBUG_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_PARAVIRTDEBUG_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setParavirtDebug", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(CPUProfile)(BSTR *aCPUProfile)
{
    LogRelFlow(("{%p} %s: enter aCPUProfile=%p\n", this, "Machine::getCPUProfile", aCPUProfile));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCPUProfile);
        BSTROutConverter TmpCPUProfile(aCPUProfile);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUPROFILE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCPUProfile(TmpCPUProfile.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUPROFILE_RETURN(this, hrc, 0 /*normal*/,TmpCPUProfile.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUPROFILE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GET_CPUPROFILE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCPUProfile=%ls hrc=%Rhrc\n", this, "Machine::getCPUProfile", *aCPUProfile, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMSETTER(CPUProfile)(IN_BSTR aCPUProfile)
{
    LogRelFlow(("{%p} %s: enter aCPUProfile=%ls\n", this, "Machine::setCPUProfile", aCPUProfile));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpCPUProfile(aCPUProfile);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUPROFILE_ENTER(this, TmpCPUProfile.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCPUProfile(TmpCPUProfile.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUPROFILE_RETURN(this, hrc, 0 /*normal*/,TmpCPUProfile.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUPROFILE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SET_CPUPROFILE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setCPUProfile", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute1IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute2IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute3IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute4IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute5IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute6IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute7IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute8IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute9IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute10IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute11IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute12IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute13IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute14IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute15IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::COMGETTER(InternalAndReservedAttribute16IMachine)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IInternalMachineControl properties
//


//
// IMachine methods
//

STDMETHODIMP MachineWrap::LockMachine(ISession *aSession,
                                      LockType_T aLockType)
{
    LogRelFlow(("{%p} %s:enter aSession=%p aLockType=%RU32\n", this, "Machine::lockMachine", aSession, aLockType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ComTypeInConverter<ISession> TmpSession(aSession);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LOCKMACHINE_ENTER(this, (void *)TmpSession.ptr(), aLockType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = lockMachine(TmpSession.ptr(),
                              aLockType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LOCKMACHINE_RETURN(this, hrc, 0 /*normal*/, (void *)TmpSession.ptr(), aLockType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LOCKMACHINE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aLockType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LOCKMACHINE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aLockType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::lockMachine", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::LaunchVMProcess(ISession *aSession,
                                          IN_BSTR aName,
                                          ComSafeArrayIn(IN_BSTR, aEnvironmentChanges),
                                          IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aSession=%p aName=%ls aEnvironmentChanges=%zu aProgress=%p\n", this, "Machine::launchVMProcess", aSession, aName, aEnvironmentChanges, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeInConverter<ISession> TmpSession(aSession);
        BSTRInConverter TmpName(aName);
        ArrayBSTRInConverter TmpEnvironmentChanges(ComSafeArrayInArg(aEnvironmentChanges));
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LAUNCHVMPROCESS_ENTER(this, (void *)TmpSession.ptr(), TmpName.str().c_str(), (uint32_t)TmpEnvironmentChanges.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = launchVMProcess(TmpSession.ptr(),
                                  TmpName.str(),
                                  TmpEnvironmentChanges.array(),
                                  TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LAUNCHVMPROCESS_RETURN(this, hrc, 0 /*normal*/, (void *)TmpSession.ptr(), TmpName.str().c_str(), (uint32_t)TmpEnvironmentChanges.array().size(), NULL /*for now*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LAUNCHVMPROCESS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LAUNCHVMPROCESS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Machine::launchVMProcess", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetBootOrder(ULONG aPosition,
                                       DeviceType_T aDevice)
{
    LogRelFlow(("{%p} %s:enter aPosition=%RU32 aDevice=%RU32\n", this, "Machine::setBootOrder", aPosition, aDevice));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETBOOTORDER_ENTER(this, aPosition, aDevice);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setBootOrder(aPosition,
                               aDevice);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETBOOTORDER_RETURN(this, hrc, 0 /*normal*/, aPosition, aDevice);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETBOOTORDER_RETURN(this, hrc, 1 /*hrc exception*/, aPosition, aDevice);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETBOOTORDER_RETURN(this, hrc, 9 /*unhandled exception*/, aPosition, aDevice);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setBootOrder", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetBootOrder(ULONG aPosition,
                                       DeviceType_T *aDevice)
{
    LogRelFlow(("{%p} %s:enter aPosition=%RU32 aDevice=%p\n", this, "Machine::getBootOrder", aPosition, aDevice));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDevice);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETBOOTORDER_ENTER(this, aPosition);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBootOrder(aPosition,
                               aDevice);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETBOOTORDER_RETURN(this, hrc, 0 /*normal*/, aPosition, *aDevice);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETBOOTORDER_RETURN(this, hrc, 1 /*hrc exception*/, aPosition, *aDevice);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETBOOTORDER_RETURN(this, hrc, 9 /*unhandled exception*/, aPosition, *aDevice);
#endif
    }

    LogRelFlow(("{%p} %s: leave aDevice=%RU32 hrc=%Rhrc\n", this, "Machine::getBootOrder", *aDevice, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::AttachDevice(IN_BSTR aName,
                                       LONG aControllerPort,
                                       LONG aDevice,
                                       DeviceType_T aType,
                                       IMedium *aMedium)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aType=%RU32 aMedium=%p\n", this, "Machine::attachDevice", aName, aControllerPort, aDevice, aType, aMedium));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        
        
        ComTypeInConverter<IMedium> TmpMedium(aMedium);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHDEVICE_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice, aType, (void *)TmpMedium.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = attachDevice(TmpName.str(),
                               aControllerPort,
                               aDevice,
                               aType,
                               TmpMedium.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHDEVICE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, aType, (void *)TmpMedium.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, aType, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, aType, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::attachDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::AttachDeviceWithoutMedium(IN_BSTR aName,
                                                    LONG aControllerPort,
                                                    LONG aDevice,
                                                    DeviceType_T aType)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aType=%RU32\n", this, "Machine::attachDeviceWithoutMedium", aName, aControllerPort, aDevice, aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHDEVICEWITHOUTMEDIUM_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice, aType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = attachDeviceWithoutMedium(TmpName.str(),
                                            aControllerPort,
                                            aDevice,
                                            aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHDEVICEWITHOUTMEDIUM_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHDEVICEWITHOUTMEDIUM_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHDEVICEWITHOUTMEDIUM_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::attachDeviceWithoutMedium", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::DetachDevice(IN_BSTR aName,
                                       LONG aControllerPort,
                                       LONG aDevice)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32\n", this, "Machine::detachDevice", aName, aControllerPort, aDevice));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHDEVICE_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = detachDevice(TmpName.str(),
                               aControllerPort,
                               aDevice);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHDEVICE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::detachDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::PassthroughDevice(IN_BSTR aName,
                                            LONG aControllerPort,
                                            LONG aDevice,
                                            BOOL aPassthrough)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aPassthrough=%RTbool\n", this, "Machine::passthroughDevice", aName, aControllerPort, aDevice, aPassthrough));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PASSTHROUGHDEVICE_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice, aPassthrough != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = passthroughDevice(TmpName.str(),
                                    aControllerPort,
                                    aDevice,
                                    aPassthrough != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PASSTHROUGHDEVICE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, aPassthrough != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PASSTHROUGHDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, aPassthrough != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PASSTHROUGHDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, aPassthrough != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::passthroughDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::TemporaryEjectDevice(IN_BSTR aName,
                                               LONG aControllerPort,
                                               LONG aDevice,
                                               BOOL aTemporaryEject)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aTemporaryEject=%RTbool\n", this, "Machine::temporaryEjectDevice", aName, aControllerPort, aDevice, aTemporaryEject));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_TEMPORARYEJECTDEVICE_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice, aTemporaryEject != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = temporaryEjectDevice(TmpName.str(),
                                       aControllerPort,
                                       aDevice,
                                       aTemporaryEject != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_TEMPORARYEJECTDEVICE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, aTemporaryEject != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_TEMPORARYEJECTDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, aTemporaryEject != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_TEMPORARYEJECTDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, aTemporaryEject != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::temporaryEjectDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::NonRotationalDevice(IN_BSTR aName,
                                              LONG aControllerPort,
                                              LONG aDevice,
                                              BOOL aNonRotational)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aNonRotational=%RTbool\n", this, "Machine::nonRotationalDevice", aName, aControllerPort, aDevice, aNonRotational));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_NONROTATIONALDEVICE_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice, aNonRotational != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = nonRotationalDevice(TmpName.str(),
                                      aControllerPort,
                                      aDevice,
                                      aNonRotational != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_NONROTATIONALDEVICE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, aNonRotational != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_NONROTATIONALDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, aNonRotational != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_NONROTATIONALDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, aNonRotational != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::nonRotationalDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetAutoDiscardForDevice(IN_BSTR aName,
                                                  LONG aControllerPort,
                                                  LONG aDevice,
                                                  BOOL aDiscard)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aDiscard=%RTbool\n", this, "Machine::setAutoDiscardForDevice", aName, aControllerPort, aDevice, aDiscard));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETAUTODISCARDFORDEVICE_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice, aDiscard != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAutoDiscardForDevice(TmpName.str(),
                                          aControllerPort,
                                          aDevice,
                                          aDiscard != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETAUTODISCARDFORDEVICE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, aDiscard != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETAUTODISCARDFORDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, aDiscard != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETAUTODISCARDFORDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, aDiscard != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setAutoDiscardForDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetHotPluggableForDevice(IN_BSTR aName,
                                                   LONG aControllerPort,
                                                   LONG aDevice,
                                                   BOOL aHotPluggable)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aHotPluggable=%RTbool\n", this, "Machine::setHotPluggableForDevice", aName, aControllerPort, aDevice, aHotPluggable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETHOTPLUGGABLEFORDEVICE_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice, aHotPluggable != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setHotPluggableForDevice(TmpName.str(),
                                           aControllerPort,
                                           aDevice,
                                           aHotPluggable != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETHOTPLUGGABLEFORDEVICE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, aHotPluggable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETHOTPLUGGABLEFORDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, aHotPluggable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETHOTPLUGGABLEFORDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, aHotPluggable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setHotPluggableForDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetBandwidthGroupForDevice(IN_BSTR aName,
                                                     LONG aControllerPort,
                                                     LONG aDevice,
                                                     IBandwidthGroup *aBandwidthGroup)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aBandwidthGroup=%p\n", this, "Machine::setBandwidthGroupForDevice", aName, aControllerPort, aDevice, aBandwidthGroup));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        
        ComTypeInConverter<IBandwidthGroup> TmpBandwidthGroup(aBandwidthGroup);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETBANDWIDTHGROUPFORDEVICE_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice, (void *)TmpBandwidthGroup.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setBandwidthGroupForDevice(TmpName.str(),
                                             aControllerPort,
                                             aDevice,
                                             TmpBandwidthGroup.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETBANDWIDTHGROUPFORDEVICE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, (void *)TmpBandwidthGroup.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETBANDWIDTHGROUPFORDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETBANDWIDTHGROUPFORDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setBandwidthGroupForDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetNoBandwidthGroupForDevice(IN_BSTR aName,
                                                       LONG aControllerPort,
                                                       LONG aDevice)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32\n", this, "Machine::setNoBandwidthGroupForDevice", aName, aControllerPort, aDevice));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETNOBANDWIDTHGROUPFORDEVICE_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setNoBandwidthGroupForDevice(TmpName.str(),
                                               aControllerPort,
                                               aDevice);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETNOBANDWIDTHGROUPFORDEVICE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETNOBANDWIDTHGROUPFORDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETNOBANDWIDTHGROUPFORDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setNoBandwidthGroupForDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::UnmountMedium(IN_BSTR aName,
                                        LONG aControllerPort,
                                        LONG aDevice,
                                        BOOL aForce)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aForce=%RTbool\n", this, "Machine::unmountMedium", aName, aControllerPort, aDevice, aForce));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNMOUNTMEDIUM_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice, aForce != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = unmountMedium(TmpName.str(),
                                aControllerPort,
                                aDevice,
                                aForce != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNMOUNTMEDIUM_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, aForce != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNMOUNTMEDIUM_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, aForce != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNMOUNTMEDIUM_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, aForce != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::unmountMedium", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::MountMedium(IN_BSTR aName,
                                      LONG aControllerPort,
                                      LONG aDevice,
                                      IMedium *aMedium,
                                      BOOL aForce)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aMedium=%p aForce=%RTbool\n", this, "Machine::mountMedium", aName, aControllerPort, aDevice, aMedium, aForce));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        
        
        ComTypeInConverter<IMedium> TmpMedium(aMedium);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_MOUNTMEDIUM_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice, (void *)TmpMedium.ptr(), aForce != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = mountMedium(TmpName.str(),
                              aControllerPort,
                              aDevice,
                              TmpMedium.ptr(),
                              aForce != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_MOUNTMEDIUM_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, (void *)TmpMedium.ptr(), aForce != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_MOUNTMEDIUM_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, 0, aForce != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_MOUNTMEDIUM_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, 0, aForce != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::mountMedium", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetMedium(IN_BSTR aName,
                                    LONG aControllerPort,
                                    LONG aDevice,
                                    IMedium **aMedium)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aMedium=%p\n", this, "Machine::getMedium", aName, aControllerPort, aDevice, aMedium));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMedium);


        BSTRInConverter TmpName(aName);
        
        
        ComTypeOutConverter<IMedium> TmpMedium(aMedium);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUM_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMedium(TmpName.str(),
                            aControllerPort,
                            aDevice,
                            TmpMedium.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUM_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, (void *)TmpMedium.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUM_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUM_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMedium=%p hrc=%Rhrc\n", this, "Machine::getMedium", *aMedium, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetMediumAttachmentsOfController(IN_BSTR aName,
                                                           ComSafeArrayOut(IMediumAttachment *, aMediumAttachments))
{
    LogRelFlow(("{%p} %s:enter aName=%ls aMediumAttachments=%p\n", this, "Machine::getMediumAttachmentsOfController", aName, aMediumAttachments));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMediumAttachments);


        BSTRInConverter TmpName(aName);
        ArrayComTypeOutConverter<IMediumAttachment> TmpMediumAttachments(ComSafeArrayOutArg(aMediumAttachments));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUMATTACHMENTSOFCONTROLLER_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMediumAttachmentsOfController(TmpName.str(),
                                                   TmpMediumAttachments.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUMATTACHMENTSOFCONTROLLER_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), (uint32_t)TmpMediumAttachments.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUMATTACHMENTSOFCONTROLLER_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUMATTACHMENTSOFCONTROLLER_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMediumAttachments=%zu hrc=%Rhrc\n", this, "Machine::getMediumAttachmentsOfController", ComSafeArraySize(*aMediumAttachments), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetMediumAttachment(IN_BSTR aName,
                                              LONG aControllerPort,
                                              LONG aDevice,
                                              IMediumAttachment **aAttachment)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aControllerPort=%RI32 aDevice=%RI32 aAttachment=%p\n", this, "Machine::getMediumAttachment", aName, aControllerPort, aDevice, aAttachment));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAttachment);


        BSTRInConverter TmpName(aName);
        
        
        ComTypeOutConverter<IMediumAttachment> TmpAttachment(aAttachment);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUMATTACHMENT_ENTER(this, TmpName.str().c_str(), aControllerPort, aDevice);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMediumAttachment(TmpName.str(),
                                      aControllerPort,
                                      aDevice,
                                      TmpAttachment.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUMATTACHMENT_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aControllerPort, aDevice, (void *)TmpAttachment.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUMATTACHMENT_RETURN(this, hrc, 1 /*hrc exception*/, 0, aControllerPort, aDevice, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETMEDIUMATTACHMENT_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aControllerPort, aDevice, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aAttachment=%p hrc=%Rhrc\n", this, "Machine::getMediumAttachment", *aAttachment, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::AttachHostPCIDevice(LONG aHostAddress,
                                              LONG aDesiredGuestAddress,
                                              BOOL aTryToUnbind)
{
    LogRelFlow(("{%p} %s:enter aHostAddress=%RI32 aDesiredGuestAddress=%RI32 aTryToUnbind=%RTbool\n", this, "Machine::attachHostPCIDevice", aHostAddress, aDesiredGuestAddress, aTryToUnbind));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHHOSTPCIDEVICE_ENTER(this, aHostAddress, aDesiredGuestAddress, aTryToUnbind != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = attachHostPCIDevice(aHostAddress,
                                      aDesiredGuestAddress,
                                      aTryToUnbind != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHHOSTPCIDEVICE_RETURN(this, hrc, 0 /*normal*/, aHostAddress, aDesiredGuestAddress, aTryToUnbind != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHHOSTPCIDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, aHostAddress, aDesiredGuestAddress, aTryToUnbind != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ATTACHHOSTPCIDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, aHostAddress, aDesiredGuestAddress, aTryToUnbind != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::attachHostPCIDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::DetachHostPCIDevice(LONG aHostAddress)
{
    LogRelFlow(("{%p} %s:enter aHostAddress=%RI32\n", this, "Machine::detachHostPCIDevice", aHostAddress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHHOSTPCIDEVICE_ENTER(this, aHostAddress);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = detachHostPCIDevice(aHostAddress);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHHOSTPCIDEVICE_RETURN(this, hrc, 0 /*normal*/, aHostAddress);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHHOSTPCIDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, aHostAddress);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHHOSTPCIDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, aHostAddress);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::detachHostPCIDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetNetworkAdapter(ULONG aSlot,
                                            INetworkAdapter **aAdapter)
{
    LogRelFlow(("{%p} %s:enter aSlot=%RU32 aAdapter=%p\n", this, "Machine::getNetworkAdapter", aSlot, aAdapter));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAdapter);


        
        ComTypeOutConverter<INetworkAdapter> TmpAdapter(aAdapter);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETNETWORKADAPTER_ENTER(this, aSlot);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getNetworkAdapter(aSlot,
                                    TmpAdapter.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETNETWORKADAPTER_RETURN(this, hrc, 0 /*normal*/, aSlot, (void *)TmpAdapter.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETNETWORKADAPTER_RETURN(this, hrc, 1 /*hrc exception*/, aSlot, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETNETWORKADAPTER_RETURN(this, hrc, 9 /*unhandled exception*/, aSlot, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aAdapter=%p hrc=%Rhrc\n", this, "Machine::getNetworkAdapter", *aAdapter, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::AddStorageController(IN_BSTR aName,
                                               StorageBus_T aConnectionType,
                                               IStorageController **aController)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aConnectionType=%RU32 aController=%p\n", this, "Machine::addStorageController", aName, aConnectionType, aController));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aController);


        BSTRInConverter TmpName(aName);
        
        ComTypeOutConverter<IStorageController> TmpController(aController);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADDSTORAGECONTROLLER_ENTER(this, TmpName.str().c_str(), aConnectionType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = addStorageController(TmpName.str(),
                                       aConnectionType,
                                       TmpController.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADDSTORAGECONTROLLER_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aConnectionType, (void *)TmpController.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADDSTORAGECONTROLLER_RETURN(this, hrc, 1 /*hrc exception*/, 0, aConnectionType, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADDSTORAGECONTROLLER_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aConnectionType, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aController=%p hrc=%Rhrc\n", this, "Machine::addStorageController", *aController, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetStorageControllerByName(IN_BSTR aName,
                                                     IStorageController **aStorageController)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aStorageController=%p\n", this, "Machine::getStorageControllerByName", aName, aStorageController));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aStorageController);


        BSTRInConverter TmpName(aName);
        ComTypeOutConverter<IStorageController> TmpStorageController(aStorageController);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSTORAGECONTROLLERBYNAME_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getStorageControllerByName(TmpName.str(),
                                             TmpStorageController.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSTORAGECONTROLLERBYNAME_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), (void *)TmpStorageController.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSTORAGECONTROLLERBYNAME_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSTORAGECONTROLLERBYNAME_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aStorageController=%p hrc=%Rhrc\n", this, "Machine::getStorageControllerByName", *aStorageController, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetStorageControllerByInstance(StorageBus_T aConnectionType,
                                                         ULONG aInstance,
                                                         IStorageController **aStorageController)
{
    LogRelFlow(("{%p} %s:enter aConnectionType=%RU32 aInstance=%RU32 aStorageController=%p\n", this, "Machine::getStorageControllerByInstance", aConnectionType, aInstance, aStorageController));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aStorageController);


        
        
        ComTypeOutConverter<IStorageController> TmpStorageController(aStorageController);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSTORAGECONTROLLERBYINSTANCE_ENTER(this, aConnectionType, aInstance);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getStorageControllerByInstance(aConnectionType,
                                                 aInstance,
                                                 TmpStorageController.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSTORAGECONTROLLERBYINSTANCE_RETURN(this, hrc, 0 /*normal*/, aConnectionType, aInstance, (void *)TmpStorageController.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSTORAGECONTROLLERBYINSTANCE_RETURN(this, hrc, 1 /*hrc exception*/, aConnectionType, aInstance, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSTORAGECONTROLLERBYINSTANCE_RETURN(this, hrc, 9 /*unhandled exception*/, aConnectionType, aInstance, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aStorageController=%p hrc=%Rhrc\n", this, "Machine::getStorageControllerByInstance", *aStorageController, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::RemoveStorageController(IN_BSTR aName)
{
    LogRelFlow(("{%p} %s:enter aName=%ls\n", this, "Machine::removeStorageController", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVESTORAGECONTROLLER_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeStorageController(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVESTORAGECONTROLLER_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVESTORAGECONTROLLER_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVESTORAGECONTROLLER_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::removeStorageController", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetStorageControllerBootable(IN_BSTR aName,
                                                       BOOL aBootable)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aBootable=%RTbool\n", this, "Machine::setStorageControllerBootable", aName, aBootable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETSTORAGECONTROLLERBOOTABLE_ENTER(this, TmpName.str().c_str(), aBootable != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setStorageControllerBootable(TmpName.str(),
                                               aBootable != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETSTORAGECONTROLLERBOOTABLE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aBootable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETSTORAGECONTROLLERBOOTABLE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aBootable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETSTORAGECONTROLLERBOOTABLE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aBootable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setStorageControllerBootable", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::AddUSBController(IN_BSTR aName,
                                           USBControllerType_T aType,
                                           IUSBController **aController)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aType=%RU32 aController=%p\n", this, "Machine::addUSBController", aName, aType, aController));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aController);


        BSTRInConverter TmpName(aName);
        
        ComTypeOutConverter<IUSBController> TmpController(aController);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADDUSBCONTROLLER_ENTER(this, TmpName.str().c_str(), aType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = addUSBController(TmpName.str(),
                                   aType,
                                   TmpController.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADDUSBCONTROLLER_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aType, (void *)TmpController.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADDUSBCONTROLLER_RETURN(this, hrc, 1 /*hrc exception*/, 0, aType, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADDUSBCONTROLLER_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aType, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aController=%p hrc=%Rhrc\n", this, "Machine::addUSBController", *aController, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::RemoveUSBController(IN_BSTR aName)
{
    LogRelFlow(("{%p} %s:enter aName=%ls\n", this, "Machine::removeUSBController", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVEUSBCONTROLLER_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeUSBController(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVEUSBCONTROLLER_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVEUSBCONTROLLER_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVEUSBCONTROLLER_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::removeUSBController", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetUSBControllerByName(IN_BSTR aName,
                                                 IUSBController **aController)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aController=%p\n", this, "Machine::getUSBControllerByName", aName, aController));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aController);


        BSTRInConverter TmpName(aName);
        ComTypeOutConverter<IUSBController> TmpController(aController);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETUSBCONTROLLERBYNAME_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUSBControllerByName(TmpName.str(),
                                         TmpController.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETUSBCONTROLLERBYNAME_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), (void *)TmpController.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETUSBCONTROLLERBYNAME_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETUSBCONTROLLERBYNAME_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aController=%p hrc=%Rhrc\n", this, "Machine::getUSBControllerByName", *aController, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetUSBControllerCountByType(USBControllerType_T aType,
                                                      ULONG *aControllers)
{
    LogRelFlow(("{%p} %s:enter aType=%RU32 aControllers=%p\n", this, "Machine::getUSBControllerCountByType", aType, aControllers));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aControllers);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETUSBCONTROLLERCOUNTBYTYPE_ENTER(this, aType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUSBControllerCountByType(aType,
                                              aControllers);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETUSBCONTROLLERCOUNTBYTYPE_RETURN(this, hrc, 0 /*normal*/, aType, *aControllers);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETUSBCONTROLLERCOUNTBYTYPE_RETURN(this, hrc, 1 /*hrc exception*/, aType, *aControllers);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETUSBCONTROLLERCOUNTBYTYPE_RETURN(this, hrc, 9 /*unhandled exception*/, aType, *aControllers);
#endif
    }

    LogRelFlow(("{%p} %s: leave aControllers=%RU32 hrc=%Rhrc\n", this, "Machine::getUSBControllerCountByType", *aControllers, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetSerialPort(ULONG aSlot,
                                        ISerialPort **aPort)
{
    LogRelFlow(("{%p} %s:enter aSlot=%RU32 aPort=%p\n", this, "Machine::getSerialPort", aSlot, aPort));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPort);


        
        ComTypeOutConverter<ISerialPort> TmpPort(aPort);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSERIALPORT_ENTER(this, aSlot);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSerialPort(aSlot,
                                TmpPort.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSERIALPORT_RETURN(this, hrc, 0 /*normal*/, aSlot, (void *)TmpPort.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSERIALPORT_RETURN(this, hrc, 1 /*hrc exception*/, aSlot, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETSERIALPORT_RETURN(this, hrc, 9 /*unhandled exception*/, aSlot, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aPort=%p hrc=%Rhrc\n", this, "Machine::getSerialPort", *aPort, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetParallelPort(ULONG aSlot,
                                          IParallelPort **aPort)
{
    LogRelFlow(("{%p} %s:enter aSlot=%RU32 aPort=%p\n", this, "Machine::getParallelPort", aSlot, aPort));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPort);


        
        ComTypeOutConverter<IParallelPort> TmpPort(aPort);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETPARALLELPORT_ENTER(this, aSlot);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getParallelPort(aSlot,
                                  TmpPort.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETPARALLELPORT_RETURN(this, hrc, 0 /*normal*/, aSlot, (void *)TmpPort.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETPARALLELPORT_RETURN(this, hrc, 1 /*hrc exception*/, aSlot, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETPARALLELPORT_RETURN(this, hrc, 9 /*unhandled exception*/, aSlot, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aPort=%p hrc=%Rhrc\n", this, "Machine::getParallelPort", *aPort, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetExtraDataKeys(ComSafeArrayOut(BSTR, aKeys))
{
    LogRelFlow(("{%p} %s:enter aKeys=%p\n", this, "Machine::getExtraDataKeys", aKeys));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aKeys);


        ArrayBSTROutConverter TmpKeys(ComSafeArrayOutArg(aKeys));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEXTRADATAKEYS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getExtraDataKeys(TmpKeys.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEXTRADATAKEYS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpKeys.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEXTRADATAKEYS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEXTRADATAKEYS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aKeys=%zu hrc=%Rhrc\n", this, "Machine::getExtraDataKeys", ComSafeArraySize(*aKeys), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetExtraData(IN_BSTR aKey,
                                       BSTR *aValue)
{
    LogRelFlow(("{%p} %s:enter aKey=%ls aValue=%p\n", this, "Machine::getExtraData", aKey, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);


        BSTRInConverter TmpKey(aKey);
        BSTROutConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEXTRADATA_ENTER(this, TmpKey.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getExtraData(TmpKey.str(),
                               TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEXTRADATA_RETURN(this, hrc, 0 /*normal*/, TmpKey.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEXTRADATA_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEXTRADATA_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aValue=%ls hrc=%Rhrc\n", this, "Machine::getExtraData", *aValue, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetExtraData(IN_BSTR aKey,
                                       IN_BSTR aValue)
{
    LogRelFlow(("{%p} %s:enter aKey=%ls aValue=%ls\n", this, "Machine::setExtraData", aKey, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpKey(aKey);
        BSTRInConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETEXTRADATA_ENTER(this, TmpKey.str().c_str(), TmpValue.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setExtraData(TmpKey.str(),
                               TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETEXTRADATA_RETURN(this, hrc, 0 /*normal*/, TmpKey.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETEXTRADATA_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETEXTRADATA_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setExtraData", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetCPUProperty(CPUPropertyType_T aProperty,
                                         BOOL *aValue)
{
    LogRelFlow(("{%p} %s:enter aProperty=%RU32 aValue=%p\n", this, "Machine::getCPUProperty", aProperty, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUPROPERTY_ENTER(this, aProperty);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCPUProperty(aProperty,
                                 aValue);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUPROPERTY_RETURN(this, hrc, 0 /*normal*/, aProperty, *aValue != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, aProperty, *aValue != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, aProperty, *aValue != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aValue=%RTbool hrc=%Rhrc\n", this, "Machine::getCPUProperty", *aValue, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetCPUProperty(CPUPropertyType_T aProperty,
                                         BOOL aValue)
{
    LogRelFlow(("{%p} %s:enter aProperty=%RU32 aValue=%RTbool\n", this, "Machine::setCPUProperty", aProperty, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETCPUPROPERTY_ENTER(this, aProperty, aValue != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCPUProperty(aProperty,
                                 aValue != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETCPUPROPERTY_RETURN(this, hrc, 0 /*normal*/, aProperty, aValue != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETCPUPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, aProperty, aValue != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETCPUPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, aProperty, aValue != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setCPUProperty", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetCPUIDLeafByOrdinal(ULONG aOrdinal,
                                                ULONG *aIdx,
                                                ULONG *aIdxSub,
                                                ULONG *aValEax,
                                                ULONG *aValEbx,
                                                ULONG *aValEcx,
                                                ULONG *aValEdx)
{
    LogRelFlow(("{%p} %s:enter aOrdinal=%RU32 aIdx=%p aIdxSub=%p aValEax=%p aValEbx=%p aValEcx=%p aValEdx=%p\n", this, "Machine::getCPUIDLeafByOrdinal", aOrdinal, aIdx, aIdxSub, aValEax, aValEbx, aValEcx, aValEdx));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aIdx);
        CheckComArgOutPointerValidThrow(aIdxSub);
        CheckComArgOutPointerValidThrow(aValEax);
        CheckComArgOutPointerValidThrow(aValEbx);
        CheckComArgOutPointerValidThrow(aValEcx);
        CheckComArgOutPointerValidThrow(aValEdx);


        
        
        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUIDLEAFBYORDINAL_ENTER(this, aOrdinal);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCPUIDLeafByOrdinal(aOrdinal,
                                        aIdx,
                                        aIdxSub,
                                        aValEax,
                                        aValEbx,
                                        aValEcx,
                                        aValEdx);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUIDLEAFBYORDINAL_RETURN(this, hrc, 0 /*normal*/, aOrdinal, *aIdx, *aIdxSub, *aValEax, *aValEbx, *aValEcx, *aValEdx);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUIDLEAFBYORDINAL_RETURN(this, hrc, 1 /*hrc exception*/, aOrdinal, *aIdx, *aIdxSub, *aValEax, *aValEbx, *aValEcx, *aValEdx);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUIDLEAFBYORDINAL_RETURN(this, hrc, 9 /*unhandled exception*/, aOrdinal, *aIdx, *aIdxSub, *aValEax, *aValEbx, *aValEcx, *aValEdx);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aIdx=%RU32 *aIdxSub=%RU32 *aValEax=%RU32 *aValEbx=%RU32 *aValEcx=%RU32 *aValEdx=%RU32 hrc=%Rhrc\n", this, "Machine::getCPUIDLeafByOrdinal", *aIdx, *aIdxSub, *aValEax, *aValEbx, *aValEcx, *aValEdx, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetCPUIDLeaf(ULONG aIdx,
                                       ULONG aIdxSub,
                                       ULONG *aValEax,
                                       ULONG *aValEbx,
                                       ULONG *aValEcx,
                                       ULONG *aValEdx)
{
    LogRelFlow(("{%p} %s:enter aIdx=%RU32 aIdxSub=%RU32 aValEax=%p aValEbx=%p aValEcx=%p aValEdx=%p\n", this, "Machine::getCPUIDLeaf", aIdx, aIdxSub, aValEax, aValEbx, aValEcx, aValEdx));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValEax);
        CheckComArgOutPointerValidThrow(aValEbx);
        CheckComArgOutPointerValidThrow(aValEcx);
        CheckComArgOutPointerValidThrow(aValEdx);


        
        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUIDLEAF_ENTER(this, aIdx, aIdxSub);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCPUIDLeaf(aIdx,
                               aIdxSub,
                               aValEax,
                               aValEbx,
                               aValEcx,
                               aValEdx);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUIDLEAF_RETURN(this, hrc, 0 /*normal*/, aIdx, aIdxSub, *aValEax, *aValEbx, *aValEcx, *aValEdx);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUIDLEAF_RETURN(this, hrc, 1 /*hrc exception*/, aIdx, aIdxSub, *aValEax, *aValEbx, *aValEcx, *aValEdx);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUIDLEAF_RETURN(this, hrc, 9 /*unhandled exception*/, aIdx, aIdxSub, *aValEax, *aValEbx, *aValEcx, *aValEdx);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aValEax=%RU32 *aValEbx=%RU32 *aValEcx=%RU32 *aValEdx=%RU32 hrc=%Rhrc\n", this, "Machine::getCPUIDLeaf", *aValEax, *aValEbx, *aValEcx, *aValEdx, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetCPUIDLeaf(ULONG aIdx,
                                       ULONG aIdxSub,
                                       ULONG aValEax,
                                       ULONG aValEbx,
                                       ULONG aValEcx,
                                       ULONG aValEdx)
{
    LogRelFlow(("{%p} %s:enter aIdx=%RU32 aIdxSub=%RU32 aValEax=%RU32 aValEbx=%RU32 aValEcx=%RU32 aValEdx=%RU32\n", this, "Machine::setCPUIDLeaf", aIdx, aIdxSub, aValEax, aValEbx, aValEcx, aValEdx));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETCPUIDLEAF_ENTER(this, aIdx, aIdxSub, aValEax, aValEbx, aValEcx, aValEdx);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCPUIDLeaf(aIdx,
                               aIdxSub,
                               aValEax,
                               aValEbx,
                               aValEcx,
                               aValEdx);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETCPUIDLEAF_RETURN(this, hrc, 0 /*normal*/, aIdx, aIdxSub, aValEax, aValEbx, aValEcx, aValEdx);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETCPUIDLEAF_RETURN(this, hrc, 1 /*hrc exception*/, aIdx, aIdxSub, aValEax, aValEbx, aValEcx, aValEdx);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETCPUIDLEAF_RETURN(this, hrc, 9 /*unhandled exception*/, aIdx, aIdxSub, aValEax, aValEbx, aValEcx, aValEdx);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setCPUIDLeaf", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::RemoveCPUIDLeaf(ULONG aIdx,
                                          ULONG aIdxSub)
{
    LogRelFlow(("{%p} %s:enter aIdx=%RU32 aIdxSub=%RU32\n", this, "Machine::removeCPUIDLeaf", aIdx, aIdxSub));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVECPUIDLEAF_ENTER(this, aIdx, aIdxSub);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeCPUIDLeaf(aIdx,
                                  aIdxSub);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVECPUIDLEAF_RETURN(this, hrc, 0 /*normal*/, aIdx, aIdxSub);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVECPUIDLEAF_RETURN(this, hrc, 1 /*hrc exception*/, aIdx, aIdxSub);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVECPUIDLEAF_RETURN(this, hrc, 9 /*unhandled exception*/, aIdx, aIdxSub);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::removeCPUIDLeaf", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::RemoveAllCPUIDLeaves()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Machine::removeAllCPUIDLeaves"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVEALLCPUIDLEAVES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeAllCPUIDLeaves();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVEALLCPUIDLEAVES_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVEALLCPUIDLEAVES_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVEALLCPUIDLEAVES_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::removeAllCPUIDLeaves", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetHWVirtExProperty(HWVirtExPropertyType_T aProperty,
                                              BOOL *aValue)
{
    LogRelFlow(("{%p} %s:enter aProperty=%RU32 aValue=%p\n", this, "Machine::getHWVirtExProperty", aProperty, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETHWVIRTEXPROPERTY_ENTER(this, aProperty);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHWVirtExProperty(aProperty,
                                      aValue);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETHWVIRTEXPROPERTY_RETURN(this, hrc, 0 /*normal*/, aProperty, *aValue != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETHWVIRTEXPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, aProperty, *aValue != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETHWVIRTEXPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, aProperty, *aValue != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aValue=%RTbool hrc=%Rhrc\n", this, "Machine::getHWVirtExProperty", *aValue, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetHWVirtExProperty(HWVirtExPropertyType_T aProperty,
                                              BOOL aValue)
{
    LogRelFlow(("{%p} %s:enter aProperty=%RU32 aValue=%RTbool\n", this, "Machine::setHWVirtExProperty", aProperty, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETHWVIRTEXPROPERTY_ENTER(this, aProperty, aValue != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setHWVirtExProperty(aProperty,
                                      aValue != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETHWVIRTEXPROPERTY_RETURN(this, hrc, 0 /*normal*/, aProperty, aValue != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETHWVIRTEXPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, aProperty, aValue != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETHWVIRTEXPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, aProperty, aValue != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setHWVirtExProperty", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetSettingsFilePath(IN_BSTR aSettingsFilePath,
                                              IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aSettingsFilePath=%ls aProgress=%p\n", this, "Machine::setSettingsFilePath", aSettingsFilePath, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        BSTRInConverter TmpSettingsFilePath(aSettingsFilePath);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETSETTINGSFILEPATH_ENTER(this, TmpSettingsFilePath.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setSettingsFilePath(TmpSettingsFilePath.str(),
                                      TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETSETTINGSFILEPATH_RETURN(this, hrc, 0 /*normal*/, TmpSettingsFilePath.str().c_str(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETSETTINGSFILEPATH_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETSETTINGSFILEPATH_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Machine::setSettingsFilePath", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SaveSettings()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Machine::saveSettings"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SAVESETTINGS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = saveSettings();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SAVESETTINGS_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SAVESETTINGS_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SAVESETTINGS_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::saveSettings", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::DiscardSettings()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Machine::discardSettings"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DISCARDSETTINGS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = discardSettings();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DISCARDSETTINGS_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DISCARDSETTINGS_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DISCARDSETTINGS_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::discardSettings", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::Unregister(CleanupMode_T aCleanupMode,
                                     ComSafeArrayOut(IMedium *, aMedia))
{
    LogRelFlow(("{%p} %s:enter aCleanupMode=%RU32 aMedia=%p\n", this, "Machine::unregister", aCleanupMode, aMedia));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMedia);


        
        ArrayComTypeOutConverter<IMedium> TmpMedia(ComSafeArrayOutArg(aMedia));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNREGISTER_ENTER(this, aCleanupMode);
#endif
        AutoLimitedCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = unregister(autoCaller,
                         aCleanupMode,
                             TmpMedia.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNREGISTER_RETURN(this, hrc, 0 /*normal*/, aCleanupMode, (uint32_t)TmpMedia.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNREGISTER_RETURN(this, hrc, 1 /*hrc exception*/, aCleanupMode, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNREGISTER_RETURN(this, hrc, 9 /*unhandled exception*/, aCleanupMode, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMedia=%zu hrc=%Rhrc\n", this, "Machine::unregister", ComSafeArraySize(*aMedia), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::DeleteConfig(ComSafeArrayIn(IMedium *, aMedia),
                                       IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aMedia=%zu aProgress=%p\n", this, "Machine::deleteConfig", aMedia, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ArrayComTypeInConverter<IMedium> TmpMedia(ComSafeArrayInArg(aMedia));
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETECONFIG_ENTER(this, (uint32_t)TmpMedia.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = deleteConfig(TmpMedia.array(),
                               TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETECONFIG_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpMedia.array().size(), NULL /*for now*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETECONFIG_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETECONFIG_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Machine::deleteConfig", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ExportTo(IAppliance *aAppliance,
                                   IN_BSTR aLocation,
                                   IVirtualSystemDescription **aDescription)
{
    LogRelFlow(("{%p} %s:enter aAppliance=%p aLocation=%ls aDescription=%p\n", this, "Machine::exportTo", aAppliance, aLocation, aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDescription);


        ComTypeInConverter<IAppliance> TmpAppliance(aAppliance);
        BSTRInConverter TmpLocation(aLocation);
        ComTypeOutConverter<IVirtualSystemDescription> TmpDescription(aDescription);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_EXPORTTO_ENTER(this, (void *)TmpAppliance.ptr(), TmpLocation.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = exportTo(TmpAppliance.ptr(),
                           TmpLocation.str(),
                           TmpDescription.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_EXPORTTO_RETURN(this, hrc, 0 /*normal*/, (void *)TmpAppliance.ptr(), TmpLocation.str().c_str(), (void *)TmpDescription.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_EXPORTTO_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_EXPORTTO_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aDescription=%p hrc=%Rhrc\n", this, "Machine::exportTo", *aDescription, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::FindSnapshot(IN_BSTR aNameOrId,
                                       ISnapshot **aSnapshot)
{
    LogRelFlow(("{%p} %s:enter aNameOrId=%ls aSnapshot=%p\n", this, "Machine::findSnapshot", aNameOrId, aSnapshot));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSnapshot);


        BSTRInConverter TmpNameOrId(aNameOrId);
        ComTypeOutConverter<ISnapshot> TmpSnapshot(aSnapshot);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_FINDSNAPSHOT_ENTER(this, TmpNameOrId.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = findSnapshot(TmpNameOrId.str(),
                               TmpSnapshot.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_FINDSNAPSHOT_RETURN(this, hrc, 0 /*normal*/, TmpNameOrId.str().c_str(), (void *)TmpSnapshot.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_FINDSNAPSHOT_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_FINDSNAPSHOT_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aSnapshot=%p hrc=%Rhrc\n", this, "Machine::findSnapshot", *aSnapshot, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::CreateSharedFolder(IN_BSTR aName,
                                             IN_BSTR aHostPath,
                                             BOOL aWritable,
                                             BOOL aAutomount,
                                             IN_BSTR aAutoMountPoint)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aHostPath=%ls aWritable=%RTbool aAutomount=%RTbool aAutoMountPoint=%ls\n", this, "Machine::createSharedFolder", aName, aHostPath, aWritable, aAutomount, aAutoMountPoint));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        BSTRInConverter TmpHostPath(aHostPath);
        
        
        BSTRInConverter TmpAutoMountPoint(aAutoMountPoint);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CREATESHAREDFOLDER_ENTER(this, TmpName.str().c_str(), TmpHostPath.str().c_str(), aWritable != FALSE, aAutomount != FALSE, TmpAutoMountPoint.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createSharedFolder(TmpName.str(),
                                     TmpHostPath.str(),
                                     aWritable != FALSE,
                                     aAutomount != FALSE,
                                     TmpAutoMountPoint.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CREATESHAREDFOLDER_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), TmpHostPath.str().c_str(), aWritable != FALSE, aAutomount != FALSE, TmpAutoMountPoint.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CREATESHAREDFOLDER_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, aWritable != FALSE, aAutomount != FALSE, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CREATESHAREDFOLDER_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, aWritable != FALSE, aAutomount != FALSE, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::createSharedFolder", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::RemoveSharedFolder(IN_BSTR aName)
{
    LogRelFlow(("{%p} %s:enter aName=%ls\n", this, "Machine::removeSharedFolder", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVESHAREDFOLDER_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeSharedFolder(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVESHAREDFOLDER_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVESHAREDFOLDER_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REMOVESHAREDFOLDER_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::removeSharedFolder", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::CanShowConsoleWindow(BOOL *aCanShow)
{
    LogRelFlow(("{%p} %s:enter aCanShow=%p\n", this, "Machine::canShowConsoleWindow", aCanShow));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCanShow);


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CANSHOWCONSOLEWINDOW_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = canShowConsoleWindow(aCanShow);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CANSHOWCONSOLEWINDOW_RETURN(this, hrc, 0 /*normal*/, *aCanShow != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CANSHOWCONSOLEWINDOW_RETURN(this, hrc, 1 /*hrc exception*/, *aCanShow != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CANSHOWCONSOLEWINDOW_RETURN(this, hrc, 9 /*unhandled exception*/, *aCanShow != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aCanShow=%RTbool hrc=%Rhrc\n", this, "Machine::canShowConsoleWindow", *aCanShow, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ShowConsoleWindow(LONG64 *aWinId)
{
    LogRelFlow(("{%p} %s:enter aWinId=%p\n", this, "Machine::showConsoleWindow", aWinId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWinId);


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SHOWCONSOLEWINDOW_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = showConsoleWindow(aWinId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SHOWCONSOLEWINDOW_RETURN(this, hrc, 0 /*normal*/, *aWinId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SHOWCONSOLEWINDOW_RETURN(this, hrc, 1 /*hrc exception*/, *aWinId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SHOWCONSOLEWINDOW_RETURN(this, hrc, 9 /*unhandled exception*/, *aWinId);
#endif
    }

    LogRelFlow(("{%p} %s: leave aWinId=%RI64 hrc=%Rhrc\n", this, "Machine::showConsoleWindow", *aWinId, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetGuestProperty(IN_BSTR aName,
                                           BSTR *aValue,
                                           LONG64 *aTimestamp,
                                           BSTR *aFlags)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aValue=%p aTimestamp=%p aFlags=%p\n", this, "Machine::getGuestProperty", aName, aValue, aTimestamp, aFlags));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);
        CheckComArgOutPointerValidThrow(aTimestamp);
        CheckComArgOutPointerValidThrow(aFlags);


        BSTRInConverter TmpName(aName);
        BSTROutConverter TmpValue(aValue);
        
        BSTROutConverter TmpFlags(aFlags);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTY_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGuestProperty(TmpName.str(),
                                   TmpValue.str(),
                                   aTimestamp,
                                   TmpFlags.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTY_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), TmpValue.str().c_str(), *aTimestamp, TmpFlags.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, *aTimestamp, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, *aTimestamp, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aValue=%ls *aTimestamp=%RI64 *aFlags=%ls hrc=%Rhrc\n", this, "Machine::getGuestProperty", *aValue, *aTimestamp, *aFlags, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetGuestPropertyValue(IN_BSTR aProperty,
                                                BSTR *aValue)
{
    LogRelFlow(("{%p} %s:enter aProperty=%ls aValue=%p\n", this, "Machine::getGuestPropertyValue", aProperty, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);


        BSTRInConverter TmpProperty(aProperty);
        BSTROutConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTYVALUE_ENTER(this, TmpProperty.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGuestPropertyValue(TmpProperty.str(),
                                        TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTYVALUE_RETURN(this, hrc, 0 /*normal*/, TmpProperty.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTYVALUE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTYVALUE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aValue=%ls hrc=%Rhrc\n", this, "Machine::getGuestPropertyValue", *aValue, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetGuestPropertyTimestamp(IN_BSTR aProperty,
                                                    LONG64 *aValue)
{
    LogRelFlow(("{%p} %s:enter aProperty=%ls aValue=%p\n", this, "Machine::getGuestPropertyTimestamp", aProperty, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);


        BSTRInConverter TmpProperty(aProperty);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTYTIMESTAMP_ENTER(this, TmpProperty.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGuestPropertyTimestamp(TmpProperty.str(),
                                            aValue);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTYTIMESTAMP_RETURN(this, hrc, 0 /*normal*/, TmpProperty.str().c_str(), *aValue);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTYTIMESTAMP_RETURN(this, hrc, 1 /*hrc exception*/, 0, *aValue);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETGUESTPROPERTYTIMESTAMP_RETURN(this, hrc, 9 /*unhandled exception*/, 0, *aValue);
#endif
    }

    LogRelFlow(("{%p} %s: leave aValue=%RI64 hrc=%Rhrc\n", this, "Machine::getGuestPropertyTimestamp", *aValue, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetGuestProperty(IN_BSTR aProperty,
                                           IN_BSTR aValue,
                                           IN_BSTR aFlags)
{
    LogRelFlow(("{%p} %s:enter aProperty=%ls aValue=%ls aFlags=%ls\n", this, "Machine::setGuestProperty", aProperty, aValue, aFlags));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpProperty(aProperty);
        BSTRInConverter TmpValue(aValue);
        BSTRInConverter TmpFlags(aFlags);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETGUESTPROPERTY_ENTER(this, TmpProperty.str().c_str(), TmpValue.str().c_str(), TmpFlags.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setGuestProperty(TmpProperty.str(),
                                   TmpValue.str(),
                                   TmpFlags.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETGUESTPROPERTY_RETURN(this, hrc, 0 /*normal*/, TmpProperty.str().c_str(), TmpValue.str().c_str(), TmpFlags.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETGUESTPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETGUESTPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setGuestProperty", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SetGuestPropertyValue(IN_BSTR aProperty,
                                                IN_BSTR aValue)
{
    LogRelFlow(("{%p} %s:enter aProperty=%ls aValue=%ls\n", this, "Machine::setGuestPropertyValue", aProperty, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpProperty(aProperty);
        BSTRInConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETGUESTPROPERTYVALUE_ENTER(this, TmpProperty.str().c_str(), TmpValue.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setGuestPropertyValue(TmpProperty.str(),
                                        TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETGUESTPROPERTYVALUE_RETURN(this, hrc, 0 /*normal*/, TmpProperty.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETGUESTPROPERTYVALUE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SETGUESTPROPERTYVALUE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::setGuestPropertyValue", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::DeleteGuestProperty(IN_BSTR aName)
{
    LogRelFlow(("{%p} %s:enter aName=%ls\n", this, "Machine::deleteGuestProperty", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETEGUESTPROPERTY_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = deleteGuestProperty(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETEGUESTPROPERTY_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETEGUESTPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETEGUESTPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::deleteGuestProperty", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::EnumerateGuestProperties(IN_BSTR aPatterns,
                                                   ComSafeArrayOut(BSTR, aNames),
                                                   ComSafeArrayOut(BSTR, aValues),
                                                   ComSafeArrayOut(LONG64, aTimestamps),
                                                   ComSafeArrayOut(BSTR, aFlags))
{
    LogRelFlow(("{%p} %s:enter aPatterns=%ls aNames=%p aValues=%p aTimestamps=%p aFlags=%p\n", this, "Machine::enumerateGuestProperties", aPatterns, aNames, aValues, aTimestamps, aFlags));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNames);
        CheckComArgOutPointerValidThrow(aValues);
        CheckComArgOutPointerValidThrow(aTimestamps);
        CheckComArgOutPointerValidThrow(aFlags);


        BSTRInConverter TmpPatterns(aPatterns);
        ArrayBSTROutConverter TmpNames(ComSafeArrayOutArg(aNames));
        ArrayBSTROutConverter TmpValues(ComSafeArrayOutArg(aValues));
        ArrayOutConverter<LONG64> TmpTimestamps(ComSafeArrayOutArg(aTimestamps));
        ArrayBSTROutConverter TmpFlags(ComSafeArrayOutArg(aFlags));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENUMERATEGUESTPROPERTIES_ENTER(this, TmpPatterns.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = enumerateGuestProperties(TmpPatterns.str(),
                                           TmpNames.array(),
                                           TmpValues.array(),
                                           TmpTimestamps.array(),
                                           TmpFlags.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENUMERATEGUESTPROPERTIES_RETURN(this, hrc, 0 /*normal*/, TmpPatterns.str().c_str(), (uint32_t)TmpNames.array().size(), NULL /*for now*/, (uint32_t)TmpValues.array().size(), NULL /*for now*/, (uint32_t)TmpTimestamps.array().size(), NULL /*for now*/, (uint32_t)TmpFlags.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENUMERATEGUESTPROPERTIES_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENUMERATEGUESTPROPERTIES_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNames=%zu *aValues=%zu *aTimestamps=%zu *aFlags=%zu hrc=%Rhrc\n", this, "Machine::enumerateGuestProperties", ComSafeArraySize(*aNames), ComSafeArraySize(*aValues), ComSafeArraySize(*aTimestamps), ComSafeArraySize(*aFlags), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::QuerySavedGuestScreenInfo(ULONG aScreenId,
                                                    ULONG *aOriginX,
                                                    ULONG *aOriginY,
                                                    ULONG *aWidth,
                                                    ULONG *aHeight,
                                                    BOOL *aEnabled)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aOriginX=%p aOriginY=%p aWidth=%p aHeight=%p aEnabled=%p\n", this, "Machine::querySavedGuestScreenInfo", aScreenId, aOriginX, aOriginY, aWidth, aHeight, aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOriginX);
        CheckComArgOutPointerValidThrow(aOriginY);
        CheckComArgOutPointerValidThrow(aWidth);
        CheckComArgOutPointerValidThrow(aHeight);
        CheckComArgOutPointerValidThrow(aEnabled);


        
        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYSAVEDGUESTSCREENINFO_ENTER(this, aScreenId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = querySavedGuestScreenInfo(aScreenId,
                                            aOriginX,
                                            aOriginY,
                                            aWidth,
                                            aHeight,
                                            aEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYSAVEDGUESTSCREENINFO_RETURN(this, hrc, 0 /*normal*/, aScreenId, *aOriginX, *aOriginY, *aWidth, *aHeight, *aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYSAVEDGUESTSCREENINFO_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, *aOriginX, *aOriginY, *aWidth, *aHeight, *aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYSAVEDGUESTSCREENINFO_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, *aOriginX, *aOriginY, *aWidth, *aHeight, *aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOriginX=%RU32 *aOriginY=%RU32 *aWidth=%RU32 *aHeight=%RU32 *aEnabled=%RTbool hrc=%Rhrc\n", this, "Machine::querySavedGuestScreenInfo", *aOriginX, *aOriginY, *aWidth, *aHeight, *aEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ReadSavedThumbnailToArray(ULONG aScreenId,
                                                    BitmapFormat_T aBitmapFormat,
                                                    ULONG *aWidth,
                                                    ULONG *aHeight,
                                                    ComSafeArrayOut(BYTE, aData))
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aBitmapFormat=%RU32 aWidth=%p aHeight=%p aData=%p\n", this, "Machine::readSavedThumbnailToArray", aScreenId, aBitmapFormat, aWidth, aHeight, aData));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWidth);
        CheckComArgOutPointerValidThrow(aHeight);
        CheckComArgOutPointerValidThrow(aData);


        
        
        
        
        ArrayOutConverter<BYTE> TmpData(ComSafeArrayOutArg(aData));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READSAVEDTHUMBNAILTOARRAY_ENTER(this, aScreenId, aBitmapFormat);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = readSavedThumbnailToArray(aScreenId,
                                            aBitmapFormat,
                                            aWidth,
                                            aHeight,
                                            TmpData.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READSAVEDTHUMBNAILTOARRAY_RETURN(this, hrc, 0 /*normal*/, aScreenId, aBitmapFormat, *aWidth, *aHeight, (uint32_t)TmpData.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READSAVEDTHUMBNAILTOARRAY_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, aBitmapFormat, *aWidth, *aHeight, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READSAVEDTHUMBNAILTOARRAY_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, aBitmapFormat, *aWidth, *aHeight, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWidth=%RU32 *aHeight=%RU32 aData=%zu hrc=%Rhrc\n", this, "Machine::readSavedThumbnailToArray", *aWidth, *aHeight, ComSafeArraySize(*aData), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::QuerySavedScreenshotInfo(ULONG aScreenId,
                                                   ULONG *aWidth,
                                                   ULONG *aHeight,
                                                   ComSafeArrayOut(BitmapFormat_T, aBitmapFormats))
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aWidth=%p aHeight=%p aBitmapFormats=%p\n", this, "Machine::querySavedScreenshotInfo", aScreenId, aWidth, aHeight, aBitmapFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWidth);
        CheckComArgOutPointerValidThrow(aHeight);
        CheckComArgOutPointerValidThrow(aBitmapFormats);


        
        
        
        ArrayOutConverter<BitmapFormat_T> TmpBitmapFormats(ComSafeArrayOutArg(aBitmapFormats));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYSAVEDSCREENSHOTINFO_ENTER(this, aScreenId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = querySavedScreenshotInfo(aScreenId,
                                           aWidth,
                                           aHeight,
                                           TmpBitmapFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYSAVEDSCREENSHOTINFO_RETURN(this, hrc, 0 /*normal*/, aScreenId, *aWidth, *aHeight, (uint32_t)TmpBitmapFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYSAVEDSCREENSHOTINFO_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, *aWidth, *aHeight, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYSAVEDSCREENSHOTINFO_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, *aWidth, *aHeight, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWidth=%RU32 *aHeight=%RU32 aBitmapFormats=%zu hrc=%Rhrc\n", this, "Machine::querySavedScreenshotInfo", *aWidth, *aHeight, ComSafeArraySize(*aBitmapFormats), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ReadSavedScreenshotToArray(ULONG aScreenId,
                                                     BitmapFormat_T aBitmapFormat,
                                                     ULONG *aWidth,
                                                     ULONG *aHeight,
                                                     ComSafeArrayOut(BYTE, aData))
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aBitmapFormat=%RU32 aWidth=%p aHeight=%p aData=%p\n", this, "Machine::readSavedScreenshotToArray", aScreenId, aBitmapFormat, aWidth, aHeight, aData));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWidth);
        CheckComArgOutPointerValidThrow(aHeight);
        CheckComArgOutPointerValidThrow(aData);


        
        
        
        
        ArrayOutConverter<BYTE> TmpData(ComSafeArrayOutArg(aData));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READSAVEDSCREENSHOTTOARRAY_ENTER(this, aScreenId, aBitmapFormat);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = readSavedScreenshotToArray(aScreenId,
                                             aBitmapFormat,
                                             aWidth,
                                             aHeight,
                                             TmpData.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READSAVEDSCREENSHOTTOARRAY_RETURN(this, hrc, 0 /*normal*/, aScreenId, aBitmapFormat, *aWidth, *aHeight, (uint32_t)TmpData.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READSAVEDSCREENSHOTTOARRAY_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, aBitmapFormat, *aWidth, *aHeight, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READSAVEDSCREENSHOTTOARRAY_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, aBitmapFormat, *aWidth, *aHeight, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWidth=%RU32 *aHeight=%RU32 aData=%zu hrc=%Rhrc\n", this, "Machine::readSavedScreenshotToArray", *aWidth, *aHeight, ComSafeArraySize(*aData), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::HotPlugCPU(ULONG aCpu)
{
    LogRelFlow(("{%p} %s:enter aCpu=%RU32\n", this, "Machine::hotPlugCPU", aCpu));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_HOTPLUGCPU_ENTER(this, aCpu);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = hotPlugCPU(aCpu);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_HOTPLUGCPU_RETURN(this, hrc, 0 /*normal*/, aCpu);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_HOTPLUGCPU_RETURN(this, hrc, 1 /*hrc exception*/, aCpu);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_HOTPLUGCPU_RETURN(this, hrc, 9 /*unhandled exception*/, aCpu);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::hotPlugCPU", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::HotUnplugCPU(ULONG aCpu)
{
    LogRelFlow(("{%p} %s:enter aCpu=%RU32\n", this, "Machine::hotUnplugCPU", aCpu));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_HOTUNPLUGCPU_ENTER(this, aCpu);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = hotUnplugCPU(aCpu);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_HOTUNPLUGCPU_RETURN(this, hrc, 0 /*normal*/, aCpu);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_HOTUNPLUGCPU_RETURN(this, hrc, 1 /*hrc exception*/, aCpu);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_HOTUNPLUGCPU_RETURN(this, hrc, 9 /*unhandled exception*/, aCpu);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::hotUnplugCPU", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetCPUStatus(ULONG aCpu,
                                       BOOL *aAttached)
{
    LogRelFlow(("{%p} %s:enter aCpu=%RU32 aAttached=%p\n", this, "Machine::getCPUStatus", aCpu, aAttached));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAttached);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUSTATUS_ENTER(this, aCpu);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCPUStatus(aCpu,
                               aAttached);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUSTATUS_RETURN(this, hrc, 0 /*normal*/, aCpu, *aAttached != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUSTATUS_RETURN(this, hrc, 1 /*hrc exception*/, aCpu, *aAttached != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETCPUSTATUS_RETURN(this, hrc, 9 /*unhandled exception*/, aCpu, *aAttached != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aAttached=%RTbool hrc=%Rhrc\n", this, "Machine::getCPUStatus", *aAttached, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::GetEffectiveParavirtProvider(ParavirtProvider_T *aParavirtProvider)
{
    LogRelFlow(("{%p} %s:enter aParavirtProvider=%p\n", this, "Machine::getEffectiveParavirtProvider", aParavirtProvider));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aParavirtProvider);


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEFFECTIVEPARAVIRTPROVIDER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEffectiveParavirtProvider(aParavirtProvider);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEFFECTIVEPARAVIRTPROVIDER_RETURN(this, hrc, 0 /*normal*/, *aParavirtProvider);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEFFECTIVEPARAVIRTPROVIDER_RETURN(this, hrc, 1 /*hrc exception*/, *aParavirtProvider);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_GETEFFECTIVEPARAVIRTPROVIDER_RETURN(this, hrc, 9 /*unhandled exception*/, *aParavirtProvider);
#endif
    }

    LogRelFlow(("{%p} %s: leave aParavirtProvider=%RU32 hrc=%Rhrc\n", this, "Machine::getEffectiveParavirtProvider", *aParavirtProvider, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::QueryLogFilename(ULONG aIdx,
                                           BSTR *aFilename)
{
    LogRelFlow(("{%p} %s:enter aIdx=%RU32 aFilename=%p\n", this, "Machine::queryLogFilename", aIdx, aFilename));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFilename);


        
        BSTROutConverter TmpFilename(aFilename);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYLOGFILENAME_ENTER(this, aIdx);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = queryLogFilename(aIdx,
                                   TmpFilename.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYLOGFILENAME_RETURN(this, hrc, 0 /*normal*/, aIdx, TmpFilename.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYLOGFILENAME_RETURN(this, hrc, 1 /*hrc exception*/, aIdx, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_QUERYLOGFILENAME_RETURN(this, hrc, 9 /*unhandled exception*/, aIdx, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aFilename=%ls hrc=%Rhrc\n", this, "Machine::queryLogFilename", *aFilename, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ReadLog(ULONG aIdx,
                                  LONG64 aOffset,
                                  LONG64 aSize,
                                  ComSafeArrayOut(BYTE, aData))
{
    LogRelFlow(("{%p} %s:enter aIdx=%RU32 aOffset=%RI64 aSize=%RI64 aData=%p\n", this, "Machine::readLog", aIdx, aOffset, aSize, aData));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aData);


        
        
        
        ArrayOutConverter<BYTE> TmpData(ComSafeArrayOutArg(aData));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READLOG_ENTER(this, aIdx, aOffset, aSize);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = readLog(aIdx,
                          aOffset,
                          aSize,
                          TmpData.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READLOG_RETURN(this, hrc, 0 /*normal*/, aIdx, aOffset, aSize, (uint32_t)TmpData.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READLOG_RETURN(this, hrc, 1 /*hrc exception*/, aIdx, aOffset, aSize, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_READLOG_RETURN(this, hrc, 9 /*unhandled exception*/, aIdx, aOffset, aSize, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aData=%zu hrc=%Rhrc\n", this, "Machine::readLog", ComSafeArraySize(*aData), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::CloneTo(IMachine *aTarget,
                                  CloneMode_T aMode,
                                  ComSafeArrayIn(CloneOptions_T, aOptions),
                                  IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aTarget=%p aMode=%RU32 aOptions=%zu aProgress=%p\n", this, "Machine::cloneTo", aTarget, aMode, aOptions, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeInConverter<IMachine> TmpTarget(aTarget);
        
        ArrayInConverter<CloneOptions_T> TmpOptions(ComSafeArrayInArg(aOptions));
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLONETO_ENTER(this, (void *)TmpTarget.ptr(), aMode, (uint32_t)TmpOptions.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = cloneTo(TmpTarget.ptr(),
                          aMode,
                          TmpOptions.array(),
                          TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLONETO_RETURN(this, hrc, 0 /*normal*/, (void *)TmpTarget.ptr(), aMode, (uint32_t)TmpOptions.array().size(), NULL /*for now*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLONETO_RETURN(this, hrc, 1 /*hrc exception*/, 0, aMode, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLONETO_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aMode, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Machine::cloneTo", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::MoveTo(IN_BSTR aFolder,
                                 IN_BSTR aType,
                                 IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aFolder=%ls aType=%ls aProgress=%p\n", this, "Machine::moveTo", aFolder, aType, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        BSTRInConverter TmpFolder(aFolder);
        BSTRInConverter TmpType(aType);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_MOVETO_ENTER(this, TmpFolder.str().c_str(), TmpType.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = moveTo(TmpFolder.str(),
                         TmpType.str(),
                         TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_MOVETO_RETURN(this, hrc, 0 /*normal*/, TmpFolder.str().c_str(), TmpType.str().c_str(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_MOVETO_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_MOVETO_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Machine::moveTo", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::SaveState(IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aProgress=%p\n", this, "Machine::saveState", aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SAVESTATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = saveState(TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SAVESTATE_RETURN(this, hrc, 0 /*normal*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SAVESTATE_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_SAVESTATE_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Machine::saveState", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::AdoptSavedState(IN_BSTR aSavedStateFile)
{
    LogRelFlow(("{%p} %s:enter aSavedStateFile=%ls\n", this, "Machine::adoptSavedState", aSavedStateFile));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpSavedStateFile(aSavedStateFile);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADOPTSAVEDSTATE_ENTER(this, TmpSavedStateFile.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = adoptSavedState(TmpSavedStateFile.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADOPTSAVEDSTATE_RETURN(this, hrc, 0 /*normal*/, TmpSavedStateFile.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADOPTSAVEDSTATE_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ADOPTSAVEDSTATE_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::adoptSavedState", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::DiscardSavedState(BOOL aFRemoveFile)
{
    LogRelFlow(("{%p} %s:enter aFRemoveFile=%RTbool\n", this, "Machine::discardSavedState", aFRemoveFile));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DISCARDSAVEDSTATE_ENTER(this, aFRemoveFile != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = discardSavedState(aFRemoveFile != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DISCARDSAVEDSTATE_RETURN(this, hrc, 0 /*normal*/, aFRemoveFile != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DISCARDSAVEDSTATE_RETURN(this, hrc, 1 /*hrc exception*/, aFRemoveFile != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DISCARDSAVEDSTATE_RETURN(this, hrc, 9 /*unhandled exception*/, aFRemoveFile != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::discardSavedState", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::TakeSnapshot(IN_BSTR aName,
                                       IN_BSTR aDescription,
                                       BOOL aPause,
                                       BSTR *aId,
                                       IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aDescription=%ls aPause=%RTbool aId=%p aProgress=%p\n", this, "Machine::takeSnapshot", aName, aDescription, aPause, aId, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aId);
        CheckComArgOutPointerValidThrow(aProgress);


        BSTRInConverter TmpName(aName);
        BSTRInConverter TmpDescription(aDescription);
        
        UuidOutConverter TmpId(aId);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_TAKESNAPSHOT_ENTER(this, TmpName.str().c_str(), TmpDescription.str().c_str(), aPause != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = takeSnapshot(TmpName.str(),
                               TmpDescription.str(),
                               aPause != FALSE,
                               TmpId.uuid(),
                               TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_TAKESNAPSHOT_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), TmpDescription.str().c_str(), aPause != FALSE, TmpId.uuid().toStringCurly().c_str(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_TAKESNAPSHOT_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, aPause != FALSE, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_TAKESNAPSHOT_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, aPause != FALSE, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aId=%ls aProgress=%p hrc=%Rhrc\n", this, "Machine::takeSnapshot", *aId, *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::DeleteSnapshot(IN_BSTR aId,
                                         IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aId=%ls aProgress=%p\n", this, "Machine::deleteSnapshot", aId, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        UuidInConverter TmpId(aId);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOT_ENTER(this, TmpId.uuid().toStringCurly().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = deleteSnapshot(TmpId.uuid(),
                                 TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOT_RETURN(this, hrc, 0 /*normal*/, TmpId.uuid().toStringCurly().c_str(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOT_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOT_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Machine::deleteSnapshot", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::DeleteSnapshotAndAllChildren(IN_BSTR aId,
                                                       IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aId=%ls aProgress=%p\n", this, "Machine::deleteSnapshotAndAllChildren", aId, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        UuidInConverter TmpId(aId);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOTANDALLCHILDREN_ENTER(this, TmpId.uuid().toStringCurly().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = deleteSnapshotAndAllChildren(TmpId.uuid(),
                                               TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOTANDALLCHILDREN_RETURN(this, hrc, 0 /*normal*/, TmpId.uuid().toStringCurly().c_str(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOTANDALLCHILDREN_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOTANDALLCHILDREN_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Machine::deleteSnapshotAndAllChildren", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::DeleteSnapshotRange(IN_BSTR aStartId,
                                              IN_BSTR aEndId,
                                              IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aStartId=%ls aEndId=%ls aProgress=%p\n", this, "Machine::deleteSnapshotRange", aStartId, aEndId, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        UuidInConverter TmpStartId(aStartId);
        UuidInConverter TmpEndId(aEndId);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOTRANGE_ENTER(this, TmpStartId.uuid().toStringCurly().c_str(), TmpEndId.uuid().toStringCurly().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = deleteSnapshotRange(TmpStartId.uuid(),
                                      TmpEndId.uuid(),
                                      TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOTRANGE_RETURN(this, hrc, 0 /*normal*/, TmpStartId.uuid().toStringCurly().c_str(), TmpEndId.uuid().toStringCurly().c_str(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOTRANGE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DELETESNAPSHOTRANGE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Machine::deleteSnapshotRange", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::RestoreSnapshot(ISnapshot *aSnapshot,
                                          IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aSnapshot=%p aProgress=%p\n", this, "Machine::restoreSnapshot", aSnapshot, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeInConverter<ISnapshot> TmpSnapshot(aSnapshot);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_RESTORESNAPSHOT_ENTER(this, (void *)TmpSnapshot.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = restoreSnapshot(TmpSnapshot.ptr(),
                                  TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_RESTORESNAPSHOT_RETURN(this, hrc, 0 /*normal*/, (void *)TmpSnapshot.ptr(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_RESTORESNAPSHOT_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_RESTORESNAPSHOT_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Machine::restoreSnapshot", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ApplyDefaults(IN_BSTR aFlags)
{
    LogRelFlow(("{%p} %s:enter aFlags=%ls\n", this, "Machine::applyDefaults", aFlags));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpFlags(aFlags);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_APPLYDEFAULTS_ENTER(this, TmpFlags.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = applyDefaults(TmpFlags.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_APPLYDEFAULTS_RETURN(this, hrc, 0 /*normal*/, TmpFlags.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_APPLYDEFAULTS_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_APPLYDEFAULTS_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::applyDefaults", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::InternalAndReservedMethod1IMachine()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::InternalAndReservedMethod2IMachine()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::InternalAndReservedMethod3IMachine()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::InternalAndReservedMethod4IMachine()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::InternalAndReservedMethod5IMachine()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::InternalAndReservedMethod6IMachine()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::InternalAndReservedMethod7IMachine()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineWrap::InternalAndReservedMethod8IMachine()
{
    return E_NOTIMPL;
}

//
// IInternalMachineControl methods
//

STDMETHODIMP MachineWrap::UpdateState(MachineState_T aState)
{
    LogRelFlow(("{%p} %s:enter aState=%RU32\n", this, "Machine::updateState", aState));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UPDATESTATE_ENTER(this, aState);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = updateState(aState);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UPDATESTATE_RETURN(this, hrc, 0 /*normal*/, aState);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UPDATESTATE_RETURN(this, hrc, 1 /*hrc exception*/, aState);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UPDATESTATE_RETURN(this, hrc, 9 /*unhandled exception*/, aState);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::updateState", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::BeginPowerUp(IProgress *aProgress)
{
    LogRelFlow(("{%p} %s:enter aProgress=%p\n", this, "Machine::beginPowerUp", aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ComTypeInConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_BEGINPOWERUP_ENTER(this, (void *)TmpProgress.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = beginPowerUp(TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_BEGINPOWERUP_RETURN(this, hrc, 0 /*normal*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_BEGINPOWERUP_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_BEGINPOWERUP_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::beginPowerUp", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::EndPowerUp(LONG aResult)
{
    LogRelFlow(("{%p} %s:enter aResult=%RI32\n", this, "Machine::endPowerUp", aResult));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENDPOWERUP_ENTER(this, aResult);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = endPowerUp(aResult);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENDPOWERUP_RETURN(this, hrc, 0 /*normal*/, aResult);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENDPOWERUP_RETURN(this, hrc, 1 /*hrc exception*/, aResult);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENDPOWERUP_RETURN(this, hrc, 9 /*unhandled exception*/, aResult);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::endPowerUp", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::BeginPoweringDown(IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aProgress=%p\n", this, "Machine::beginPoweringDown", aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_BEGINPOWERINGDOWN_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = beginPoweringDown(TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_BEGINPOWERINGDOWN_RETURN(this, hrc, 0 /*normal*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_BEGINPOWERINGDOWN_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_BEGINPOWERINGDOWN_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProgress=%p hrc=%Rhrc\n", this, "Machine::beginPoweringDown", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::EndPoweringDown(LONG aResult,
                                          IN_BSTR aErrMsg)
{
    LogRelFlow(("{%p} %s:enter aResult=%RI32 aErrMsg=%ls\n", this, "Machine::endPoweringDown", aResult, aErrMsg));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        BSTRInConverter TmpErrMsg(aErrMsg);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENDPOWERINGDOWN_ENTER(this, aResult, TmpErrMsg.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = endPoweringDown(aResult,
                                  TmpErrMsg.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENDPOWERINGDOWN_RETURN(this, hrc, 0 /*normal*/, aResult, TmpErrMsg.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENDPOWERINGDOWN_RETURN(this, hrc, 1 /*hrc exception*/, aResult, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ENDPOWERINGDOWN_RETURN(this, hrc, 9 /*unhandled exception*/, aResult, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::endPoweringDown", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::RunUSBDeviceFilters(IUSBDevice *aDevice,
                                              BOOL *aMatched,
                                              ULONG *aMaskedInterfaces)
{
    LogRelFlow(("{%p} %s:enter aDevice=%p aMatched=%p aMaskedInterfaces=%p\n", this, "Machine::runUSBDeviceFilters", aDevice, aMatched, aMaskedInterfaces));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMatched);
        CheckComArgOutPointerValidThrow(aMaskedInterfaces);


        ComTypeInConverter<IUSBDevice> TmpDevice(aDevice);
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_RUNUSBDEVICEFILTERS_ENTER(this, (void *)TmpDevice.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = runUSBDeviceFilters(TmpDevice.ptr(),
                                      aMatched,
                                      aMaskedInterfaces);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_RUNUSBDEVICEFILTERS_RETURN(this, hrc, 0 /*normal*/, (void *)TmpDevice.ptr(), *aMatched != FALSE, *aMaskedInterfaces);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_RUNUSBDEVICEFILTERS_RETURN(this, hrc, 1 /*hrc exception*/, 0, *aMatched != FALSE, *aMaskedInterfaces);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_RUNUSBDEVICEFILTERS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, *aMatched != FALSE, *aMaskedInterfaces);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMatched=%RTbool *aMaskedInterfaces=%RU32 hrc=%Rhrc\n", this, "Machine::runUSBDeviceFilters", *aMatched, *aMaskedInterfaces, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::CaptureUSBDevice(IN_BSTR aId,
                                           IN_BSTR aCaptureFilename)
{
    LogRelFlow(("{%p} %s:enter aId=%ls aCaptureFilename=%ls\n", this, "Machine::captureUSBDevice", aId, aCaptureFilename));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        UuidInConverter TmpId(aId);
        BSTRInConverter TmpCaptureFilename(aCaptureFilename);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CAPTUREUSBDEVICE_ENTER(this, TmpId.uuid().toStringCurly().c_str(), TmpCaptureFilename.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = captureUSBDevice(TmpId.uuid(),
                                   TmpCaptureFilename.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CAPTUREUSBDEVICE_RETURN(this, hrc, 0 /*normal*/, TmpId.uuid().toStringCurly().c_str(), TmpCaptureFilename.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CAPTUREUSBDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CAPTUREUSBDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::captureUSBDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::DetachUSBDevice(IN_BSTR aId,
                                          BOOL aDone)
{
    LogRelFlow(("{%p} %s:enter aId=%ls aDone=%RTbool\n", this, "Machine::detachUSBDevice", aId, aDone));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        UuidInConverter TmpId(aId);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHUSBDEVICE_ENTER(this, TmpId.uuid().toStringCurly().c_str(), aDone != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = detachUSBDevice(TmpId.uuid(),
                                  aDone != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHUSBDEVICE_RETURN(this, hrc, 0 /*normal*/, TmpId.uuid().toStringCurly().c_str(), aDone != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHUSBDEVICE_RETURN(this, hrc, 1 /*hrc exception*/, 0, aDone != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHUSBDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aDone != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::detachUSBDevice", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::AutoCaptureUSBDevices()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Machine::autoCaptureUSBDevices"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_AUTOCAPTUREUSBDEVICES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = autoCaptureUSBDevices();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_AUTOCAPTUREUSBDEVICES_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_AUTOCAPTUREUSBDEVICES_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_AUTOCAPTUREUSBDEVICES_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::autoCaptureUSBDevices", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::DetachAllUSBDevices(BOOL aDone)
{
    LogRelFlow(("{%p} %s:enter aDone=%RTbool\n", this, "Machine::detachAllUSBDevices", aDone));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHALLUSBDEVICES_ENTER(this, aDone != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = detachAllUSBDevices(aDone != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHALLUSBDEVICES_RETURN(this, hrc, 0 /*normal*/, aDone != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHALLUSBDEVICES_RETURN(this, hrc, 1 /*hrc exception*/, aDone != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_DETACHALLUSBDEVICES_RETURN(this, hrc, 9 /*unhandled exception*/, aDone != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::detachAllUSBDevices", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::OnSessionEnd(ISession *aSession,
                                       IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aSession=%p aProgress=%p\n", this, "Machine::onSessionEnd", aSession, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeInConverter<ISession> TmpSession(aSession);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ONSESSIONEND_ENTER(this, (void *)TmpSession.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = onSessionEnd(TmpSession.ptr(),
                               TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ONSESSIONEND_RETURN(this, hrc, 0 /*normal*/, (void *)TmpSession.ptr(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ONSESSIONEND_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_ONSESSIONEND_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Machine::onSessionEnd", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::FinishOnlineMergeMedium()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Machine::finishOnlineMergeMedium"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_FINISHONLINEMERGEMEDIUM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = finishOnlineMergeMedium();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_FINISHONLINEMERGEMEDIUM_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_FINISHONLINEMERGEMEDIUM_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_FINISHONLINEMERGEMEDIUM_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::finishOnlineMergeMedium", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::PullGuestProperties(ComSafeArrayOut(BSTR, aNames),
                                              ComSafeArrayOut(BSTR, aValues),
                                              ComSafeArrayOut(LONG64, aTimestamps),
                                              ComSafeArrayOut(BSTR, aFlags))
{
    LogRelFlow(("{%p} %s:enter aNames=%p aValues=%p aTimestamps=%p aFlags=%p\n", this, "Machine::pullGuestProperties", aNames, aValues, aTimestamps, aFlags));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNames);
        CheckComArgOutPointerValidThrow(aValues);
        CheckComArgOutPointerValidThrow(aTimestamps);
        CheckComArgOutPointerValidThrow(aFlags);


        ArrayBSTROutConverter TmpNames(ComSafeArrayOutArg(aNames));
        ArrayBSTROutConverter TmpValues(ComSafeArrayOutArg(aValues));
        ArrayOutConverter<LONG64> TmpTimestamps(ComSafeArrayOutArg(aTimestamps));
        ArrayBSTROutConverter TmpFlags(ComSafeArrayOutArg(aFlags));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PULLGUESTPROPERTIES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = pullGuestProperties(TmpNames.array(),
                                      TmpValues.array(),
                                      TmpTimestamps.array(),
                                      TmpFlags.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PULLGUESTPROPERTIES_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpNames.array().size(), NULL /*for now*/, (uint32_t)TmpValues.array().size(), NULL /*for now*/, (uint32_t)TmpTimestamps.array().size(), NULL /*for now*/, (uint32_t)TmpFlags.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PULLGUESTPROPERTIES_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PULLGUESTPROPERTIES_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNames=%zu *aValues=%zu *aTimestamps=%zu *aFlags=%zu hrc=%Rhrc\n", this, "Machine::pullGuestProperties", ComSafeArraySize(*aNames), ComSafeArraySize(*aValues), ComSafeArraySize(*aTimestamps), ComSafeArraySize(*aFlags), hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ClipboardAreaRegister(ComSafeArrayIn(IN_BSTR, aParms),
                                                ULONG *aId)
{
    LogRelFlow(("{%p} %s:enter aParms=%zu aId=%p\n", this, "Machine::clipboardAreaRegister", aParms, aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aId);


        ArrayBSTRInConverter TmpParms(ComSafeArrayInArg(aParms));
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAREGISTER_ENTER(this, (uint32_t)TmpParms.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = clipboardAreaRegister(TmpParms.array(),
                                        aId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAREGISTER_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpParms.array().size(), NULL /*for now*/, *aId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAREGISTER_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, *aId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAREGISTER_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, *aId);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aId=%RU32 hrc=%Rhrc\n", this, "Machine::clipboardAreaRegister", *aId, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ClipboardAreaUnregister(ULONG aId)
{
    LogRelFlow(("{%p} %s:enter aId=%RU32\n", this, "Machine::clipboardAreaUnregister", aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAUNREGISTER_ENTER(this, aId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = clipboardAreaUnregister(aId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAUNREGISTER_RETURN(this, hrc, 0 /*normal*/, aId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAUNREGISTER_RETURN(this, hrc, 1 /*hrc exception*/, aId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAUNREGISTER_RETURN(this, hrc, 9 /*unhandled exception*/, aId);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::clipboardAreaUnregister", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ClipboardAreaAttach(ULONG aId)
{
    LogRelFlow(("{%p} %s:enter aId=%RU32\n", this, "Machine::clipboardAreaAttach", aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAATTACH_ENTER(this, aId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = clipboardAreaAttach(aId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAATTACH_RETURN(this, hrc, 0 /*normal*/, aId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAATTACH_RETURN(this, hrc, 1 /*hrc exception*/, aId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAATTACH_RETURN(this, hrc, 9 /*unhandled exception*/, aId);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::clipboardAreaAttach", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ClipboardAreaDetach(ULONG aId)
{
    LogRelFlow(("{%p} %s:enter aId=%RU32\n", this, "Machine::clipboardAreaDetach", aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREADETACH_ENTER(this, aId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = clipboardAreaDetach(aId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREADETACH_RETURN(this, hrc, 0 /*normal*/, aId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREADETACH_RETURN(this, hrc, 1 /*hrc exception*/, aId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREADETACH_RETURN(this, hrc, 9 /*unhandled exception*/, aId);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::clipboardAreaDetach", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ClipboardAreaGetMostRecent(ULONG *aId)
{
    LogRelFlow(("{%p} %s:enter aId=%p\n", this, "Machine::clipboardAreaGetMostRecent", aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aId);


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAGETMOSTRECENT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = clipboardAreaGetMostRecent(aId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAGETMOSTRECENT_RETURN(this, hrc, 0 /*normal*/, *aId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAGETMOSTRECENT_RETURN(this, hrc, 1 /*hrc exception*/, *aId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAGETMOSTRECENT_RETURN(this, hrc, 9 /*unhandled exception*/, *aId);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aId=%RU32 hrc=%Rhrc\n", this, "Machine::clipboardAreaGetMostRecent", *aId, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ClipboardAreaGetRefCount(ULONG aId,
                                                   ULONG *aRefcount)
{
    LogRelFlow(("{%p} %s:enter aId=%RU32 aRefcount=%p\n", this, "Machine::clipboardAreaGetRefCount", aId, aRefcount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRefcount);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAGETREFCOUNT_ENTER(this, aId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = clipboardAreaGetRefCount(aId,
                                           aRefcount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAGETREFCOUNT_RETURN(this, hrc, 0 /*normal*/, aId, *aRefcount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAGETREFCOUNT_RETURN(this, hrc, 1 /*hrc exception*/, aId, *aRefcount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_CLIPBOARDAREAGETREFCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/, aId, *aRefcount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRefcount=%RU32 hrc=%Rhrc\n", this, "Machine::clipboardAreaGetRefCount", *aRefcount, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::PushGuestProperty(IN_BSTR aName,
                                            IN_BSTR aValue,
                                            LONG64 aTimestamp,
                                            IN_BSTR aFlags)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aValue=%ls aTimestamp=%RI64 aFlags=%ls\n", this, "Machine::pushGuestProperty", aName, aValue, aTimestamp, aFlags));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        BSTRInConverter TmpValue(aValue);
        
        BSTRInConverter TmpFlags(aFlags);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PUSHGUESTPROPERTY_ENTER(this, TmpName.str().c_str(), TmpValue.str().c_str(), aTimestamp, TmpFlags.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = pushGuestProperty(TmpName.str(),
                                    TmpValue.str(),
                                    aTimestamp,
                                    TmpFlags.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PUSHGUESTPROPERTY_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), TmpValue.str().c_str(), aTimestamp, TmpFlags.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PUSHGUESTPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, aTimestamp, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_PUSHGUESTPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, aTimestamp, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::pushGuestProperty", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::LockMedia()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Machine::lockMedia"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LOCKMEDIA_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = lockMedia();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LOCKMEDIA_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LOCKMEDIA_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_LOCKMEDIA_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::lockMedia", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::UnlockMedia()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Machine::unlockMedia"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNLOCKMEDIA_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = unlockMedia();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNLOCKMEDIA_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNLOCKMEDIA_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_UNLOCKMEDIA_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::unlockMedia", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::EjectMedium(IMediumAttachment *aAttachment,
                                      IMediumAttachment **aNewAttachment)
{
    LogRelFlow(("{%p} %s:enter aAttachment=%p aNewAttachment=%p\n", this, "Machine::ejectMedium", aAttachment, aNewAttachment));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNewAttachment);


        ComTypeInConverter<IMediumAttachment> TmpAttachment(aAttachment);
        ComTypeOutConverter<IMediumAttachment> TmpNewAttachment(aNewAttachment);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_EJECTMEDIUM_ENTER(this, (void *)TmpAttachment.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = ejectMedium(TmpAttachment.ptr(),
                              TmpNewAttachment.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_EJECTMEDIUM_RETURN(this, hrc, 0 /*normal*/, (void *)TmpAttachment.ptr(), (void *)TmpNewAttachment.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_EJECTMEDIUM_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_EJECTMEDIUM_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aNewAttachment=%p hrc=%Rhrc\n", this, "Machine::ejectMedium", *aNewAttachment, hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::ReportVmStatistics(ULONG aValidStats,
                                             ULONG aCpuUser,
                                             ULONG aCpuKernel,
                                             ULONG aCpuIdle,
                                             ULONG aMemTotal,
                                             ULONG aMemFree,
                                             ULONG aMemBalloon,
                                             ULONG aMemShared,
                                             ULONG aMemCache,
                                             ULONG aPagedTotal,
                                             ULONG aMemAllocTotal,
                                             ULONG aMemFreeTotal,
                                             ULONG aMemBalloonTotal,
                                             ULONG aMemSharedTotal,
                                             ULONG aVmNetRx,
                                             ULONG aVmNetTx)
{
    LogRelFlow(("{%p} %s:enter aValidStats=%RU32 aCpuUser=%RU32 aCpuKernel=%RU32 aCpuIdle=%RU32 aMemTotal=%RU32 aMemFree=%RU32 aMemBalloon=%RU32 aMemShared=%RU32 aMemCache=%RU32 aPagedTotal=%RU32 aMemAllocTotal=%RU32 aMemFreeTotal=%RU32 aMemBalloonTotal=%RU32 aMemSharedTotal=%RU32 aVmNetRx=%RU32 aVmNetTx=%RU32\n", this, "Machine::reportVmStatistics", aValidStats, aCpuUser, aCpuKernel, aCpuIdle, aMemTotal, aMemFree, aMemBalloon, aMemShared, aMemCache, aPagedTotal, aMemAllocTotal, aMemFreeTotal, aMemBalloonTotal, aMemSharedTotal, aVmNetRx, aVmNetTx));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REPORTVMSTATISTICS_ENTER(this, aValidStats, aCpuUser, aCpuKernel, aCpuIdle, aMemTotal, aMemFree, aMemBalloon, aMemShared, aMemCache, aPagedTotal, aMemAllocTotal, aMemFreeTotal, aMemBalloonTotal, aMemSharedTotal, aVmNetRx, aVmNetTx);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = reportVmStatistics(aValidStats,
                                     aCpuUser,
                                     aCpuKernel,
                                     aCpuIdle,
                                     aMemTotal,
                                     aMemFree,
                                     aMemBalloon,
                                     aMemShared,
                                     aMemCache,
                                     aPagedTotal,
                                     aMemAllocTotal,
                                     aMemFreeTotal,
                                     aMemBalloonTotal,
                                     aMemSharedTotal,
                                     aVmNetRx,
                                     aVmNetTx);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REPORTVMSTATISTICS_RETURN(this, hrc, 0 /*normal*/, aValidStats, aCpuUser, aCpuKernel, aCpuIdle, aMemTotal, aMemFree, aMemBalloon, aMemShared, aMemCache, aPagedTotal, aMemAllocTotal, aMemFreeTotal, aMemBalloonTotal, aMemSharedTotal, aVmNetRx, aVmNetTx);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REPORTVMSTATISTICS_RETURN(this, hrc, 1 /*hrc exception*/, aValidStats, aCpuUser, aCpuKernel, aCpuIdle, aMemTotal, aMemFree, aMemBalloon, aMemShared, aMemCache, aPagedTotal, aMemAllocTotal, aMemFreeTotal, aMemBalloonTotal, aMemSharedTotal, aVmNetRx, aVmNetTx);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_REPORTVMSTATISTICS_RETURN(this, hrc, 9 /*unhandled exception*/, aValidStats, aCpuUser, aCpuKernel, aCpuIdle, aMemTotal, aMemFree, aMemBalloon, aMemShared, aMemCache, aPagedTotal, aMemAllocTotal, aMemFreeTotal, aMemBalloonTotal, aMemSharedTotal, aVmNetRx, aVmNetTx);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Machine::reportVmStatistics", hrc));
    return hrc;
}

STDMETHODIMP MachineWrap::AuthenticateExternal(ComSafeArrayIn(IN_BSTR, aAuthParams),
                                               BSTR *aResult)
{
    LogRelFlow(("{%p} %s:enter aAuthParams=%zu aResult=%p\n", this, "Machine::authenticateExternal", aAuthParams, aResult));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResult);


        ArrayBSTRInConverter TmpAuthParams(ComSafeArrayInArg(aAuthParams));
        BSTROutConverter TmpResult(aResult);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_AUTHENTICATEEXTERNAL_ENTER(this, (uint32_t)TmpAuthParams.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = authenticateExternal(TmpAuthParams.array(),
                                       TmpResult.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_AUTHENTICATEEXTERNAL_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpAuthParams.array().size(), NULL /*for now*/, TmpResult.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_AUTHENTICATEEXTERNAL_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINE_AUTHENTICATEEXTERNAL_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aResult=%ls hrc=%Rhrc\n", this, "Machine::authenticateExternal", *aResult, hrc));
    return hrc;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(MachineWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(MachineWrap, IMachine)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "MachineWrap.cpp"


// ##### BEGINFILE "VRDEServerInfoWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IVRDEServerInfo.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_VRDESERVERINFO

#include "VRDEServerInfoWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(VRDEServerInfoWrap)

//
// IVRDEServerInfo properties
//

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(Active)(BOOL *aActive)
{
    LogRelFlow(("{%p} %s: enter aActive=%p\n", this, "VRDEServerInfo::getActive", aActive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aActive);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ACTIVE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getActive(aActive);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ACTIVE_RETURN(this, hrc, 0 /*normal*/,*aActive != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ACTIVE_RETURN(this, hrc, 1 /*hrc exception*/,*aActive != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ACTIVE_RETURN(this, hrc, 9 /*unhandled exception*/,*aActive != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aActive=%RTbool hrc=%Rhrc\n", this, "VRDEServerInfo::getActive", *aActive, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(Port)(LONG *aPort)
{
    LogRelFlow(("{%p} %s: enter aPort=%p\n", this, "VRDEServerInfo::getPort", aPort));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPort);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_PORT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPort(aPort);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_PORT_RETURN(this, hrc, 0 /*normal*/,*aPort);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_PORT_RETURN(this, hrc, 1 /*hrc exception*/,*aPort);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_PORT_RETURN(this, hrc, 9 /*unhandled exception*/,*aPort);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPort=%RI32 hrc=%Rhrc\n", this, "VRDEServerInfo::getPort", *aPort, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(NumberOfClients)(ULONG *aNumberOfClients)
{
    LogRelFlow(("{%p} %s: enter aNumberOfClients=%p\n", this, "VRDEServerInfo::getNumberOfClients", aNumberOfClients));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNumberOfClients);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_NUMBEROFCLIENTS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getNumberOfClients(aNumberOfClients);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_NUMBEROFCLIENTS_RETURN(this, hrc, 0 /*normal*/,*aNumberOfClients);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_NUMBEROFCLIENTS_RETURN(this, hrc, 1 /*hrc exception*/,*aNumberOfClients);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_NUMBEROFCLIENTS_RETURN(this, hrc, 9 /*unhandled exception*/,*aNumberOfClients);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNumberOfClients=%RU32 hrc=%Rhrc\n", this, "VRDEServerInfo::getNumberOfClients", *aNumberOfClients, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(BeginTime)(LONG64 *aBeginTime)
{
    LogRelFlow(("{%p} %s: enter aBeginTime=%p\n", this, "VRDEServerInfo::getBeginTime", aBeginTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBeginTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BEGINTIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBeginTime(aBeginTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BEGINTIME_RETURN(this, hrc, 0 /*normal*/,*aBeginTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BEGINTIME_RETURN(this, hrc, 1 /*hrc exception*/,*aBeginTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BEGINTIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aBeginTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBeginTime=%RI64 hrc=%Rhrc\n", this, "VRDEServerInfo::getBeginTime", *aBeginTime, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(EndTime)(LONG64 *aEndTime)
{
    LogRelFlow(("{%p} %s: enter aEndTime=%p\n", this, "VRDEServerInfo::getEndTime", aEndTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEndTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ENDTIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEndTime(aEndTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ENDTIME_RETURN(this, hrc, 0 /*normal*/,*aEndTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ENDTIME_RETURN(this, hrc, 1 /*hrc exception*/,*aEndTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ENDTIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aEndTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEndTime=%RI64 hrc=%Rhrc\n", this, "VRDEServerInfo::getEndTime", *aEndTime, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(BytesSent)(LONG64 *aBytesSent)
{
    LogRelFlow(("{%p} %s: enter aBytesSent=%p\n", this, "VRDEServerInfo::getBytesSent", aBytesSent));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBytesSent);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESSENT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBytesSent(aBytesSent);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESSENT_RETURN(this, hrc, 0 /*normal*/,*aBytesSent);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESSENT_RETURN(this, hrc, 1 /*hrc exception*/,*aBytesSent);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESSENT_RETURN(this, hrc, 9 /*unhandled exception*/,*aBytesSent);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBytesSent=%RI64 hrc=%Rhrc\n", this, "VRDEServerInfo::getBytesSent", *aBytesSent, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(BytesSentTotal)(LONG64 *aBytesSentTotal)
{
    LogRelFlow(("{%p} %s: enter aBytesSentTotal=%p\n", this, "VRDEServerInfo::getBytesSentTotal", aBytesSentTotal));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBytesSentTotal);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESSENTTOTAL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBytesSentTotal(aBytesSentTotal);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESSENTTOTAL_RETURN(this, hrc, 0 /*normal*/,*aBytesSentTotal);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESSENTTOTAL_RETURN(this, hrc, 1 /*hrc exception*/,*aBytesSentTotal);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESSENTTOTAL_RETURN(this, hrc, 9 /*unhandled exception*/,*aBytesSentTotal);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBytesSentTotal=%RI64 hrc=%Rhrc\n", this, "VRDEServerInfo::getBytesSentTotal", *aBytesSentTotal, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(BytesReceived)(LONG64 *aBytesReceived)
{
    LogRelFlow(("{%p} %s: enter aBytesReceived=%p\n", this, "VRDEServerInfo::getBytesReceived", aBytesReceived));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBytesReceived);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESRECEIVED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBytesReceived(aBytesReceived);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESRECEIVED_RETURN(this, hrc, 0 /*normal*/,*aBytesReceived);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESRECEIVED_RETURN(this, hrc, 1 /*hrc exception*/,*aBytesReceived);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESRECEIVED_RETURN(this, hrc, 9 /*unhandled exception*/,*aBytesReceived);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBytesReceived=%RI64 hrc=%Rhrc\n", this, "VRDEServerInfo::getBytesReceived", *aBytesReceived, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(BytesReceivedTotal)(LONG64 *aBytesReceivedTotal)
{
    LogRelFlow(("{%p} %s: enter aBytesReceivedTotal=%p\n", this, "VRDEServerInfo::getBytesReceivedTotal", aBytesReceivedTotal));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBytesReceivedTotal);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESRECEIVEDTOTAL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBytesReceivedTotal(aBytesReceivedTotal);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESRECEIVEDTOTAL_RETURN(this, hrc, 0 /*normal*/,*aBytesReceivedTotal);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESRECEIVEDTOTAL_RETURN(this, hrc, 1 /*hrc exception*/,*aBytesReceivedTotal);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_BYTESRECEIVEDTOTAL_RETURN(this, hrc, 9 /*unhandled exception*/,*aBytesReceivedTotal);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBytesReceivedTotal=%RI64 hrc=%Rhrc\n", this, "VRDEServerInfo::getBytesReceivedTotal", *aBytesReceivedTotal, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(User)(BSTR *aUser)
{
    LogRelFlow(("{%p} %s: enter aUser=%p\n", this, "VRDEServerInfo::getUser", aUser));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUser);
        BSTROutConverter TmpUser(aUser);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_USER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUser(TmpUser.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_USER_RETURN(this, hrc, 0 /*normal*/,TmpUser.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_USER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_USER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUser=%ls hrc=%Rhrc\n", this, "VRDEServerInfo::getUser", *aUser, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(Domain)(BSTR *aDomain)
{
    LogRelFlow(("{%p} %s: enter aDomain=%p\n", this, "VRDEServerInfo::getDomain", aDomain));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDomain);
        BSTROutConverter TmpDomain(aDomain);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_DOMAIN_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDomain(TmpDomain.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_DOMAIN_RETURN(this, hrc, 0 /*normal*/,TmpDomain.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_DOMAIN_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_DOMAIN_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDomain=%ls hrc=%Rhrc\n", this, "VRDEServerInfo::getDomain", *aDomain, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(ClientName)(BSTR *aClientName)
{
    LogRelFlow(("{%p} %s: enter aClientName=%p\n", this, "VRDEServerInfo::getClientName", aClientName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aClientName);
        BSTROutConverter TmpClientName(aClientName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTNAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getClientName(TmpClientName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTNAME_RETURN(this, hrc, 0 /*normal*/,TmpClientName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aClientName=%ls hrc=%Rhrc\n", this, "VRDEServerInfo::getClientName", *aClientName, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(ClientIP)(BSTR *aClientIP)
{
    LogRelFlow(("{%p} %s: enter aClientIP=%p\n", this, "VRDEServerInfo::getClientIP", aClientIP));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aClientIP);
        BSTROutConverter TmpClientIP(aClientIP);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTIP_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getClientIP(TmpClientIP.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTIP_RETURN(this, hrc, 0 /*normal*/,TmpClientIP.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTIP_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTIP_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aClientIP=%ls hrc=%Rhrc\n", this, "VRDEServerInfo::getClientIP", *aClientIP, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(ClientVersion)(ULONG *aClientVersion)
{
    LogRelFlow(("{%p} %s: enter aClientVersion=%p\n", this, "VRDEServerInfo::getClientVersion", aClientVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aClientVersion);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTVERSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getClientVersion(aClientVersion);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTVERSION_RETURN(this, hrc, 0 /*normal*/,*aClientVersion);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTVERSION_RETURN(this, hrc, 1 /*hrc exception*/,*aClientVersion);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_CLIENTVERSION_RETURN(this, hrc, 9 /*unhandled exception*/,*aClientVersion);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aClientVersion=%RU32 hrc=%Rhrc\n", this, "VRDEServerInfo::getClientVersion", *aClientVersion, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(EncryptionStyle)(ULONG *aEncryptionStyle)
{
    LogRelFlow(("{%p} %s: enter aEncryptionStyle=%p\n", this, "VRDEServerInfo::getEncryptionStyle", aEncryptionStyle));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEncryptionStyle);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ENCRYPTIONSTYLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEncryptionStyle(aEncryptionStyle);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ENCRYPTIONSTYLE_RETURN(this, hrc, 0 /*normal*/,*aEncryptionStyle);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ENCRYPTIONSTYLE_RETURN(this, hrc, 1 /*hrc exception*/,*aEncryptionStyle);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VRDESERVERINFO_GET_ENCRYPTIONSTYLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aEncryptionStyle);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEncryptionStyle=%RU32 hrc=%Rhrc\n", this, "VRDEServerInfo::getEncryptionStyle", *aEncryptionStyle, hrc));
    return hrc;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(InternalAndReservedAttribute1IVRDEServerInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(InternalAndReservedAttribute2IVRDEServerInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(InternalAndReservedAttribute3IVRDEServerInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(InternalAndReservedAttribute4IVRDEServerInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(InternalAndReservedAttribute5IVRDEServerInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(InternalAndReservedAttribute6IVRDEServerInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(InternalAndReservedAttribute7IVRDEServerInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VRDEServerInfoWrap::COMGETTER(InternalAndReservedAttribute8IVRDEServerInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IVRDEServerInfo methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(VRDEServerInfoWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(VRDEServerInfoWrap, IVRDEServerInfo)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "VRDEServerInfoWrap.cpp"


// ##### BEGINFILE "HostVideoInputDeviceWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IHostVideoInputDevice.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_HOSTVIDEOINPUTDEVICE

#include "HostVideoInputDeviceWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(HostVideoInputDeviceWrap)

//
// IHostVideoInputDevice properties
//

STDMETHODIMP HostVideoInputDeviceWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "HostVideoInputDevice::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "HostVideoInputDevice::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP HostVideoInputDeviceWrap::COMGETTER(Path)(BSTR *aPath)
{
    LogRelFlow(("{%p} %s: enter aPath=%p\n", this, "HostVideoInputDevice::getPath", aPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPath);
        BSTROutConverter TmpPath(aPath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_PATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPath(TmpPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_PATH_RETURN(this, hrc, 0 /*normal*/,TmpPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_PATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_PATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPath=%ls hrc=%Rhrc\n", this, "HostVideoInputDevice::getPath", *aPath, hrc));
    return hrc;
}

STDMETHODIMP HostVideoInputDeviceWrap::COMGETTER(Alias)(BSTR *aAlias)
{
    LogRelFlow(("{%p} %s: enter aAlias=%p\n", this, "HostVideoInputDevice::getAlias", aAlias));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAlias);
        BSTROutConverter TmpAlias(aAlias);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_ALIAS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAlias(TmpAlias.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_ALIAS_RETURN(this, hrc, 0 /*normal*/,TmpAlias.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_ALIAS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTVIDEOINPUTDEVICE_GET_ALIAS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAlias=%ls hrc=%Rhrc\n", this, "HostVideoInputDevice::getAlias", *aAlias, hrc));
    return hrc;
}

STDMETHODIMP HostVideoInputDeviceWrap::COMGETTER(InternalAndReservedAttribute1IHostVideoInputDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostVideoInputDeviceWrap::COMGETTER(InternalAndReservedAttribute2IHostVideoInputDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostVideoInputDeviceWrap::COMGETTER(InternalAndReservedAttribute3IHostVideoInputDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostVideoInputDeviceWrap::COMGETTER(InternalAndReservedAttribute4IHostVideoInputDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IHostVideoInputDevice methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(HostVideoInputDeviceWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(HostVideoInputDeviceWrap, IHostVideoInputDevice)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "HostVideoInputDeviceWrap.cpp"


// ##### BEGINFILE "HostWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IHost.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_HOST

#include "HostWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(HostWrap)

//
// IHost properties
//

STDMETHODIMP HostWrap::COMGETTER(DVDDrives)(ComSafeArrayOut(IMedium *, aDVDDrives))
{
    LogRelFlow(("{%p} %s: enter aDVDDrives=%p\n", this, "Host::getDVDDrives", aDVDDrives));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDVDDrives);
        ArrayComTypeOutConverter<IMedium> TmpDVDDrives(ComSafeArrayOutArg(aDVDDrives));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_DVDDRIVES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDVDDrives(TmpDVDDrives.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_DVDDRIVES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpDVDDrives.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_DVDDRIVES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_DVDDRIVES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDVDDrives=%zu hrc=%Rhrc\n", this, "Host::getDVDDrives", ComSafeArraySize(*aDVDDrives), hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(FloppyDrives)(ComSafeArrayOut(IMedium *, aFloppyDrives))
{
    LogRelFlow(("{%p} %s: enter aFloppyDrives=%p\n", this, "Host::getFloppyDrives", aFloppyDrives));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFloppyDrives);
        ArrayComTypeOutConverter<IMedium> TmpFloppyDrives(ComSafeArrayOutArg(aFloppyDrives));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_FLOPPYDRIVES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFloppyDrives(TmpFloppyDrives.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_FLOPPYDRIVES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpFloppyDrives.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_FLOPPYDRIVES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_FLOPPYDRIVES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFloppyDrives=%zu hrc=%Rhrc\n", this, "Host::getFloppyDrives", ComSafeArraySize(*aFloppyDrives), hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(USBDevices)(ComSafeArrayOut(IHostUSBDevice *, aUSBDevices))
{
    LogRelFlow(("{%p} %s: enter aUSBDevices=%p\n", this, "Host::getUSBDevices", aUSBDevices));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUSBDevices);
        ArrayComTypeOutConverter<IHostUSBDevice> TmpUSBDevices(ComSafeArrayOutArg(aUSBDevices));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_USBDEVICES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUSBDevices(TmpUSBDevices.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_USBDEVICES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpUSBDevices.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_USBDEVICES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_USBDEVICES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUSBDevices=%zu hrc=%Rhrc\n", this, "Host::getUSBDevices", ComSafeArraySize(*aUSBDevices), hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(USBDeviceFilters)(ComSafeArrayOut(IHostUSBDeviceFilter *, aUSBDeviceFilters))
{
    LogRelFlow(("{%p} %s: enter aUSBDeviceFilters=%p\n", this, "Host::getUSBDeviceFilters", aUSBDeviceFilters));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUSBDeviceFilters);
        ArrayComTypeOutConverter<IHostUSBDeviceFilter> TmpUSBDeviceFilters(ComSafeArrayOutArg(aUSBDeviceFilters));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_USBDEVICEFILTERS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUSBDeviceFilters(TmpUSBDeviceFilters.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_USBDEVICEFILTERS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpUSBDeviceFilters.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_USBDEVICEFILTERS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_USBDEVICEFILTERS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUSBDeviceFilters=%zu hrc=%Rhrc\n", this, "Host::getUSBDeviceFilters", ComSafeArraySize(*aUSBDeviceFilters), hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(NetworkInterfaces)(ComSafeArrayOut(IHostNetworkInterface *, aNetworkInterfaces))
{
    LogRelFlow(("{%p} %s: enter aNetworkInterfaces=%p\n", this, "Host::getNetworkInterfaces", aNetworkInterfaces));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNetworkInterfaces);
        ArrayComTypeOutConverter<IHostNetworkInterface> TmpNetworkInterfaces(ComSafeArrayOutArg(aNetworkInterfaces));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_NETWORKINTERFACES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getNetworkInterfaces(TmpNetworkInterfaces.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_NETWORKINTERFACES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpNetworkInterfaces.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_NETWORKINTERFACES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_NETWORKINTERFACES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNetworkInterfaces=%zu hrc=%Rhrc\n", this, "Host::getNetworkInterfaces", ComSafeArraySize(*aNetworkInterfaces), hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(NameServers)(ComSafeArrayOut(BSTR, aNameServers))
{
    LogRelFlow(("{%p} %s: enter aNameServers=%p\n", this, "Host::getNameServers", aNameServers));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNameServers);
        ArrayBSTROutConverter TmpNameServers(ComSafeArrayOutArg(aNameServers));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_NAMESERVERS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getNameServers(TmpNameServers.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_NAMESERVERS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpNameServers.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_NAMESERVERS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_NAMESERVERS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNameServers=%zu hrc=%Rhrc\n", this, "Host::getNameServers", ComSafeArraySize(*aNameServers), hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(DomainName)(BSTR *aDomainName)
{
    LogRelFlow(("{%p} %s: enter aDomainName=%p\n", this, "Host::getDomainName", aDomainName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDomainName);
        BSTROutConverter TmpDomainName(aDomainName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_DOMAINNAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDomainName(TmpDomainName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_DOMAINNAME_RETURN(this, hrc, 0 /*normal*/,TmpDomainName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_DOMAINNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_DOMAINNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDomainName=%ls hrc=%Rhrc\n", this, "Host::getDomainName", *aDomainName, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(SearchStrings)(ComSafeArrayOut(BSTR, aSearchStrings))
{
    LogRelFlow(("{%p} %s: enter aSearchStrings=%p\n", this, "Host::getSearchStrings", aSearchStrings));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSearchStrings);
        ArrayBSTROutConverter TmpSearchStrings(ComSafeArrayOutArg(aSearchStrings));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_SEARCHSTRINGS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSearchStrings(TmpSearchStrings.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_SEARCHSTRINGS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSearchStrings.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_SEARCHSTRINGS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_SEARCHSTRINGS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSearchStrings=%zu hrc=%Rhrc\n", this, "Host::getSearchStrings", ComSafeArraySize(*aSearchStrings), hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(ProcessorCount)(ULONG *aProcessorCount)
{
    LogRelFlow(("{%p} %s: enter aProcessorCount=%p\n", this, "Host::getProcessorCount", aProcessorCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProcessorCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORCOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProcessorCount(aProcessorCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORCOUNT_RETURN(this, hrc, 0 /*normal*/,*aProcessorCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aProcessorCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aProcessorCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProcessorCount=%RU32 hrc=%Rhrc\n", this, "Host::getProcessorCount", *aProcessorCount, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(ProcessorOnlineCount)(ULONG *aProcessorOnlineCount)
{
    LogRelFlow(("{%p} %s: enter aProcessorOnlineCount=%p\n", this, "Host::getProcessorOnlineCount", aProcessorOnlineCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProcessorOnlineCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORONLINECOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProcessorOnlineCount(aProcessorOnlineCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORONLINECOUNT_RETURN(this, hrc, 0 /*normal*/,*aProcessorOnlineCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORONLINECOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aProcessorOnlineCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORONLINECOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aProcessorOnlineCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProcessorOnlineCount=%RU32 hrc=%Rhrc\n", this, "Host::getProcessorOnlineCount", *aProcessorOnlineCount, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(ProcessorCoreCount)(ULONG *aProcessorCoreCount)
{
    LogRelFlow(("{%p} %s: enter aProcessorCoreCount=%p\n", this, "Host::getProcessorCoreCount", aProcessorCoreCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProcessorCoreCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORCORECOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProcessorCoreCount(aProcessorCoreCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORCORECOUNT_RETURN(this, hrc, 0 /*normal*/,*aProcessorCoreCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORCORECOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aProcessorCoreCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORCORECOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aProcessorCoreCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProcessorCoreCount=%RU32 hrc=%Rhrc\n", this, "Host::getProcessorCoreCount", *aProcessorCoreCount, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(ProcessorOnlineCoreCount)(ULONG *aProcessorOnlineCoreCount)
{
    LogRelFlow(("{%p} %s: enter aProcessorOnlineCoreCount=%p\n", this, "Host::getProcessorOnlineCoreCount", aProcessorOnlineCoreCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProcessorOnlineCoreCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORONLINECORECOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProcessorOnlineCoreCount(aProcessorOnlineCoreCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORONLINECORECOUNT_RETURN(this, hrc, 0 /*normal*/,*aProcessorOnlineCoreCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORONLINECORECOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aProcessorOnlineCoreCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_PROCESSORONLINECORECOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aProcessorOnlineCoreCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProcessorOnlineCoreCount=%RU32 hrc=%Rhrc\n", this, "Host::getProcessorOnlineCoreCount", *aProcessorOnlineCoreCount, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(MemorySize)(ULONG *aMemorySize)
{
    LogRelFlow(("{%p} %s: enter aMemorySize=%p\n", this, "Host::getMemorySize", aMemorySize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMemorySize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_MEMORYSIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMemorySize(aMemorySize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_MEMORYSIZE_RETURN(this, hrc, 0 /*normal*/,*aMemorySize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_MEMORYSIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aMemorySize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_MEMORYSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aMemorySize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMemorySize=%RU32 hrc=%Rhrc\n", this, "Host::getMemorySize", *aMemorySize, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(MemoryAvailable)(ULONG *aMemoryAvailable)
{
    LogRelFlow(("{%p} %s: enter aMemoryAvailable=%p\n", this, "Host::getMemoryAvailable", aMemoryAvailable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMemoryAvailable);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_MEMORYAVAILABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMemoryAvailable(aMemoryAvailable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_MEMORYAVAILABLE_RETURN(this, hrc, 0 /*normal*/,*aMemoryAvailable);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_MEMORYAVAILABLE_RETURN(this, hrc, 1 /*hrc exception*/,*aMemoryAvailable);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_MEMORYAVAILABLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aMemoryAvailable);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMemoryAvailable=%RU32 hrc=%Rhrc\n", this, "Host::getMemoryAvailable", *aMemoryAvailable, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(OperatingSystem)(BSTR *aOperatingSystem)
{
    LogRelFlow(("{%p} %s: enter aOperatingSystem=%p\n", this, "Host::getOperatingSystem", aOperatingSystem));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOperatingSystem);
        BSTROutConverter TmpOperatingSystem(aOperatingSystem);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_OPERATINGSYSTEM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOperatingSystem(TmpOperatingSystem.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_OPERATINGSYSTEM_RETURN(this, hrc, 0 /*normal*/,TmpOperatingSystem.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_OPERATINGSYSTEM_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_OPERATINGSYSTEM_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOperatingSystem=%ls hrc=%Rhrc\n", this, "Host::getOperatingSystem", *aOperatingSystem, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(OSVersion)(BSTR *aOSVersion)
{
    LogRelFlow(("{%p} %s: enter aOSVersion=%p\n", this, "Host::getOSVersion", aOSVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOSVersion);
        BSTROutConverter TmpOSVersion(aOSVersion);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_OSVERSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOSVersion(TmpOSVersion.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_OSVERSION_RETURN(this, hrc, 0 /*normal*/,TmpOSVersion.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_OSVERSION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_OSVERSION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOSVersion=%ls hrc=%Rhrc\n", this, "Host::getOSVersion", *aOSVersion, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(UTCTime)(LONG64 *aUTCTime)
{
    LogRelFlow(("{%p} %s: enter aUTCTime=%p\n", this, "Host::getUTCTime", aUTCTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUTCTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_UTCTIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUTCTime(aUTCTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_UTCTIME_RETURN(this, hrc, 0 /*normal*/,*aUTCTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_UTCTIME_RETURN(this, hrc, 1 /*hrc exception*/,*aUTCTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_UTCTIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aUTCTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUTCTime=%RI64 hrc=%Rhrc\n", this, "Host::getUTCTime", *aUTCTime, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(Acceleration3DAvailable)(BOOL *aAcceleration3DAvailable)
{
    LogRelFlow(("{%p} %s: enter aAcceleration3DAvailable=%p\n", this, "Host::getAcceleration3DAvailable", aAcceleration3DAvailable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAcceleration3DAvailable);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_ACCELERATION3DAVAILABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAcceleration3DAvailable(aAcceleration3DAvailable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_ACCELERATION3DAVAILABLE_RETURN(this, hrc, 0 /*normal*/,*aAcceleration3DAvailable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_ACCELERATION3DAVAILABLE_RETURN(this, hrc, 1 /*hrc exception*/,*aAcceleration3DAvailable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_ACCELERATION3DAVAILABLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aAcceleration3DAvailable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAcceleration3DAvailable=%RTbool hrc=%Rhrc\n", this, "Host::getAcceleration3DAvailable", *aAcceleration3DAvailable, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(VideoInputDevices)(ComSafeArrayOut(IHostVideoInputDevice *, aVideoInputDevices))
{
    LogRelFlow(("{%p} %s: enter aVideoInputDevices=%p\n", this, "Host::getVideoInputDevices", aVideoInputDevices));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVideoInputDevices);
        ArrayComTypeOutConverter<IHostVideoInputDevice> TmpVideoInputDevices(ComSafeArrayOutArg(aVideoInputDevices));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_VIDEOINPUTDEVICES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVideoInputDevices(TmpVideoInputDevices.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_VIDEOINPUTDEVICES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpVideoInputDevices.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_VIDEOINPUTDEVICES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_VIDEOINPUTDEVICES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVideoInputDevices=%zu hrc=%Rhrc\n", this, "Host::getVideoInputDevices", ComSafeArraySize(*aVideoInputDevices), hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(Update)(IHostUpdate **aUpdate)
{
    LogRelFlow(("{%p} %s: enter aUpdate=%p\n", this, "Host::getUpdate", aUpdate));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUpdate);
        ComTypeOutConverter<IHostUpdate> TmpUpdate(aUpdate);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_UPDATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUpdate(TmpUpdate.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_UPDATE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpUpdate.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_UPDATE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GET_UPDATE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUpdate=%p hrc=%Rhrc\n", this, "Host::getUpdate", *aUpdate, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute1IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute2IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute3IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute4IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute5IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute6IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute7IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute8IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute9IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute10IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute11IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::COMGETTER(InternalAndReservedAttribute12IHost)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IHost methods
//

STDMETHODIMP HostWrap::GetProcessorSpeed(ULONG aCpuId,
                                         ULONG *aSpeed)
{
    LogRelFlow(("{%p} %s:enter aCpuId=%RU32 aSpeed=%p\n", this, "Host::getProcessorSpeed", aCpuId, aSpeed));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSpeed);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORSPEED_ENTER(this, aCpuId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProcessorSpeed(aCpuId,
                                    aSpeed);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORSPEED_RETURN(this, hrc, 0 /*normal*/, aCpuId, *aSpeed);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORSPEED_RETURN(this, hrc, 1 /*hrc exception*/, aCpuId, *aSpeed);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORSPEED_RETURN(this, hrc, 9 /*unhandled exception*/, aCpuId, *aSpeed);
#endif
    }

    LogRelFlow(("{%p} %s: leave aSpeed=%RU32 hrc=%Rhrc\n", this, "Host::getProcessorSpeed", *aSpeed, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::GetProcessorFeature(ProcessorFeature_T aFeature,
                                           BOOL *aSupported)
{
    LogRelFlow(("{%p} %s:enter aFeature=%RU32 aSupported=%p\n", this, "Host::getProcessorFeature", aFeature, aSupported));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupported);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORFEATURE_ENTER(this, aFeature);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProcessorFeature(aFeature,
                                      aSupported);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORFEATURE_RETURN(this, hrc, 0 /*normal*/, aFeature, *aSupported != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORFEATURE_RETURN(this, hrc, 1 /*hrc exception*/, aFeature, *aSupported != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORFEATURE_RETURN(this, hrc, 9 /*unhandled exception*/, aFeature, *aSupported != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aSupported=%RTbool hrc=%Rhrc\n", this, "Host::getProcessorFeature", *aSupported, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::GetProcessorDescription(ULONG aCpuId,
                                               BSTR *aDescription)
{
    LogRelFlow(("{%p} %s:enter aCpuId=%RU32 aDescription=%p\n", this, "Host::getProcessorDescription", aCpuId, aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDescription);


        
        BSTROutConverter TmpDescription(aDescription);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORDESCRIPTION_ENTER(this, aCpuId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProcessorDescription(aCpuId,
                                          TmpDescription.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORDESCRIPTION_RETURN(this, hrc, 0 /*normal*/, aCpuId, TmpDescription.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORDESCRIPTION_RETURN(this, hrc, 1 /*hrc exception*/, aCpuId, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORDESCRIPTION_RETURN(this, hrc, 9 /*unhandled exception*/, aCpuId, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aDescription=%ls hrc=%Rhrc\n", this, "Host::getProcessorDescription", *aDescription, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::GetProcessorCPUIDLeaf(ULONG aCpuId,
                                             ULONG aLeaf,
                                             ULONG aSubLeaf,
                                             ULONG *aValEax,
                                             ULONG *aValEbx,
                                             ULONG *aValEcx,
                                             ULONG *aValEdx)
{
    LogRelFlow(("{%p} %s:enter aCpuId=%RU32 aLeaf=%RU32 aSubLeaf=%RU32 aValEax=%p aValEbx=%p aValEcx=%p aValEdx=%p\n", this, "Host::getProcessorCPUIDLeaf", aCpuId, aLeaf, aSubLeaf, aValEax, aValEbx, aValEcx, aValEdx));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValEax);
        CheckComArgOutPointerValidThrow(aValEbx);
        CheckComArgOutPointerValidThrow(aValEcx);
        CheckComArgOutPointerValidThrow(aValEdx);


        
        
        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORCPUIDLEAF_ENTER(this, aCpuId, aLeaf, aSubLeaf);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProcessorCPUIDLeaf(aCpuId,
                                        aLeaf,
                                        aSubLeaf,
                                        aValEax,
                                        aValEbx,
                                        aValEcx,
                                        aValEdx);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORCPUIDLEAF_RETURN(this, hrc, 0 /*normal*/, aCpuId, aLeaf, aSubLeaf, *aValEax, *aValEbx, *aValEcx, *aValEdx);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORCPUIDLEAF_RETURN(this, hrc, 1 /*hrc exception*/, aCpuId, aLeaf, aSubLeaf, *aValEax, *aValEbx, *aValEcx, *aValEdx);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GETPROCESSORCPUIDLEAF_RETURN(this, hrc, 9 /*unhandled exception*/, aCpuId, aLeaf, aSubLeaf, *aValEax, *aValEbx, *aValEcx, *aValEdx);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aValEax=%RU32 *aValEbx=%RU32 *aValEcx=%RU32 *aValEdx=%RU32 hrc=%Rhrc\n", this, "Host::getProcessorCPUIDLeaf", *aValEax, *aValEbx, *aValEcx, *aValEdx, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::CreateHostOnlyNetworkInterface(IHostNetworkInterface **aHostInterface,
                                                      IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aHostInterface=%p aProgress=%p\n", this, "Host::createHostOnlyNetworkInterface", aHostInterface, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHostInterface);
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeOutConverter<IHostNetworkInterface> TmpHostInterface(aHostInterface);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_CREATEHOSTONLYNETWORKINTERFACE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createHostOnlyNetworkInterface(TmpHostInterface.ptr(),
                                                 TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_CREATEHOSTONLYNETWORKINTERFACE_RETURN(this, hrc, 0 /*normal*/, (void *)TmpHostInterface.ptr(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_CREATEHOSTONLYNETWORKINTERFACE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_CREATEHOSTONLYNETWORKINTERFACE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHostInterface=%p aProgress=%p hrc=%Rhrc\n", this, "Host::createHostOnlyNetworkInterface", *aHostInterface, *aProgress, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::RemoveHostOnlyNetworkInterface(IN_BSTR aId,
                                                      IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aId=%ls aProgress=%p\n", this, "Host::removeHostOnlyNetworkInterface", aId, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        UuidInConverter TmpId(aId);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEHOSTONLYNETWORKINTERFACE_ENTER(this, TmpId.uuid().toStringCurly().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeHostOnlyNetworkInterface(TmpId.uuid(),
                                                 TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEHOSTONLYNETWORKINTERFACE_RETURN(this, hrc, 0 /*normal*/, TmpId.uuid().toStringCurly().c_str(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEHOSTONLYNETWORKINTERFACE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEHOSTONLYNETWORKINTERFACE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Host::removeHostOnlyNetworkInterface", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::CreateUSBDeviceFilter(IN_BSTR aName,
                                             IHostUSBDeviceFilter **aFilter)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aFilter=%p\n", this, "Host::createUSBDeviceFilter", aName, aFilter));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFilter);


        BSTRInConverter TmpName(aName);
        ComTypeOutConverter<IHostUSBDeviceFilter> TmpFilter(aFilter);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_CREATEUSBDEVICEFILTER_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createUSBDeviceFilter(TmpName.str(),
                                        TmpFilter.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_CREATEUSBDEVICEFILTER_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), (void *)TmpFilter.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_CREATEUSBDEVICEFILTER_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_CREATEUSBDEVICEFILTER_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aFilter=%p hrc=%Rhrc\n", this, "Host::createUSBDeviceFilter", *aFilter, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::InsertUSBDeviceFilter(ULONG aPosition,
                                             IHostUSBDeviceFilter *aFilter)
{
    LogRelFlow(("{%p} %s:enter aPosition=%RU32 aFilter=%p\n", this, "Host::insertUSBDeviceFilter", aPosition, aFilter));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        ComTypeInConverter<IHostUSBDeviceFilter> TmpFilter(aFilter);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_INSERTUSBDEVICEFILTER_ENTER(this, aPosition, (void *)TmpFilter.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = insertUSBDeviceFilter(aPosition,
                                        TmpFilter.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_INSERTUSBDEVICEFILTER_RETURN(this, hrc, 0 /*normal*/, aPosition, (void *)TmpFilter.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_INSERTUSBDEVICEFILTER_RETURN(this, hrc, 1 /*hrc exception*/, aPosition, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_INSERTUSBDEVICEFILTER_RETURN(this, hrc, 9 /*unhandled exception*/, aPosition, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Host::insertUSBDeviceFilter", hrc));
    return hrc;
}

STDMETHODIMP HostWrap::RemoveUSBDeviceFilter(ULONG aPosition)
{
    LogRelFlow(("{%p} %s:enter aPosition=%RU32\n", this, "Host::removeUSBDeviceFilter", aPosition));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEUSBDEVICEFILTER_ENTER(this, aPosition);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeUSBDeviceFilter(aPosition);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEUSBDEVICEFILTER_RETURN(this, hrc, 0 /*normal*/, aPosition);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEUSBDEVICEFILTER_RETURN(this, hrc, 1 /*hrc exception*/, aPosition);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEUSBDEVICEFILTER_RETURN(this, hrc, 9 /*unhandled exception*/, aPosition);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Host::removeUSBDeviceFilter", hrc));
    return hrc;
}

STDMETHODIMP HostWrap::FindHostDVDDrive(IN_BSTR aName,
                                        IMedium **aDrive)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aDrive=%p\n", this, "Host::findHostDVDDrive", aName, aDrive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDrive);


        BSTRInConverter TmpName(aName);
        ComTypeOutConverter<IMedium> TmpDrive(aDrive);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTDVDDRIVE_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = findHostDVDDrive(TmpName.str(),
                                   TmpDrive.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTDVDDRIVE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), (void *)TmpDrive.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTDVDDRIVE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTDVDDRIVE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aDrive=%p hrc=%Rhrc\n", this, "Host::findHostDVDDrive", *aDrive, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::FindHostFloppyDrive(IN_BSTR aName,
                                           IMedium **aDrive)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aDrive=%p\n", this, "Host::findHostFloppyDrive", aName, aDrive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDrive);


        BSTRInConverter TmpName(aName);
        ComTypeOutConverter<IMedium> TmpDrive(aDrive);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTFLOPPYDRIVE_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = findHostFloppyDrive(TmpName.str(),
                                      TmpDrive.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTFLOPPYDRIVE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), (void *)TmpDrive.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTFLOPPYDRIVE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTFLOPPYDRIVE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aDrive=%p hrc=%Rhrc\n", this, "Host::findHostFloppyDrive", *aDrive, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::FindHostNetworkInterfaceByName(IN_BSTR aName,
                                                      IHostNetworkInterface **aNetworkInterface)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aNetworkInterface=%p\n", this, "Host::findHostNetworkInterfaceByName", aName, aNetworkInterface));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNetworkInterface);


        BSTRInConverter TmpName(aName);
        ComTypeOutConverter<IHostNetworkInterface> TmpNetworkInterface(aNetworkInterface);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACEBYNAME_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = findHostNetworkInterfaceByName(TmpName.str(),
                                                 TmpNetworkInterface.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACEBYNAME_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), (void *)TmpNetworkInterface.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACEBYNAME_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACEBYNAME_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aNetworkInterface=%p hrc=%Rhrc\n", this, "Host::findHostNetworkInterfaceByName", *aNetworkInterface, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::FindHostNetworkInterfaceById(IN_BSTR aId,
                                                    IHostNetworkInterface **aNetworkInterface)
{
    LogRelFlow(("{%p} %s:enter aId=%ls aNetworkInterface=%p\n", this, "Host::findHostNetworkInterfaceById", aId, aNetworkInterface));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNetworkInterface);


        UuidInConverter TmpId(aId);
        ComTypeOutConverter<IHostNetworkInterface> TmpNetworkInterface(aNetworkInterface);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACEBYID_ENTER(this, TmpId.uuid().toStringCurly().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = findHostNetworkInterfaceById(TmpId.uuid(),
                                               TmpNetworkInterface.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACEBYID_RETURN(this, hrc, 0 /*normal*/, TmpId.uuid().toStringCurly().c_str(), (void *)TmpNetworkInterface.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACEBYID_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACEBYID_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aNetworkInterface=%p hrc=%Rhrc\n", this, "Host::findHostNetworkInterfaceById", *aNetworkInterface, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::FindHostNetworkInterfacesOfType(HostNetworkInterfaceType_T aType,
                                                       ComSafeArrayOut(IHostNetworkInterface *, aNetworkInterfaces))
{
    LogRelFlow(("{%p} %s:enter aType=%RU32 aNetworkInterfaces=%p\n", this, "Host::findHostNetworkInterfacesOfType", aType, aNetworkInterfaces));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNetworkInterfaces);


        
        ArrayComTypeOutConverter<IHostNetworkInterface> TmpNetworkInterfaces(ComSafeArrayOutArg(aNetworkInterfaces));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACESOFTYPE_ENTER(this, aType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = findHostNetworkInterfacesOfType(aType,
                                                  TmpNetworkInterfaces.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACESOFTYPE_RETURN(this, hrc, 0 /*normal*/, aType, (uint32_t)TmpNetworkInterfaces.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACESOFTYPE_RETURN(this, hrc, 1 /*hrc exception*/, aType, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDHOSTNETWORKINTERFACESOFTYPE_RETURN(this, hrc, 9 /*unhandled exception*/, aType, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aNetworkInterfaces=%zu hrc=%Rhrc\n", this, "Host::findHostNetworkInterfacesOfType", ComSafeArraySize(*aNetworkInterfaces), hrc));
    return hrc;
}

STDMETHODIMP HostWrap::FindUSBDeviceById(IN_BSTR aId,
                                         IHostUSBDevice **aDevice)
{
    LogRelFlow(("{%p} %s:enter aId=%ls aDevice=%p\n", this, "Host::findUSBDeviceById", aId, aDevice));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDevice);


        UuidInConverter TmpId(aId);
        ComTypeOutConverter<IHostUSBDevice> TmpDevice(aDevice);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDUSBDEVICEBYID_ENTER(this, TmpId.uuid().toStringCurly().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = findUSBDeviceById(TmpId.uuid(),
                                    TmpDevice.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDUSBDEVICEBYID_RETURN(this, hrc, 0 /*normal*/, TmpId.uuid().toStringCurly().c_str(), (void *)TmpDevice.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDUSBDEVICEBYID_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDUSBDEVICEBYID_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aDevice=%p hrc=%Rhrc\n", this, "Host::findUSBDeviceById", *aDevice, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::FindUSBDeviceByAddress(IN_BSTR aName,
                                              IHostUSBDevice **aDevice)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aDevice=%p\n", this, "Host::findUSBDeviceByAddress", aName, aDevice));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDevice);


        BSTRInConverter TmpName(aName);
        ComTypeOutConverter<IHostUSBDevice> TmpDevice(aDevice);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDUSBDEVICEBYADDRESS_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = findUSBDeviceByAddress(TmpName.str(),
                                         TmpDevice.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDUSBDEVICEBYADDRESS_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), (void *)TmpDevice.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDUSBDEVICEBYADDRESS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_FINDUSBDEVICEBYADDRESS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aDevice=%p hrc=%Rhrc\n", this, "Host::findUSBDeviceByAddress", *aDevice, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::GenerateMACAddress(BSTR *aAddress)
{
    LogRelFlow(("{%p} %s:enter aAddress=%p\n", this, "Host::generateMACAddress", aAddress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAddress);


        BSTROutConverter TmpAddress(aAddress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GENERATEMACADDRESS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = generateMACAddress(TmpAddress.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GENERATEMACADDRESS_RETURN(this, hrc, 0 /*normal*/, TmpAddress.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GENERATEMACADDRESS_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_GENERATEMACADDRESS_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aAddress=%ls hrc=%Rhrc\n", this, "Host::generateMACAddress", *aAddress, hrc));
    return hrc;
}

STDMETHODIMP HostWrap::AddUSBDeviceSource(IN_BSTR aBackend,
                                          IN_BSTR aId,
                                          IN_BSTR aAddress,
                                          ComSafeArrayIn(IN_BSTR, aPropertyNames),
                                          ComSafeArrayIn(IN_BSTR, aPropertyValues))
{
    LogRelFlow(("{%p} %s:enter aBackend=%ls aId=%ls aAddress=%ls aPropertyNames=%zu aPropertyValues=%zu\n", this, "Host::addUSBDeviceSource", aBackend, aId, aAddress, aPropertyNames, aPropertyValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpBackend(aBackend);
        BSTRInConverter TmpId(aId);
        BSTRInConverter TmpAddress(aAddress);
        ArrayBSTRInConverter TmpPropertyNames(ComSafeArrayInArg(aPropertyNames));
        ArrayBSTRInConverter TmpPropertyValues(ComSafeArrayInArg(aPropertyValues));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_ADDUSBDEVICESOURCE_ENTER(this, TmpBackend.str().c_str(), TmpId.str().c_str(), TmpAddress.str().c_str(), (uint32_t)TmpPropertyNames.array().size(), NULL /*for now*/, (uint32_t)TmpPropertyValues.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = addUSBDeviceSource(TmpBackend.str(),
                                     TmpId.str(),
                                     TmpAddress.str(),
                                     TmpPropertyNames.array(),
                                     TmpPropertyValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_ADDUSBDEVICESOURCE_RETURN(this, hrc, 0 /*normal*/, TmpBackend.str().c_str(), TmpId.str().c_str(), TmpAddress.str().c_str(), (uint32_t)TmpPropertyNames.array().size(), NULL /*for now*/, (uint32_t)TmpPropertyValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_ADDUSBDEVICESOURCE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_ADDUSBDEVICESOURCE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Host::addUSBDeviceSource", hrc));
    return hrc;
}

STDMETHODIMP HostWrap::RemoveUSBDeviceSource(IN_BSTR aId)
{
    LogRelFlow(("{%p} %s:enter aId=%ls\n", this, "Host::removeUSBDeviceSource", aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpId(aId);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEUSBDEVICESOURCE_ENTER(this, TmpId.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeUSBDeviceSource(TmpId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEUSBDEVICESOURCE_RETURN(this, hrc, 0 /*normal*/, TmpId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEUSBDEVICESOURCE_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOST_REMOVEUSBDEVICESOURCE_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Host::removeUSBDeviceSource", hrc));
    return hrc;
}

STDMETHODIMP HostWrap::InternalAndReservedMethod1IHost()
{
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::InternalAndReservedMethod2IHost()
{
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::InternalAndReservedMethod3IHost()
{
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::InternalAndReservedMethod4IHost()
{
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::InternalAndReservedMethod5IHost()
{
    return E_NOTIMPL;
}

STDMETHODIMP HostWrap::InternalAndReservedMethod6IHost()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(HostWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(HostWrap, IHost)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "HostWrap.cpp"


// ##### BEGINFILE "SystemPropertiesWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for ISystemProperties.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_SYSTEMPROPERTIES

#include "SystemPropertiesWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(SystemPropertiesWrap)

//
// ISystemProperties properties
//

STDMETHODIMP SystemPropertiesWrap::COMGETTER(MinGuestRAM)(ULONG *aMinGuestRAM)
{
    LogRelFlow(("{%p} %s: enter aMinGuestRAM=%p\n", this, "SystemProperties::getMinGuestRAM", aMinGuestRAM));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMinGuestRAM);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTRAM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMinGuestRAM(aMinGuestRAM);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTRAM_RETURN(this, hrc, 0 /*normal*/,*aMinGuestRAM);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTRAM_RETURN(this, hrc, 1 /*hrc exception*/,*aMinGuestRAM);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTRAM_RETURN(this, hrc, 9 /*unhandled exception*/,*aMinGuestRAM);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMinGuestRAM=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMinGuestRAM", *aMinGuestRAM, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(MaxGuestRAM)(ULONG *aMaxGuestRAM)
{
    LogRelFlow(("{%p} %s: enter aMaxGuestRAM=%p\n", this, "SystemProperties::getMaxGuestRAM", aMaxGuestRAM));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxGuestRAM);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTRAM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxGuestRAM(aMaxGuestRAM);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTRAM_RETURN(this, hrc, 0 /*normal*/,*aMaxGuestRAM);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTRAM_RETURN(this, hrc, 1 /*hrc exception*/,*aMaxGuestRAM);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTRAM_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaxGuestRAM);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaxGuestRAM=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMaxGuestRAM", *aMaxGuestRAM, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(MinGuestVRAM)(ULONG *aMinGuestVRAM)
{
    LogRelFlow(("{%p} %s: enter aMinGuestVRAM=%p\n", this, "SystemProperties::getMinGuestVRAM", aMinGuestVRAM));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMinGuestVRAM);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTVRAM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMinGuestVRAM(aMinGuestVRAM);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTVRAM_RETURN(this, hrc, 0 /*normal*/,*aMinGuestVRAM);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTVRAM_RETURN(this, hrc, 1 /*hrc exception*/,*aMinGuestVRAM);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTVRAM_RETURN(this, hrc, 9 /*unhandled exception*/,*aMinGuestVRAM);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMinGuestVRAM=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMinGuestVRAM", *aMinGuestVRAM, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(MaxGuestVRAM)(ULONG *aMaxGuestVRAM)
{
    LogRelFlow(("{%p} %s: enter aMaxGuestVRAM=%p\n", this, "SystemProperties::getMaxGuestVRAM", aMaxGuestVRAM));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxGuestVRAM);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTVRAM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxGuestVRAM(aMaxGuestVRAM);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTVRAM_RETURN(this, hrc, 0 /*normal*/,*aMaxGuestVRAM);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTVRAM_RETURN(this, hrc, 1 /*hrc exception*/,*aMaxGuestVRAM);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTVRAM_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaxGuestVRAM);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaxGuestVRAM=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMaxGuestVRAM", *aMaxGuestVRAM, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(MinGuestCPUCount)(ULONG *aMinGuestCPUCount)
{
    LogRelFlow(("{%p} %s: enter aMinGuestCPUCount=%p\n", this, "SystemProperties::getMinGuestCPUCount", aMinGuestCPUCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMinGuestCPUCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTCPUCOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMinGuestCPUCount(aMinGuestCPUCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTCPUCOUNT_RETURN(this, hrc, 0 /*normal*/,*aMinGuestCPUCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTCPUCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aMinGuestCPUCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MINGUESTCPUCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aMinGuestCPUCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMinGuestCPUCount=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMinGuestCPUCount", *aMinGuestCPUCount, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(MaxGuestCPUCount)(ULONG *aMaxGuestCPUCount)
{
    LogRelFlow(("{%p} %s: enter aMaxGuestCPUCount=%p\n", this, "SystemProperties::getMaxGuestCPUCount", aMaxGuestCPUCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxGuestCPUCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTCPUCOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxGuestCPUCount(aMaxGuestCPUCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTCPUCOUNT_RETURN(this, hrc, 0 /*normal*/,*aMaxGuestCPUCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTCPUCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aMaxGuestCPUCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTCPUCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaxGuestCPUCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaxGuestCPUCount=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMaxGuestCPUCount", *aMaxGuestCPUCount, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(MaxGuestMonitors)(ULONG *aMaxGuestMonitors)
{
    LogRelFlow(("{%p} %s: enter aMaxGuestMonitors=%p\n", this, "SystemProperties::getMaxGuestMonitors", aMaxGuestMonitors));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxGuestMonitors);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTMONITORS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxGuestMonitors(aMaxGuestMonitors);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTMONITORS_RETURN(this, hrc, 0 /*normal*/,*aMaxGuestMonitors);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTMONITORS_RETURN(this, hrc, 1 /*hrc exception*/,*aMaxGuestMonitors);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXGUESTMONITORS_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaxGuestMonitors);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaxGuestMonitors=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMaxGuestMonitors", *aMaxGuestMonitors, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InfoVDSize)(LONG64 *aInfoVDSize)
{
    LogRelFlow(("{%p} %s: enter aInfoVDSize=%p\n", this, "SystemProperties::getInfoVDSize", aInfoVDSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aInfoVDSize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_INFOVDSIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getInfoVDSize(aInfoVDSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_INFOVDSIZE_RETURN(this, hrc, 0 /*normal*/,*aInfoVDSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_INFOVDSIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aInfoVDSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_INFOVDSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aInfoVDSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aInfoVDSize=%RI64 hrc=%Rhrc\n", this, "SystemProperties::getInfoVDSize", *aInfoVDSize, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SerialPortCount)(ULONG *aSerialPortCount)
{
    LogRelFlow(("{%p} %s: enter aSerialPortCount=%p\n", this, "SystemProperties::getSerialPortCount", aSerialPortCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSerialPortCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SERIALPORTCOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSerialPortCount(aSerialPortCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SERIALPORTCOUNT_RETURN(this, hrc, 0 /*normal*/,*aSerialPortCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SERIALPORTCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aSerialPortCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SERIALPORTCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aSerialPortCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSerialPortCount=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getSerialPortCount", *aSerialPortCount, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(ParallelPortCount)(ULONG *aParallelPortCount)
{
    LogRelFlow(("{%p} %s: enter aParallelPortCount=%p\n", this, "SystemProperties::getParallelPortCount", aParallelPortCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aParallelPortCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PARALLELPORTCOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getParallelPortCount(aParallelPortCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PARALLELPORTCOUNT_RETURN(this, hrc, 0 /*normal*/,*aParallelPortCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PARALLELPORTCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aParallelPortCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PARALLELPORTCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aParallelPortCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aParallelPortCount=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getParallelPortCount", *aParallelPortCount, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(MaxBootPosition)(ULONG *aMaxBootPosition)
{
    LogRelFlow(("{%p} %s: enter aMaxBootPosition=%p\n", this, "SystemProperties::getMaxBootPosition", aMaxBootPosition));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxBootPosition);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXBOOTPOSITION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxBootPosition(aMaxBootPosition);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXBOOTPOSITION_RETURN(this, hrc, 0 /*normal*/,*aMaxBootPosition);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXBOOTPOSITION_RETURN(this, hrc, 1 /*hrc exception*/,*aMaxBootPosition);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MAXBOOTPOSITION_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaxBootPosition);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaxBootPosition=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMaxBootPosition", *aMaxBootPosition, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(RawModeSupported)(BOOL *aRawModeSupported)
{
    LogRelFlow(("{%p} %s: enter aRawModeSupported=%p\n", this, "SystemProperties::getRawModeSupported", aRawModeSupported));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRawModeSupported);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_RAWMODESUPPORTED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRawModeSupported(aRawModeSupported);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_RAWMODESUPPORTED_RETURN(this, hrc, 0 /*normal*/,*aRawModeSupported != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_RAWMODESUPPORTED_RETURN(this, hrc, 1 /*hrc exception*/,*aRawModeSupported != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_RAWMODESUPPORTED_RETURN(this, hrc, 9 /*unhandled exception*/,*aRawModeSupported != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRawModeSupported=%RTbool hrc=%Rhrc\n", this, "SystemProperties::getRawModeSupported", *aRawModeSupported, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(ExclusiveHwVirt)(BOOL *aExclusiveHwVirt)
{
    LogRelFlow(("{%p} %s: enter aExclusiveHwVirt=%p\n", this, "SystemProperties::getExclusiveHwVirt", aExclusiveHwVirt));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aExclusiveHwVirt);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_EXCLUSIVEHWVIRT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getExclusiveHwVirt(aExclusiveHwVirt);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_EXCLUSIVEHWVIRT_RETURN(this, hrc, 0 /*normal*/,*aExclusiveHwVirt != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_EXCLUSIVEHWVIRT_RETURN(this, hrc, 1 /*hrc exception*/,*aExclusiveHwVirt != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_EXCLUSIVEHWVIRT_RETURN(this, hrc, 9 /*unhandled exception*/,*aExclusiveHwVirt != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aExclusiveHwVirt=%RTbool hrc=%Rhrc\n", this, "SystemProperties::getExclusiveHwVirt", *aExclusiveHwVirt, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(ExclusiveHwVirt)(BOOL aExclusiveHwVirt)
{
    LogRelFlow(("{%p} %s: enter aExclusiveHwVirt=%RTbool\n", this, "SystemProperties::setExclusiveHwVirt", aExclusiveHwVirt));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_EXCLUSIVEHWVIRT_ENTER(this, aExclusiveHwVirt != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setExclusiveHwVirt(aExclusiveHwVirt != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_EXCLUSIVEHWVIRT_RETURN(this, hrc, 0 /*normal*/,aExclusiveHwVirt != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_EXCLUSIVEHWVIRT_RETURN(this, hrc, 1 /*hrc exception*/,aExclusiveHwVirt != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_EXCLUSIVEHWVIRT_RETURN(this, hrc, 9 /*unhandled exception*/,aExclusiveHwVirt != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setExclusiveHwVirt", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(DefaultMachineFolder)(BSTR *aDefaultMachineFolder)
{
    LogRelFlow(("{%p} %s: enter aDefaultMachineFolder=%p\n", this, "SystemProperties::getDefaultMachineFolder", aDefaultMachineFolder));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDefaultMachineFolder);
        BSTROutConverter TmpDefaultMachineFolder(aDefaultMachineFolder);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTMACHINEFOLDER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDefaultMachineFolder(TmpDefaultMachineFolder.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTMACHINEFOLDER_RETURN(this, hrc, 0 /*normal*/,TmpDefaultMachineFolder.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTMACHINEFOLDER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTMACHINEFOLDER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDefaultMachineFolder=%ls hrc=%Rhrc\n", this, "SystemProperties::getDefaultMachineFolder", *aDefaultMachineFolder, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(DefaultMachineFolder)(IN_BSTR aDefaultMachineFolder)
{
    LogRelFlow(("{%p} %s: enter aDefaultMachineFolder=%ls\n", this, "SystemProperties::setDefaultMachineFolder", aDefaultMachineFolder));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpDefaultMachineFolder(aDefaultMachineFolder);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTMACHINEFOLDER_ENTER(this, TmpDefaultMachineFolder.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDefaultMachineFolder(TmpDefaultMachineFolder.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTMACHINEFOLDER_RETURN(this, hrc, 0 /*normal*/,TmpDefaultMachineFolder.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTMACHINEFOLDER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTMACHINEFOLDER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setDefaultMachineFolder", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(LoggingLevel)(BSTR *aLoggingLevel)
{
    LogRelFlow(("{%p} %s: enter aLoggingLevel=%p\n", this, "SystemProperties::getLoggingLevel", aLoggingLevel));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLoggingLevel);
        BSTROutConverter TmpLoggingLevel(aLoggingLevel);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_LOGGINGLEVEL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLoggingLevel(TmpLoggingLevel.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_LOGGINGLEVEL_RETURN(this, hrc, 0 /*normal*/,TmpLoggingLevel.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_LOGGINGLEVEL_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_LOGGINGLEVEL_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLoggingLevel=%ls hrc=%Rhrc\n", this, "SystemProperties::getLoggingLevel", *aLoggingLevel, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(LoggingLevel)(IN_BSTR aLoggingLevel)
{
    LogRelFlow(("{%p} %s: enter aLoggingLevel=%ls\n", this, "SystemProperties::setLoggingLevel", aLoggingLevel));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpLoggingLevel(aLoggingLevel);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_LOGGINGLEVEL_ENTER(this, TmpLoggingLevel.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setLoggingLevel(TmpLoggingLevel.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_LOGGINGLEVEL_RETURN(this, hrc, 0 /*normal*/,TmpLoggingLevel.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_LOGGINGLEVEL_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_LOGGINGLEVEL_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setLoggingLevel", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(MediumFormats)(ComSafeArrayOut(IMediumFormat *, aMediumFormats))
{
    LogRelFlow(("{%p} %s: enter aMediumFormats=%p\n", this, "SystemProperties::getMediumFormats", aMediumFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMediumFormats);
        ArrayComTypeOutConverter<IMediumFormat> TmpMediumFormats(ComSafeArrayOutArg(aMediumFormats));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MEDIUMFORMATS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMediumFormats(TmpMediumFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MEDIUMFORMATS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpMediumFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MEDIUMFORMATS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_MEDIUMFORMATS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMediumFormats=%zu hrc=%Rhrc\n", this, "SystemProperties::getMediumFormats", ComSafeArraySize(*aMediumFormats), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(DefaultHardDiskFormat)(BSTR *aDefaultHardDiskFormat)
{
    LogRelFlow(("{%p} %s: enter aDefaultHardDiskFormat=%p\n", this, "SystemProperties::getDefaultHardDiskFormat", aDefaultHardDiskFormat));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDefaultHardDiskFormat);
        BSTROutConverter TmpDefaultHardDiskFormat(aDefaultHardDiskFormat);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTHARDDISKFORMAT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDefaultHardDiskFormat(TmpDefaultHardDiskFormat.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTHARDDISKFORMAT_RETURN(this, hrc, 0 /*normal*/,TmpDefaultHardDiskFormat.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTHARDDISKFORMAT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTHARDDISKFORMAT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDefaultHardDiskFormat=%ls hrc=%Rhrc\n", this, "SystemProperties::getDefaultHardDiskFormat", *aDefaultHardDiskFormat, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(DefaultHardDiskFormat)(IN_BSTR aDefaultHardDiskFormat)
{
    LogRelFlow(("{%p} %s: enter aDefaultHardDiskFormat=%ls\n", this, "SystemProperties::setDefaultHardDiskFormat", aDefaultHardDiskFormat));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpDefaultHardDiskFormat(aDefaultHardDiskFormat);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTHARDDISKFORMAT_ENTER(this, TmpDefaultHardDiskFormat.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDefaultHardDiskFormat(TmpDefaultHardDiskFormat.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTHARDDISKFORMAT_RETURN(this, hrc, 0 /*normal*/,TmpDefaultHardDiskFormat.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTHARDDISKFORMAT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTHARDDISKFORMAT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setDefaultHardDiskFormat", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(FreeDiskSpaceWarning)(LONG64 *aFreeDiskSpaceWarning)
{
    LogRelFlow(("{%p} %s: enter aFreeDiskSpaceWarning=%p\n", this, "SystemProperties::getFreeDiskSpaceWarning", aFreeDiskSpaceWarning));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFreeDiskSpaceWarning);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEWARNING_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFreeDiskSpaceWarning(aFreeDiskSpaceWarning);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEWARNING_RETURN(this, hrc, 0 /*normal*/,*aFreeDiskSpaceWarning);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEWARNING_RETURN(this, hrc, 1 /*hrc exception*/,*aFreeDiskSpaceWarning);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEWARNING_RETURN(this, hrc, 9 /*unhandled exception*/,*aFreeDiskSpaceWarning);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFreeDiskSpaceWarning=%RI64 hrc=%Rhrc\n", this, "SystemProperties::getFreeDiskSpaceWarning", *aFreeDiskSpaceWarning, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(FreeDiskSpaceWarning)(LONG64 aFreeDiskSpaceWarning)
{
    LogRelFlow(("{%p} %s: enter aFreeDiskSpaceWarning=%RI64\n", this, "SystemProperties::setFreeDiskSpaceWarning", aFreeDiskSpaceWarning));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEWARNING_ENTER(this, aFreeDiskSpaceWarning);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setFreeDiskSpaceWarning(aFreeDiskSpaceWarning);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEWARNING_RETURN(this, hrc, 0 /*normal*/,aFreeDiskSpaceWarning);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEWARNING_RETURN(this, hrc, 1 /*hrc exception*/,aFreeDiskSpaceWarning);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEWARNING_RETURN(this, hrc, 9 /*unhandled exception*/,aFreeDiskSpaceWarning);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setFreeDiskSpaceWarning", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(FreeDiskSpacePercentWarning)(ULONG *aFreeDiskSpacePercentWarning)
{
    LogRelFlow(("{%p} %s: enter aFreeDiskSpacePercentWarning=%p\n", this, "SystemProperties::getFreeDiskSpacePercentWarning", aFreeDiskSpacePercentWarning));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFreeDiskSpacePercentWarning);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEPERCENTWARNING_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFreeDiskSpacePercentWarning(aFreeDiskSpacePercentWarning);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEPERCENTWARNING_RETURN(this, hrc, 0 /*normal*/,*aFreeDiskSpacePercentWarning);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEPERCENTWARNING_RETURN(this, hrc, 1 /*hrc exception*/,*aFreeDiskSpacePercentWarning);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEPERCENTWARNING_RETURN(this, hrc, 9 /*unhandled exception*/,*aFreeDiskSpacePercentWarning);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFreeDiskSpacePercentWarning=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getFreeDiskSpacePercentWarning", *aFreeDiskSpacePercentWarning, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(FreeDiskSpacePercentWarning)(ULONG aFreeDiskSpacePercentWarning)
{
    LogRelFlow(("{%p} %s: enter aFreeDiskSpacePercentWarning=%RU32\n", this, "SystemProperties::setFreeDiskSpacePercentWarning", aFreeDiskSpacePercentWarning));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEPERCENTWARNING_ENTER(this, aFreeDiskSpacePercentWarning);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setFreeDiskSpacePercentWarning(aFreeDiskSpacePercentWarning);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEPERCENTWARNING_RETURN(this, hrc, 0 /*normal*/,aFreeDiskSpacePercentWarning);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEPERCENTWARNING_RETURN(this, hrc, 1 /*hrc exception*/,aFreeDiskSpacePercentWarning);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEPERCENTWARNING_RETURN(this, hrc, 9 /*unhandled exception*/,aFreeDiskSpacePercentWarning);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setFreeDiskSpacePercentWarning", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(FreeDiskSpaceError)(LONG64 *aFreeDiskSpaceError)
{
    LogRelFlow(("{%p} %s: enter aFreeDiskSpaceError=%p\n", this, "SystemProperties::getFreeDiskSpaceError", aFreeDiskSpaceError));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFreeDiskSpaceError);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEERROR_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFreeDiskSpaceError(aFreeDiskSpaceError);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEERROR_RETURN(this, hrc, 0 /*normal*/,*aFreeDiskSpaceError);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEERROR_RETURN(this, hrc, 1 /*hrc exception*/,*aFreeDiskSpaceError);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEERROR_RETURN(this, hrc, 9 /*unhandled exception*/,*aFreeDiskSpaceError);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFreeDiskSpaceError=%RI64 hrc=%Rhrc\n", this, "SystemProperties::getFreeDiskSpaceError", *aFreeDiskSpaceError, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(FreeDiskSpaceError)(LONG64 aFreeDiskSpaceError)
{
    LogRelFlow(("{%p} %s: enter aFreeDiskSpaceError=%RI64\n", this, "SystemProperties::setFreeDiskSpaceError", aFreeDiskSpaceError));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEERROR_ENTER(this, aFreeDiskSpaceError);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setFreeDiskSpaceError(aFreeDiskSpaceError);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEERROR_RETURN(this, hrc, 0 /*normal*/,aFreeDiskSpaceError);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEERROR_RETURN(this, hrc, 1 /*hrc exception*/,aFreeDiskSpaceError);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEERROR_RETURN(this, hrc, 9 /*unhandled exception*/,aFreeDiskSpaceError);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setFreeDiskSpaceError", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(FreeDiskSpacePercentError)(ULONG *aFreeDiskSpacePercentError)
{
    LogRelFlow(("{%p} %s: enter aFreeDiskSpacePercentError=%p\n", this, "SystemProperties::getFreeDiskSpacePercentError", aFreeDiskSpacePercentError));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFreeDiskSpacePercentError);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEPERCENTERROR_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFreeDiskSpacePercentError(aFreeDiskSpacePercentError);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEPERCENTERROR_RETURN(this, hrc, 0 /*normal*/,*aFreeDiskSpacePercentError);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEPERCENTERROR_RETURN(this, hrc, 1 /*hrc exception*/,*aFreeDiskSpacePercentError);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_FREEDISKSPACEPERCENTERROR_RETURN(this, hrc, 9 /*unhandled exception*/,*aFreeDiskSpacePercentError);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFreeDiskSpacePercentError=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getFreeDiskSpacePercentError", *aFreeDiskSpacePercentError, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(FreeDiskSpacePercentError)(ULONG aFreeDiskSpacePercentError)
{
    LogRelFlow(("{%p} %s: enter aFreeDiskSpacePercentError=%RU32\n", this, "SystemProperties::setFreeDiskSpacePercentError", aFreeDiskSpacePercentError));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEPERCENTERROR_ENTER(this, aFreeDiskSpacePercentError);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setFreeDiskSpacePercentError(aFreeDiskSpacePercentError);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEPERCENTERROR_RETURN(this, hrc, 0 /*normal*/,aFreeDiskSpacePercentError);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEPERCENTERROR_RETURN(this, hrc, 1 /*hrc exception*/,aFreeDiskSpacePercentError);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_FREEDISKSPACEPERCENTERROR_RETURN(this, hrc, 9 /*unhandled exception*/,aFreeDiskSpacePercentError);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setFreeDiskSpacePercentError", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(VRDEAuthLibrary)(BSTR *aVRDEAuthLibrary)
{
    LogRelFlow(("{%p} %s: enter aVRDEAuthLibrary=%p\n", this, "SystemProperties::getVRDEAuthLibrary", aVRDEAuthLibrary));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVRDEAuthLibrary);
        BSTROutConverter TmpVRDEAuthLibrary(aVRDEAuthLibrary);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_VRDEAUTHLIBRARY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVRDEAuthLibrary(TmpVRDEAuthLibrary.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_VRDEAUTHLIBRARY_RETURN(this, hrc, 0 /*normal*/,TmpVRDEAuthLibrary.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_VRDEAUTHLIBRARY_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_VRDEAUTHLIBRARY_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVRDEAuthLibrary=%ls hrc=%Rhrc\n", this, "SystemProperties::getVRDEAuthLibrary", *aVRDEAuthLibrary, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(VRDEAuthLibrary)(IN_BSTR aVRDEAuthLibrary)
{
    LogRelFlow(("{%p} %s: enter aVRDEAuthLibrary=%ls\n", this, "SystemProperties::setVRDEAuthLibrary", aVRDEAuthLibrary));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpVRDEAuthLibrary(aVRDEAuthLibrary);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_VRDEAUTHLIBRARY_ENTER(this, TmpVRDEAuthLibrary.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVRDEAuthLibrary(TmpVRDEAuthLibrary.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_VRDEAUTHLIBRARY_RETURN(this, hrc, 0 /*normal*/,TmpVRDEAuthLibrary.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_VRDEAUTHLIBRARY_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_VRDEAUTHLIBRARY_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setVRDEAuthLibrary", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(WebServiceAuthLibrary)(BSTR *aWebServiceAuthLibrary)
{
    LogRelFlow(("{%p} %s: enter aWebServiceAuthLibrary=%p\n", this, "SystemProperties::getWebServiceAuthLibrary", aWebServiceAuthLibrary));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWebServiceAuthLibrary);
        BSTROutConverter TmpWebServiceAuthLibrary(aWebServiceAuthLibrary);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_WEBSERVICEAUTHLIBRARY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWebServiceAuthLibrary(TmpWebServiceAuthLibrary.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_WEBSERVICEAUTHLIBRARY_RETURN(this, hrc, 0 /*normal*/,TmpWebServiceAuthLibrary.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_WEBSERVICEAUTHLIBRARY_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_WEBSERVICEAUTHLIBRARY_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWebServiceAuthLibrary=%ls hrc=%Rhrc\n", this, "SystemProperties::getWebServiceAuthLibrary", *aWebServiceAuthLibrary, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(WebServiceAuthLibrary)(IN_BSTR aWebServiceAuthLibrary)
{
    LogRelFlow(("{%p} %s: enter aWebServiceAuthLibrary=%ls\n", this, "SystemProperties::setWebServiceAuthLibrary", aWebServiceAuthLibrary));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpWebServiceAuthLibrary(aWebServiceAuthLibrary);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_WEBSERVICEAUTHLIBRARY_ENTER(this, TmpWebServiceAuthLibrary.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setWebServiceAuthLibrary(TmpWebServiceAuthLibrary.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_WEBSERVICEAUTHLIBRARY_RETURN(this, hrc, 0 /*normal*/,TmpWebServiceAuthLibrary.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_WEBSERVICEAUTHLIBRARY_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_WEBSERVICEAUTHLIBRARY_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setWebServiceAuthLibrary", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(DefaultVRDEExtPack)(BSTR *aDefaultVRDEExtPack)
{
    LogRelFlow(("{%p} %s: enter aDefaultVRDEExtPack=%p\n", this, "SystemProperties::getDefaultVRDEExtPack", aDefaultVRDEExtPack));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDefaultVRDEExtPack);
        BSTROutConverter TmpDefaultVRDEExtPack(aDefaultVRDEExtPack);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTVRDEEXTPACK_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDefaultVRDEExtPack(TmpDefaultVRDEExtPack.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTVRDEEXTPACK_RETURN(this, hrc, 0 /*normal*/,TmpDefaultVRDEExtPack.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTVRDEEXTPACK_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTVRDEEXTPACK_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDefaultVRDEExtPack=%ls hrc=%Rhrc\n", this, "SystemProperties::getDefaultVRDEExtPack", *aDefaultVRDEExtPack, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(DefaultVRDEExtPack)(IN_BSTR aDefaultVRDEExtPack)
{
    LogRelFlow(("{%p} %s: enter aDefaultVRDEExtPack=%ls\n", this, "SystemProperties::setDefaultVRDEExtPack", aDefaultVRDEExtPack));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpDefaultVRDEExtPack(aDefaultVRDEExtPack);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTVRDEEXTPACK_ENTER(this, TmpDefaultVRDEExtPack.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDefaultVRDEExtPack(TmpDefaultVRDEExtPack.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTVRDEEXTPACK_RETURN(this, hrc, 0 /*normal*/,TmpDefaultVRDEExtPack.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTVRDEEXTPACK_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTVRDEEXTPACK_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setDefaultVRDEExtPack", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(LogHistoryCount)(ULONG *aLogHistoryCount)
{
    LogRelFlow(("{%p} %s: enter aLogHistoryCount=%p\n", this, "SystemProperties::getLogHistoryCount", aLogHistoryCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLogHistoryCount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_LOGHISTORYCOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLogHistoryCount(aLogHistoryCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_LOGHISTORYCOUNT_RETURN(this, hrc, 0 /*normal*/,*aLogHistoryCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_LOGHISTORYCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aLogHistoryCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_LOGHISTORYCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aLogHistoryCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLogHistoryCount=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getLogHistoryCount", *aLogHistoryCount, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(LogHistoryCount)(ULONG aLogHistoryCount)
{
    LogRelFlow(("{%p} %s: enter aLogHistoryCount=%RU32\n", this, "SystemProperties::setLogHistoryCount", aLogHistoryCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_LOGHISTORYCOUNT_ENTER(this, aLogHistoryCount);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setLogHistoryCount(aLogHistoryCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_LOGHISTORYCOUNT_RETURN(this, hrc, 0 /*normal*/,aLogHistoryCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_LOGHISTORYCOUNT_RETURN(this, hrc, 1 /*hrc exception*/,aLogHistoryCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_LOGHISTORYCOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,aLogHistoryCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setLogHistoryCount", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(DefaultAudioDriver)(AudioDriverType_T *aDefaultAudioDriver)
{
    LogRelFlow(("{%p} %s: enter aDefaultAudioDriver=%p\n", this, "SystemProperties::getDefaultAudioDriver", aDefaultAudioDriver));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDefaultAudioDriver);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTAUDIODRIVER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDefaultAudioDriver(aDefaultAudioDriver);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTAUDIODRIVER_RETURN(this, hrc, 0 /*normal*/,*aDefaultAudioDriver);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTAUDIODRIVER_RETURN(this, hrc, 1 /*hrc exception*/,*aDefaultAudioDriver);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTAUDIODRIVER_RETURN(this, hrc, 9 /*unhandled exception*/,*aDefaultAudioDriver);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDefaultAudioDriver=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getDefaultAudioDriver", *aDefaultAudioDriver, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(AutostartDatabasePath)(BSTR *aAutostartDatabasePath)
{
    LogRelFlow(("{%p} %s: enter aAutostartDatabasePath=%p\n", this, "SystemProperties::getAutostartDatabasePath", aAutostartDatabasePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAutostartDatabasePath);
        BSTROutConverter TmpAutostartDatabasePath(aAutostartDatabasePath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_AUTOSTARTDATABASEPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAutostartDatabasePath(TmpAutostartDatabasePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_AUTOSTARTDATABASEPATH_RETURN(this, hrc, 0 /*normal*/,TmpAutostartDatabasePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_AUTOSTARTDATABASEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_AUTOSTARTDATABASEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAutostartDatabasePath=%ls hrc=%Rhrc\n", this, "SystemProperties::getAutostartDatabasePath", *aAutostartDatabasePath, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(AutostartDatabasePath)(IN_BSTR aAutostartDatabasePath)
{
    LogRelFlow(("{%p} %s: enter aAutostartDatabasePath=%ls\n", this, "SystemProperties::setAutostartDatabasePath", aAutostartDatabasePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpAutostartDatabasePath(aAutostartDatabasePath);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_AUTOSTARTDATABASEPATH_ENTER(this, TmpAutostartDatabasePath.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAutostartDatabasePath(TmpAutostartDatabasePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_AUTOSTARTDATABASEPATH_RETURN(this, hrc, 0 /*normal*/,TmpAutostartDatabasePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_AUTOSTARTDATABASEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_AUTOSTARTDATABASEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setAutostartDatabasePath", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(DefaultAdditionsISO)(BSTR *aDefaultAdditionsISO)
{
    LogRelFlow(("{%p} %s: enter aDefaultAdditionsISO=%p\n", this, "SystemProperties::getDefaultAdditionsISO", aDefaultAdditionsISO));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDefaultAdditionsISO);
        BSTROutConverter TmpDefaultAdditionsISO(aDefaultAdditionsISO);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTADDITIONSISO_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDefaultAdditionsISO(TmpDefaultAdditionsISO.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTADDITIONSISO_RETURN(this, hrc, 0 /*normal*/,TmpDefaultAdditionsISO.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTADDITIONSISO_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTADDITIONSISO_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDefaultAdditionsISO=%ls hrc=%Rhrc\n", this, "SystemProperties::getDefaultAdditionsISO", *aDefaultAdditionsISO, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(DefaultAdditionsISO)(IN_BSTR aDefaultAdditionsISO)
{
    LogRelFlow(("{%p} %s: enter aDefaultAdditionsISO=%ls\n", this, "SystemProperties::setDefaultAdditionsISO", aDefaultAdditionsISO));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpDefaultAdditionsISO(aDefaultAdditionsISO);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTADDITIONSISO_ENTER(this, TmpDefaultAdditionsISO.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDefaultAdditionsISO(TmpDefaultAdditionsISO.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTADDITIONSISO_RETURN(this, hrc, 0 /*normal*/,TmpDefaultAdditionsISO.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTADDITIONSISO_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTADDITIONSISO_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setDefaultAdditionsISO", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(DefaultFrontend)(BSTR *aDefaultFrontend)
{
    LogRelFlow(("{%p} %s: enter aDefaultFrontend=%p\n", this, "SystemProperties::getDefaultFrontend", aDefaultFrontend));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDefaultFrontend);
        BSTROutConverter TmpDefaultFrontend(aDefaultFrontend);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTFRONTEND_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDefaultFrontend(TmpDefaultFrontend.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTFRONTEND_RETURN(this, hrc, 0 /*normal*/,TmpDefaultFrontend.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTFRONTEND_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_DEFAULTFRONTEND_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDefaultFrontend=%ls hrc=%Rhrc\n", this, "SystemProperties::getDefaultFrontend", *aDefaultFrontend, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(DefaultFrontend)(IN_BSTR aDefaultFrontend)
{
    LogRelFlow(("{%p} %s: enter aDefaultFrontend=%ls\n", this, "SystemProperties::setDefaultFrontend", aDefaultFrontend));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpDefaultFrontend(aDefaultFrontend);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTFRONTEND_ENTER(this, TmpDefaultFrontend.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDefaultFrontend(TmpDefaultFrontend.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTFRONTEND_RETURN(this, hrc, 0 /*normal*/,TmpDefaultFrontend.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTFRONTEND_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_DEFAULTFRONTEND_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setDefaultFrontend", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(ScreenShotFormats)(ComSafeArrayOut(BitmapFormat_T, aScreenShotFormats))
{
    LogRelFlow(("{%p} %s: enter aScreenShotFormats=%p\n", this, "SystemProperties::getScreenShotFormats", aScreenShotFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aScreenShotFormats);
        ArrayOutConverter<BitmapFormat_T> TmpScreenShotFormats(ComSafeArrayOutArg(aScreenShotFormats));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SCREENSHOTFORMATS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getScreenShotFormats(TmpScreenShotFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SCREENSHOTFORMATS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpScreenShotFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SCREENSHOTFORMATS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SCREENSHOTFORMATS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aScreenShotFormats=%zu hrc=%Rhrc\n", this, "SystemProperties::getScreenShotFormats", ComSafeArraySize(*aScreenShotFormats), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(ProxyMode)(ProxyMode_T *aProxyMode)
{
    LogRelFlow(("{%p} %s: enter aProxyMode=%p\n", this, "SystemProperties::getProxyMode", aProxyMode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProxyMode);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PROXYMODE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProxyMode(aProxyMode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PROXYMODE_RETURN(this, hrc, 0 /*normal*/,*aProxyMode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PROXYMODE_RETURN(this, hrc, 1 /*hrc exception*/,*aProxyMode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PROXYMODE_RETURN(this, hrc, 9 /*unhandled exception*/,*aProxyMode);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProxyMode=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getProxyMode", *aProxyMode, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(ProxyMode)(ProxyMode_T aProxyMode)
{
    LogRelFlow(("{%p} %s: enter aProxyMode=%RU32\n", this, "SystemProperties::setProxyMode", aProxyMode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_PROXYMODE_ENTER(this, aProxyMode);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProxyMode(aProxyMode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_PROXYMODE_RETURN(this, hrc, 0 /*normal*/,aProxyMode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_PROXYMODE_RETURN(this, hrc, 1 /*hrc exception*/,aProxyMode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_PROXYMODE_RETURN(this, hrc, 9 /*unhandled exception*/,aProxyMode);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setProxyMode", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(ProxyURL)(BSTR *aProxyURL)
{
    LogRelFlow(("{%p} %s: enter aProxyURL=%p\n", this, "SystemProperties::getProxyURL", aProxyURL));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProxyURL);
        BSTROutConverter TmpProxyURL(aProxyURL);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PROXYURL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProxyURL(TmpProxyURL.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PROXYURL_RETURN(this, hrc, 0 /*normal*/,TmpProxyURL.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PROXYURL_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_PROXYURL_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProxyURL=%ls hrc=%Rhrc\n", this, "SystemProperties::getProxyURL", *aProxyURL, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMSETTER(ProxyURL)(IN_BSTR aProxyURL)
{
    LogRelFlow(("{%p} %s: enter aProxyURL=%ls\n", this, "SystemProperties::setProxyURL", aProxyURL));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpProxyURL(aProxyURL);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_PROXYURL_ENTER(this, TmpProxyURL.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProxyURL(TmpProxyURL.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_PROXYURL_RETURN(this, hrc, 0 /*normal*/,TmpProxyURL.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_PROXYURL_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_SET_PROXYURL_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SystemProperties::setProxyURL", hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedParavirtProviders)(ComSafeArrayOut(ParavirtProvider_T, aSupportedParavirtProviders))
{
    LogRelFlow(("{%p} %s: enter aSupportedParavirtProviders=%p\n", this, "SystemProperties::getSupportedParavirtProviders", aSupportedParavirtProviders));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedParavirtProviders);
        ArrayOutConverter<ParavirtProvider_T> TmpSupportedParavirtProviders(ComSafeArrayOutArg(aSupportedParavirtProviders));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPARAVIRTPROVIDERS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedParavirtProviders(TmpSupportedParavirtProviders.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPARAVIRTPROVIDERS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedParavirtProviders.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPARAVIRTPROVIDERS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPARAVIRTPROVIDERS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedParavirtProviders=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedParavirtProviders", ComSafeArraySize(*aSupportedParavirtProviders), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedClipboardModes)(ComSafeArrayOut(ClipboardMode_T, aSupportedClipboardModes))
{
    LogRelFlow(("{%p} %s: enter aSupportedClipboardModes=%p\n", this, "SystemProperties::getSupportedClipboardModes", aSupportedClipboardModes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedClipboardModes);
        ArrayOutConverter<ClipboardMode_T> TmpSupportedClipboardModes(ComSafeArrayOutArg(aSupportedClipboardModes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCLIPBOARDMODES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedClipboardModes(TmpSupportedClipboardModes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCLIPBOARDMODES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedClipboardModes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCLIPBOARDMODES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCLIPBOARDMODES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedClipboardModes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedClipboardModes", ComSafeArraySize(*aSupportedClipboardModes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedDnDModes)(ComSafeArrayOut(DnDMode_T, aSupportedDnDModes))
{
    LogRelFlow(("{%p} %s: enter aSupportedDnDModes=%p\n", this, "SystemProperties::getSupportedDnDModes", aSupportedDnDModes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedDnDModes);
        ArrayOutConverter<DnDMode_T> TmpSupportedDnDModes(ComSafeArrayOutArg(aSupportedDnDModes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDDNDMODES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedDnDModes(TmpSupportedDnDModes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDDNDMODES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedDnDModes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDDNDMODES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDDNDMODES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedDnDModes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedDnDModes", ComSafeArraySize(*aSupportedDnDModes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedFirmwareTypes)(ComSafeArrayOut(FirmwareType_T, aSupportedFirmwareTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedFirmwareTypes=%p\n", this, "SystemProperties::getSupportedFirmwareTypes", aSupportedFirmwareTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedFirmwareTypes);
        ArrayOutConverter<FirmwareType_T> TmpSupportedFirmwareTypes(ComSafeArrayOutArg(aSupportedFirmwareTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDFIRMWARETYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedFirmwareTypes(TmpSupportedFirmwareTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDFIRMWARETYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedFirmwareTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDFIRMWARETYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDFIRMWARETYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedFirmwareTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedFirmwareTypes", ComSafeArraySize(*aSupportedFirmwareTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedPointingHIDTypes)(ComSafeArrayOut(PointingHIDType_T, aSupportedPointingHIDTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedPointingHIDTypes=%p\n", this, "SystemProperties::getSupportedPointingHIDTypes", aSupportedPointingHIDTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedPointingHIDTypes);
        ArrayOutConverter<PointingHIDType_T> TmpSupportedPointingHIDTypes(ComSafeArrayOutArg(aSupportedPointingHIDTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPOINTINGHIDTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedPointingHIDTypes(TmpSupportedPointingHIDTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPOINTINGHIDTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedPointingHIDTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPOINTINGHIDTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPOINTINGHIDTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedPointingHIDTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedPointingHIDTypes", ComSafeArraySize(*aSupportedPointingHIDTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedKeyboardHIDTypes)(ComSafeArrayOut(KeyboardHIDType_T, aSupportedKeyboardHIDTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedKeyboardHIDTypes=%p\n", this, "SystemProperties::getSupportedKeyboardHIDTypes", aSupportedKeyboardHIDTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedKeyboardHIDTypes);
        ArrayOutConverter<KeyboardHIDType_T> TmpSupportedKeyboardHIDTypes(ComSafeArrayOutArg(aSupportedKeyboardHIDTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDKEYBOARDHIDTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedKeyboardHIDTypes(TmpSupportedKeyboardHIDTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDKEYBOARDHIDTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedKeyboardHIDTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDKEYBOARDHIDTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDKEYBOARDHIDTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedKeyboardHIDTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedKeyboardHIDTypes", ComSafeArraySize(*aSupportedKeyboardHIDTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedVFSTypes)(ComSafeArrayOut(VFSType_T, aSupportedVFSTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedVFSTypes=%p\n", this, "SystemProperties::getSupportedVFSTypes", aSupportedVFSTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedVFSTypes);
        ArrayOutConverter<VFSType_T> TmpSupportedVFSTypes(ComSafeArrayOutArg(aSupportedVFSTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDVFSTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedVFSTypes(TmpSupportedVFSTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDVFSTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedVFSTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDVFSTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDVFSTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedVFSTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedVFSTypes", ComSafeArraySize(*aSupportedVFSTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedImportOptions)(ComSafeArrayOut(ImportOptions_T, aSupportedImportOptions))
{
    LogRelFlow(("{%p} %s: enter aSupportedImportOptions=%p\n", this, "SystemProperties::getSupportedImportOptions", aSupportedImportOptions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedImportOptions);
        ArrayOutConverter<ImportOptions_T> TmpSupportedImportOptions(ComSafeArrayOutArg(aSupportedImportOptions));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDIMPORTOPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedImportOptions(TmpSupportedImportOptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDIMPORTOPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedImportOptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDIMPORTOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDIMPORTOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedImportOptions=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedImportOptions", ComSafeArraySize(*aSupportedImportOptions), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedExportOptions)(ComSafeArrayOut(ExportOptions_T, aSupportedExportOptions))
{
    LogRelFlow(("{%p} %s: enter aSupportedExportOptions=%p\n", this, "SystemProperties::getSupportedExportOptions", aSupportedExportOptions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedExportOptions);
        ArrayOutConverter<ExportOptions_T> TmpSupportedExportOptions(ComSafeArrayOutArg(aSupportedExportOptions));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDEXPORTOPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedExportOptions(TmpSupportedExportOptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDEXPORTOPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedExportOptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDEXPORTOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDEXPORTOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedExportOptions=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedExportOptions", ComSafeArraySize(*aSupportedExportOptions), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedRecordingAudioCodecs)(ComSafeArrayOut(RecordingAudioCodec_T, aSupportedRecordingAudioCodecs))
{
    LogRelFlow(("{%p} %s: enter aSupportedRecordingAudioCodecs=%p\n", this, "SystemProperties::getSupportedRecordingAudioCodecs", aSupportedRecordingAudioCodecs));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedRecordingAudioCodecs);
        ArrayOutConverter<RecordingAudioCodec_T> TmpSupportedRecordingAudioCodecs(ComSafeArrayOutArg(aSupportedRecordingAudioCodecs));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGAUDIOCODECS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedRecordingAudioCodecs(TmpSupportedRecordingAudioCodecs.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGAUDIOCODECS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedRecordingAudioCodecs.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGAUDIOCODECS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGAUDIOCODECS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedRecordingAudioCodecs=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedRecordingAudioCodecs", ComSafeArraySize(*aSupportedRecordingAudioCodecs), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedRecordingVideoCodecs)(ComSafeArrayOut(RecordingVideoCodec_T, aSupportedRecordingVideoCodecs))
{
    LogRelFlow(("{%p} %s: enter aSupportedRecordingVideoCodecs=%p\n", this, "SystemProperties::getSupportedRecordingVideoCodecs", aSupportedRecordingVideoCodecs));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedRecordingVideoCodecs);
        ArrayOutConverter<RecordingVideoCodec_T> TmpSupportedRecordingVideoCodecs(ComSafeArrayOutArg(aSupportedRecordingVideoCodecs));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVIDEOCODECS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedRecordingVideoCodecs(TmpSupportedRecordingVideoCodecs.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVIDEOCODECS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedRecordingVideoCodecs.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVIDEOCODECS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVIDEOCODECS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedRecordingVideoCodecs=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedRecordingVideoCodecs", ComSafeArraySize(*aSupportedRecordingVideoCodecs), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedRecordingVSMethods)(ComSafeArrayOut(RecordingVideoScalingMethod_T, aSupportedRecordingVSMethods))
{
    LogRelFlow(("{%p} %s: enter aSupportedRecordingVSMethods=%p\n", this, "SystemProperties::getSupportedRecordingVSMethods", aSupportedRecordingVSMethods));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedRecordingVSMethods);
        ArrayOutConverter<RecordingVideoScalingMethod_T> TmpSupportedRecordingVSMethods(ComSafeArrayOutArg(aSupportedRecordingVSMethods));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVSMETHODS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedRecordingVSMethods(TmpSupportedRecordingVSMethods.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVSMETHODS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedRecordingVSMethods.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVSMETHODS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVSMETHODS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedRecordingVSMethods=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedRecordingVSMethods", ComSafeArraySize(*aSupportedRecordingVSMethods), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedRecordingVRCModes)(ComSafeArrayOut(RecordingVideoRateControlMode_T, aSupportedRecordingVRCModes))
{
    LogRelFlow(("{%p} %s: enter aSupportedRecordingVRCModes=%p\n", this, "SystemProperties::getSupportedRecordingVRCModes", aSupportedRecordingVRCModes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedRecordingVRCModes);
        ArrayOutConverter<RecordingVideoRateControlMode_T> TmpSupportedRecordingVRCModes(ComSafeArrayOutArg(aSupportedRecordingVRCModes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVRCMODES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedRecordingVRCModes(TmpSupportedRecordingVRCModes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVRCMODES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedRecordingVRCModes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVRCMODES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDRECORDINGVRCMODES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedRecordingVRCModes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedRecordingVRCModes", ComSafeArraySize(*aSupportedRecordingVRCModes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedGraphicsControllerTypes)(ComSafeArrayOut(GraphicsControllerType_T, aSupportedGraphicsControllerTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedGraphicsControllerTypes=%p\n", this, "SystemProperties::getSupportedGraphicsControllerTypes", aSupportedGraphicsControllerTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedGraphicsControllerTypes);
        ArrayOutConverter<GraphicsControllerType_T> TmpSupportedGraphicsControllerTypes(ComSafeArrayOutArg(aSupportedGraphicsControllerTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDGRAPHICSCONTROLLERTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedGraphicsControllerTypes(TmpSupportedGraphicsControllerTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDGRAPHICSCONTROLLERTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedGraphicsControllerTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDGRAPHICSCONTROLLERTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDGRAPHICSCONTROLLERTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedGraphicsControllerTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedGraphicsControllerTypes", ComSafeArraySize(*aSupportedGraphicsControllerTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedCloneOptions)(ComSafeArrayOut(CloneOptions_T, aSupportedCloneOptions))
{
    LogRelFlow(("{%p} %s: enter aSupportedCloneOptions=%p\n", this, "SystemProperties::getSupportedCloneOptions", aSupportedCloneOptions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedCloneOptions);
        ArrayOutConverter<CloneOptions_T> TmpSupportedCloneOptions(ComSafeArrayOutArg(aSupportedCloneOptions));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCLONEOPTIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedCloneOptions(TmpSupportedCloneOptions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCLONEOPTIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedCloneOptions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCLONEOPTIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCLONEOPTIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedCloneOptions=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedCloneOptions", ComSafeArraySize(*aSupportedCloneOptions), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedAutostopTypes)(ComSafeArrayOut(AutostopType_T, aSupportedAutostopTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedAutostopTypes=%p\n", this, "SystemProperties::getSupportedAutostopTypes", aSupportedAutostopTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedAutostopTypes);
        ArrayOutConverter<AutostopType_T> TmpSupportedAutostopTypes(ComSafeArrayOutArg(aSupportedAutostopTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUTOSTOPTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedAutostopTypes(TmpSupportedAutostopTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUTOSTOPTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedAutostopTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUTOSTOPTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUTOSTOPTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedAutostopTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedAutostopTypes", ComSafeArraySize(*aSupportedAutostopTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedVMProcPriorities)(ComSafeArrayOut(VMProcPriority_T, aSupportedVMProcPriorities))
{
    LogRelFlow(("{%p} %s: enter aSupportedVMProcPriorities=%p\n", this, "SystemProperties::getSupportedVMProcPriorities", aSupportedVMProcPriorities));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedVMProcPriorities);
        ArrayOutConverter<VMProcPriority_T> TmpSupportedVMProcPriorities(ComSafeArrayOutArg(aSupportedVMProcPriorities));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDVMPROCPRIORITIES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedVMProcPriorities(TmpSupportedVMProcPriorities.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDVMPROCPRIORITIES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedVMProcPriorities.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDVMPROCPRIORITIES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDVMPROCPRIORITIES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedVMProcPriorities=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedVMProcPriorities", ComSafeArraySize(*aSupportedVMProcPriorities), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedNetworkAttachmentTypes)(ComSafeArrayOut(NetworkAttachmentType_T, aSupportedNetworkAttachmentTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedNetworkAttachmentTypes=%p\n", this, "SystemProperties::getSupportedNetworkAttachmentTypes", aSupportedNetworkAttachmentTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedNetworkAttachmentTypes);
        ArrayOutConverter<NetworkAttachmentType_T> TmpSupportedNetworkAttachmentTypes(ComSafeArrayOutArg(aSupportedNetworkAttachmentTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDNETWORKATTACHMENTTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedNetworkAttachmentTypes(TmpSupportedNetworkAttachmentTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDNETWORKATTACHMENTTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedNetworkAttachmentTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDNETWORKATTACHMENTTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDNETWORKATTACHMENTTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedNetworkAttachmentTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedNetworkAttachmentTypes", ComSafeArraySize(*aSupportedNetworkAttachmentTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedNetworkAdapterTypes)(ComSafeArrayOut(NetworkAdapterType_T, aSupportedNetworkAdapterTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedNetworkAdapterTypes=%p\n", this, "SystemProperties::getSupportedNetworkAdapterTypes", aSupportedNetworkAdapterTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedNetworkAdapterTypes);
        ArrayOutConverter<NetworkAdapterType_T> TmpSupportedNetworkAdapterTypes(ComSafeArrayOutArg(aSupportedNetworkAdapterTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDNETWORKADAPTERTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedNetworkAdapterTypes(TmpSupportedNetworkAdapterTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDNETWORKADAPTERTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedNetworkAdapterTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDNETWORKADAPTERTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDNETWORKADAPTERTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedNetworkAdapterTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedNetworkAdapterTypes", ComSafeArraySize(*aSupportedNetworkAdapterTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedPortModes)(ComSafeArrayOut(PortMode_T, aSupportedPortModes))
{
    LogRelFlow(("{%p} %s: enter aSupportedPortModes=%p\n", this, "SystemProperties::getSupportedPortModes", aSupportedPortModes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedPortModes);
        ArrayOutConverter<PortMode_T> TmpSupportedPortModes(ComSafeArrayOutArg(aSupportedPortModes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPORTMODES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedPortModes(TmpSupportedPortModes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPORTMODES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedPortModes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPORTMODES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDPORTMODES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedPortModes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedPortModes", ComSafeArraySize(*aSupportedPortModes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedUartTypes)(ComSafeArrayOut(UartType_T, aSupportedUartTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedUartTypes=%p\n", this, "SystemProperties::getSupportedUartTypes", aSupportedUartTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedUartTypes);
        ArrayOutConverter<UartType_T> TmpSupportedUartTypes(ComSafeArrayOutArg(aSupportedUartTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDUARTTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedUartTypes(TmpSupportedUartTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDUARTTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedUartTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDUARTTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDUARTTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedUartTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedUartTypes", ComSafeArraySize(*aSupportedUartTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedUSBControllerTypes)(ComSafeArrayOut(USBControllerType_T, aSupportedUSBControllerTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedUSBControllerTypes=%p\n", this, "SystemProperties::getSupportedUSBControllerTypes", aSupportedUSBControllerTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedUSBControllerTypes);
        ArrayOutConverter<USBControllerType_T> TmpSupportedUSBControllerTypes(ComSafeArrayOutArg(aSupportedUSBControllerTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDUSBCONTROLLERTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedUSBControllerTypes(TmpSupportedUSBControllerTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDUSBCONTROLLERTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedUSBControllerTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDUSBCONTROLLERTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDUSBCONTROLLERTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedUSBControllerTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedUSBControllerTypes", ComSafeArraySize(*aSupportedUSBControllerTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedAudioDriverTypes)(ComSafeArrayOut(AudioDriverType_T, aSupportedAudioDriverTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedAudioDriverTypes=%p\n", this, "SystemProperties::getSupportedAudioDriverTypes", aSupportedAudioDriverTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedAudioDriverTypes);
        ArrayOutConverter<AudioDriverType_T> TmpSupportedAudioDriverTypes(ComSafeArrayOutArg(aSupportedAudioDriverTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUDIODRIVERTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedAudioDriverTypes(TmpSupportedAudioDriverTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUDIODRIVERTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedAudioDriverTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUDIODRIVERTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUDIODRIVERTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedAudioDriverTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedAudioDriverTypes", ComSafeArraySize(*aSupportedAudioDriverTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedAudioControllerTypes)(ComSafeArrayOut(AudioControllerType_T, aSupportedAudioControllerTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedAudioControllerTypes=%p\n", this, "SystemProperties::getSupportedAudioControllerTypes", aSupportedAudioControllerTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedAudioControllerTypes);
        ArrayOutConverter<AudioControllerType_T> TmpSupportedAudioControllerTypes(ComSafeArrayOutArg(aSupportedAudioControllerTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUDIOCONTROLLERTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedAudioControllerTypes(TmpSupportedAudioControllerTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUDIOCONTROLLERTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedAudioControllerTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUDIOCONTROLLERTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDAUDIOCONTROLLERTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedAudioControllerTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedAudioControllerTypes", ComSafeArraySize(*aSupportedAudioControllerTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedStorageBuses)(ComSafeArrayOut(StorageBus_T, aSupportedStorageBuses))
{
    LogRelFlow(("{%p} %s: enter aSupportedStorageBuses=%p\n", this, "SystemProperties::getSupportedStorageBuses", aSupportedStorageBuses));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedStorageBuses);
        ArrayOutConverter<StorageBus_T> TmpSupportedStorageBuses(ComSafeArrayOutArg(aSupportedStorageBuses));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDSTORAGEBUSES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedStorageBuses(TmpSupportedStorageBuses.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDSTORAGEBUSES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedStorageBuses.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDSTORAGEBUSES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDSTORAGEBUSES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedStorageBuses=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedStorageBuses", ComSafeArraySize(*aSupportedStorageBuses), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedStorageControllerTypes)(ComSafeArrayOut(StorageControllerType_T, aSupportedStorageControllerTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedStorageControllerTypes=%p\n", this, "SystemProperties::getSupportedStorageControllerTypes", aSupportedStorageControllerTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedStorageControllerTypes);
        ArrayOutConverter<StorageControllerType_T> TmpSupportedStorageControllerTypes(ComSafeArrayOutArg(aSupportedStorageControllerTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDSTORAGECONTROLLERTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedStorageControllerTypes(TmpSupportedStorageControllerTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDSTORAGECONTROLLERTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedStorageControllerTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDSTORAGECONTROLLERTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDSTORAGECONTROLLERTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedStorageControllerTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedStorageControllerTypes", ComSafeArraySize(*aSupportedStorageControllerTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(SupportedChipsetTypes)(ComSafeArrayOut(ChipsetType_T, aSupportedChipsetTypes))
{
    LogRelFlow(("{%p} %s: enter aSupportedChipsetTypes=%p\n", this, "SystemProperties::getSupportedChipsetTypes", aSupportedChipsetTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupportedChipsetTypes);
        ArrayOutConverter<ChipsetType_T> TmpSupportedChipsetTypes(ComSafeArrayOutArg(aSupportedChipsetTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCHIPSETTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSupportedChipsetTypes(TmpSupportedChipsetTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCHIPSETTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSupportedChipsetTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCHIPSETTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GET_SUPPORTEDCHIPSETTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSupportedChipsetTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getSupportedChipsetTypes", ComSafeArraySize(*aSupportedChipsetTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute1ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute2ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute3ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute4ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute5ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute6ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute7ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute8ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute9ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute10ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute11ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute12ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute13ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute14ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute15ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::COMGETTER(InternalAndReservedAttribute16ISystemProperties)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// ISystemProperties methods
//

STDMETHODIMP SystemPropertiesWrap::GetMaxNetworkAdapters(ChipsetType_T aChipset,
                                                         ULONG *aMaxNetworkAdapters)
{
    LogRelFlow(("{%p} %s:enter aChipset=%RU32 aMaxNetworkAdapters=%p\n", this, "SystemProperties::getMaxNetworkAdapters", aChipset, aMaxNetworkAdapters));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxNetworkAdapters);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXNETWORKADAPTERS_ENTER(this, aChipset);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxNetworkAdapters(aChipset,
                                        aMaxNetworkAdapters);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXNETWORKADAPTERS_RETURN(this, hrc, 0 /*normal*/, aChipset, *aMaxNetworkAdapters);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXNETWORKADAPTERS_RETURN(this, hrc, 1 /*hrc exception*/, aChipset, *aMaxNetworkAdapters);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXNETWORKADAPTERS_RETURN(this, hrc, 9 /*unhandled exception*/, aChipset, *aMaxNetworkAdapters);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMaxNetworkAdapters=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMaxNetworkAdapters", *aMaxNetworkAdapters, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::GetMaxNetworkAdaptersOfType(ChipsetType_T aChipset,
                                                               NetworkAttachmentType_T aType,
                                                               ULONG *aMaxNetworkAdapters)
{
    LogRelFlow(("{%p} %s:enter aChipset=%RU32 aType=%RU32 aMaxNetworkAdapters=%p\n", this, "SystemProperties::getMaxNetworkAdaptersOfType", aChipset, aType, aMaxNetworkAdapters));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxNetworkAdapters);


        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXNETWORKADAPTERSOFTYPE_ENTER(this, aChipset, aType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxNetworkAdaptersOfType(aChipset,
                                              aType,
                                              aMaxNetworkAdapters);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXNETWORKADAPTERSOFTYPE_RETURN(this, hrc, 0 /*normal*/, aChipset, aType, *aMaxNetworkAdapters);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXNETWORKADAPTERSOFTYPE_RETURN(this, hrc, 1 /*hrc exception*/, aChipset, aType, *aMaxNetworkAdapters);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXNETWORKADAPTERSOFTYPE_RETURN(this, hrc, 9 /*unhandled exception*/, aChipset, aType, *aMaxNetworkAdapters);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMaxNetworkAdapters=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMaxNetworkAdaptersOfType", *aMaxNetworkAdapters, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::GetMaxDevicesPerPortForStorageBus(StorageBus_T aBus,
                                                                     ULONG *aMaxDevicesPerPort)
{
    LogRelFlow(("{%p} %s:enter aBus=%RU32 aMaxDevicesPerPort=%p\n", this, "SystemProperties::getMaxDevicesPerPortForStorageBus", aBus, aMaxDevicesPerPort));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxDevicesPerPort);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXDEVICESPERPORTFORSTORAGEBUS_ENTER(this, aBus);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxDevicesPerPortForStorageBus(aBus,
                                                    aMaxDevicesPerPort);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXDEVICESPERPORTFORSTORAGEBUS_RETURN(this, hrc, 0 /*normal*/, aBus, *aMaxDevicesPerPort);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXDEVICESPERPORTFORSTORAGEBUS_RETURN(this, hrc, 1 /*hrc exception*/, aBus, *aMaxDevicesPerPort);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXDEVICESPERPORTFORSTORAGEBUS_RETURN(this, hrc, 9 /*unhandled exception*/, aBus, *aMaxDevicesPerPort);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMaxDevicesPerPort=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMaxDevicesPerPortForStorageBus", *aMaxDevicesPerPort, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::GetMinPortCountForStorageBus(StorageBus_T aBus,
                                                                ULONG *aMinPortCount)
{
    LogRelFlow(("{%p} %s:enter aBus=%RU32 aMinPortCount=%p\n", this, "SystemProperties::getMinPortCountForStorageBus", aBus, aMinPortCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMinPortCount);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMINPORTCOUNTFORSTORAGEBUS_ENTER(this, aBus);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMinPortCountForStorageBus(aBus,
                                               aMinPortCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMINPORTCOUNTFORSTORAGEBUS_RETURN(this, hrc, 0 /*normal*/, aBus, *aMinPortCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMINPORTCOUNTFORSTORAGEBUS_RETURN(this, hrc, 1 /*hrc exception*/, aBus, *aMinPortCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMINPORTCOUNTFORSTORAGEBUS_RETURN(this, hrc, 9 /*unhandled exception*/, aBus, *aMinPortCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMinPortCount=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMinPortCountForStorageBus", *aMinPortCount, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::GetMaxPortCountForStorageBus(StorageBus_T aBus,
                                                                ULONG *aMaxPortCount)
{
    LogRelFlow(("{%p} %s:enter aBus=%RU32 aMaxPortCount=%p\n", this, "SystemProperties::getMaxPortCountForStorageBus", aBus, aMaxPortCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxPortCount);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXPORTCOUNTFORSTORAGEBUS_ENTER(this, aBus);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxPortCountForStorageBus(aBus,
                                               aMaxPortCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXPORTCOUNTFORSTORAGEBUS_RETURN(this, hrc, 0 /*normal*/, aBus, *aMaxPortCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXPORTCOUNTFORSTORAGEBUS_RETURN(this, hrc, 1 /*hrc exception*/, aBus, *aMaxPortCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXPORTCOUNTFORSTORAGEBUS_RETURN(this, hrc, 9 /*unhandled exception*/, aBus, *aMaxPortCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMaxPortCount=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMaxPortCountForStorageBus", *aMaxPortCount, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::GetMaxInstancesOfStorageBus(ChipsetType_T aChipset,
                                                               StorageBus_T aBus,
                                                               ULONG *aMaxInstances)
{
    LogRelFlow(("{%p} %s:enter aChipset=%RU32 aBus=%RU32 aMaxInstances=%p\n", this, "SystemProperties::getMaxInstancesOfStorageBus", aChipset, aBus, aMaxInstances));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxInstances);


        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXINSTANCESOFSTORAGEBUS_ENTER(this, aChipset, aBus);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxInstancesOfStorageBus(aChipset,
                                              aBus,
                                              aMaxInstances);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXINSTANCESOFSTORAGEBUS_RETURN(this, hrc, 0 /*normal*/, aChipset, aBus, *aMaxInstances);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXINSTANCESOFSTORAGEBUS_RETURN(this, hrc, 1 /*hrc exception*/, aChipset, aBus, *aMaxInstances);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXINSTANCESOFSTORAGEBUS_RETURN(this, hrc, 9 /*unhandled exception*/, aChipset, aBus, *aMaxInstances);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMaxInstances=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMaxInstancesOfStorageBus", *aMaxInstances, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::GetDeviceTypesForStorageBus(StorageBus_T aBus,
                                                               ComSafeArrayOut(DeviceType_T, aDeviceTypes))
{
    LogRelFlow(("{%p} %s:enter aBus=%RU32 aDeviceTypes=%p\n", this, "SystemProperties::getDeviceTypesForStorageBus", aBus, aDeviceTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDeviceTypes);


        
        ArrayOutConverter<DeviceType_T> TmpDeviceTypes(ComSafeArrayOutArg(aDeviceTypes));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETDEVICETYPESFORSTORAGEBUS_ENTER(this, aBus);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDeviceTypesForStorageBus(aBus,
                                              TmpDeviceTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETDEVICETYPESFORSTORAGEBUS_RETURN(this, hrc, 0 /*normal*/, aBus, (uint32_t)TmpDeviceTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETDEVICETYPESFORSTORAGEBUS_RETURN(this, hrc, 1 /*hrc exception*/, aBus, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETDEVICETYPESFORSTORAGEBUS_RETURN(this, hrc, 9 /*unhandled exception*/, aBus, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aDeviceTypes=%zu hrc=%Rhrc\n", this, "SystemProperties::getDeviceTypesForStorageBus", ComSafeArraySize(*aDeviceTypes), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::GetStorageBusForStorageControllerType(StorageControllerType_T aStorageControllerType,
                                                                         StorageBus_T *aStorageBus)
{
    LogRelFlow(("{%p} %s:enter aStorageControllerType=%RU32 aStorageBus=%p\n", this, "SystemProperties::getStorageBusForStorageControllerType", aStorageControllerType, aStorageBus));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aStorageBus);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGEBUSFORSTORAGECONTROLLERTYPE_ENTER(this, aStorageControllerType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getStorageBusForStorageControllerType(aStorageControllerType,
                                                        aStorageBus);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGEBUSFORSTORAGECONTROLLERTYPE_RETURN(this, hrc, 0 /*normal*/, aStorageControllerType, *aStorageBus);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGEBUSFORSTORAGECONTROLLERTYPE_RETURN(this, hrc, 1 /*hrc exception*/, aStorageControllerType, *aStorageBus);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGEBUSFORSTORAGECONTROLLERTYPE_RETURN(this, hrc, 9 /*unhandled exception*/, aStorageControllerType, *aStorageBus);
#endif
    }

    LogRelFlow(("{%p} %s: leave aStorageBus=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getStorageBusForStorageControllerType", *aStorageBus, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::GetStorageControllerTypesForStorageBus(StorageBus_T aStorageBus,
                                                                          ComSafeArrayOut(StorageControllerType_T, aStorageControllerType))
{
    LogRelFlow(("{%p} %s:enter aStorageBus=%RU32 aStorageControllerType=%p\n", this, "SystemProperties::getStorageControllerTypesForStorageBus", aStorageBus, aStorageControllerType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aStorageControllerType);


        
        ArrayOutConverter<StorageControllerType_T> TmpStorageControllerType(ComSafeArrayOutArg(aStorageControllerType));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGECONTROLLERTYPESFORSTORAGEBUS_ENTER(this, aStorageBus);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getStorageControllerTypesForStorageBus(aStorageBus,
                                                         TmpStorageControllerType.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGECONTROLLERTYPESFORSTORAGEBUS_RETURN(this, hrc, 0 /*normal*/, aStorageBus, (uint32_t)TmpStorageControllerType.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGECONTROLLERTYPESFORSTORAGEBUS_RETURN(this, hrc, 1 /*hrc exception*/, aStorageBus, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGECONTROLLERTYPESFORSTORAGEBUS_RETURN(this, hrc, 9 /*unhandled exception*/, aStorageBus, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aStorageControllerType=%zu hrc=%Rhrc\n", this, "SystemProperties::getStorageControllerTypesForStorageBus", ComSafeArraySize(*aStorageControllerType), hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::GetDefaultIoCacheSettingForStorageController(StorageControllerType_T aControllerType,
                                                                                BOOL *aEnabled)
{
    LogRelFlow(("{%p} %s:enter aControllerType=%RU32 aEnabled=%p\n", this, "SystemProperties::getDefaultIoCacheSettingForStorageController", aControllerType, aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEnabled);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETDEFAULTSTORAGECTRLCACHESETTING_ENTER(this, aControllerType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDefaultIoCacheSettingForStorageController(aControllerType,
                                                               aEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETDEFAULTSTORAGECTRLCACHESETTING_RETURN(this, hrc, 0 /*normal*/, aControllerType, *aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETDEFAULTSTORAGECTRLCACHESETTING_RETURN(this, hrc, 1 /*hrc exception*/, aControllerType, *aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETDEFAULTSTORAGECTRLCACHESETTING_RETURN(this, hrc, 9 /*unhandled exception*/, aControllerType, *aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aEnabled=%RTbool hrc=%Rhrc\n", this, "SystemProperties::getDefaultIoCacheSettingForStorageController", *aEnabled, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::GetStorageControllerHotplugCapable(StorageControllerType_T aControllerType,
                                                                      BOOL *aHotplugCapable)
{
    LogRelFlow(("{%p} %s:enter aControllerType=%RU32 aHotplugCapable=%p\n", this, "SystemProperties::getStorageControllerHotplugCapable", aControllerType, aHotplugCapable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHotplugCapable);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGECONTROLLERHOTPLUGCAPABLE_ENTER(this, aControllerType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getStorageControllerHotplugCapable(aControllerType,
                                                     aHotplugCapable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGECONTROLLERHOTPLUGCAPABLE_RETURN(this, hrc, 0 /*normal*/, aControllerType, *aHotplugCapable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGECONTROLLERHOTPLUGCAPABLE_RETURN(this, hrc, 1 /*hrc exception*/, aControllerType, *aHotplugCapable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETSTORAGECONTROLLERHOTPLUGCAPABLE_RETURN(this, hrc, 9 /*unhandled exception*/, aControllerType, *aHotplugCapable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aHotplugCapable=%RTbool hrc=%Rhrc\n", this, "SystemProperties::getStorageControllerHotplugCapable", *aHotplugCapable, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::GetMaxInstancesOfUSBControllerType(ChipsetType_T aChipset,
                                                                      USBControllerType_T aType,
                                                                      ULONG *aMaxInstances)
{
    LogRelFlow(("{%p} %s:enter aChipset=%RU32 aType=%RU32 aMaxInstances=%p\n", this, "SystemProperties::getMaxInstancesOfUSBControllerType", aChipset, aType, aMaxInstances));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxInstances);


        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXINSTANCESOFUSBCONTROLLERTYPE_ENTER(this, aChipset, aType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxInstancesOfUSBControllerType(aChipset,
                                                     aType,
                                                     aMaxInstances);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXINSTANCESOFUSBCONTROLLERTYPE_RETURN(this, hrc, 0 /*normal*/, aChipset, aType, *aMaxInstances);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXINSTANCESOFUSBCONTROLLERTYPE_RETURN(this, hrc, 1 /*hrc exception*/, aChipset, aType, *aMaxInstances);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SYSTEMPROPERTIES_GETMAXINSTANCESOFUSBCONTROLLERTYPE_RETURN(this, hrc, 9 /*unhandled exception*/, aChipset, aType, *aMaxInstances);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMaxInstances=%RU32 hrc=%Rhrc\n", this, "SystemProperties::getMaxInstancesOfUSBControllerType", *aMaxInstances, hrc));
    return hrc;
}

STDMETHODIMP SystemPropertiesWrap::InternalAndReservedMethod1ISystemProperties()
{
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::InternalAndReservedMethod2ISystemProperties()
{
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::InternalAndReservedMethod3ISystemProperties()
{
    return E_NOTIMPL;
}

STDMETHODIMP SystemPropertiesWrap::InternalAndReservedMethod4ISystemProperties()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(SystemPropertiesWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(SystemPropertiesWrap, ISystemProperties)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "SystemPropertiesWrap.cpp"


// ##### BEGINFILE "DnDBaseWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IDnDBase.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_DNDBASE

#include "DnDBaseWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(DnDBaseWrap)

//
// IDnDBase properties
//

STDMETHODIMP DnDBaseWrap::COMGETTER(Formats)(ComSafeArrayOut(BSTR, aFormats))
{
    LogRelFlow(("{%p} %s: enter aFormats=%p\n", this, "DnDBase::getFormats", aFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFormats);
        ArrayBSTROutConverter TmpFormats(ComSafeArrayOutArg(aFormats));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_GET_FORMATS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFormats(TmpFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_GET_FORMATS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_GET_FORMATS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_GET_FORMATS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFormats=%zu hrc=%Rhrc\n", this, "DnDBase::getFormats", ComSafeArraySize(*aFormats), hrc));
    return hrc;
}

STDMETHODIMP DnDBaseWrap::COMGETTER(ProtocolVersion)(ULONG *aProtocolVersion)
{
    LogRelFlow(("{%p} %s: enter aProtocolVersion=%p\n", this, "DnDBase::getProtocolVersion", aProtocolVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProtocolVersion);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_GET_PROTOCOLVERSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProtocolVersion(aProtocolVersion);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_GET_PROTOCOLVERSION_RETURN(this, hrc, 0 /*normal*/,*aProtocolVersion);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_GET_PROTOCOLVERSION_RETURN(this, hrc, 1 /*hrc exception*/,*aProtocolVersion);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_GET_PROTOCOLVERSION_RETURN(this, hrc, 9 /*unhandled exception*/,*aProtocolVersion);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProtocolVersion=%RU32 hrc=%Rhrc\n", this, "DnDBase::getProtocolVersion", *aProtocolVersion, hrc));
    return hrc;
}

STDMETHODIMP DnDBaseWrap::COMGETTER(InternalAndReservedAttribute1IDnDBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DnDBaseWrap::COMGETTER(InternalAndReservedAttribute2IDnDBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IDnDBase methods
//

STDMETHODIMP DnDBaseWrap::IsFormatSupported(IN_BSTR aFormat,
                                            BOOL *aSupported)
{
    LogRelFlow(("{%p} %s:enter aFormat=%ls aSupported=%p\n", this, "DnDBase::isFormatSupported", aFormat, aSupported));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupported);


        BSTRInConverter TmpFormat(aFormat);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_ISFORMATSUPPORTED_ENTER(this, TmpFormat.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = isFormatSupported(TmpFormat.str(),
                                    aSupported);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_ISFORMATSUPPORTED_RETURN(this, hrc, 0 /*normal*/, TmpFormat.str().c_str(), *aSupported != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_ISFORMATSUPPORTED_RETURN(this, hrc, 1 /*hrc exception*/, 0, *aSupported != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_ISFORMATSUPPORTED_RETURN(this, hrc, 9 /*unhandled exception*/, 0, *aSupported != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aSupported=%RTbool hrc=%Rhrc\n", this, "DnDBase::isFormatSupported", *aSupported, hrc));
    return hrc;
}

STDMETHODIMP DnDBaseWrap::AddFormats(ComSafeArrayIn(IN_BSTR, aFormats))
{
    LogRelFlow(("{%p} %s:enter aFormats=%zu\n", this, "DnDBase::addFormats", aFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ArrayBSTRInConverter TmpFormats(ComSafeArrayInArg(aFormats));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_ADDFORMATS_ENTER(this, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = addFormats(TmpFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_ADDFORMATS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_ADDFORMATS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_ADDFORMATS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DnDBase::addFormats", hrc));
    return hrc;
}

STDMETHODIMP DnDBaseWrap::RemoveFormats(ComSafeArrayIn(IN_BSTR, aFormats))
{
    LogRelFlow(("{%p} %s:enter aFormats=%zu\n", this, "DnDBase::removeFormats", aFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ArrayBSTRInConverter TmpFormats(ComSafeArrayInArg(aFormats));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_REMOVEFORMATS_ENTER(this, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeFormats(TmpFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_REMOVEFORMATS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_REMOVEFORMATS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DNDBASE_REMOVEFORMATS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "DnDBase::removeFormats", hrc));
    return hrc;
}

STDMETHODIMP DnDBaseWrap::InternalAndReservedMethod1IDnDBase()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(DnDBaseWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(DnDBaseWrap, IDnDBase)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "DnDBaseWrap.cpp"


// ##### BEGINFILE "GuestDnDSourceWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IGuestDnDSource.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_GUESTDNDSOURCE

#include "GuestDnDSourceWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(GuestDnDSourceWrap)

//
// IDnDBase properties
//

STDMETHODIMP GuestDnDSourceWrap::COMGETTER(Formats)(ComSafeArrayOut(BSTR, aFormats))
{
    LogRelFlow(("{%p} %s: enter aFormats=%p\n", this, "GuestDnDSource::getFormats", aFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFormats);
        ArrayBSTROutConverter TmpFormats(ComSafeArrayOutArg(aFormats));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_GET_FORMATS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFormats(TmpFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_GET_FORMATS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_GET_FORMATS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_GET_FORMATS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFormats=%zu hrc=%Rhrc\n", this, "GuestDnDSource::getFormats", ComSafeArraySize(*aFormats), hrc));
    return hrc;
}

STDMETHODIMP GuestDnDSourceWrap::COMGETTER(ProtocolVersion)(ULONG *aProtocolVersion)
{
    LogRelFlow(("{%p} %s: enter aProtocolVersion=%p\n", this, "GuestDnDSource::getProtocolVersion", aProtocolVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProtocolVersion);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_GET_PROTOCOLVERSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProtocolVersion(aProtocolVersion);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_GET_PROTOCOLVERSION_RETURN(this, hrc, 0 /*normal*/,*aProtocolVersion);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_GET_PROTOCOLVERSION_RETURN(this, hrc, 1 /*hrc exception*/,*aProtocolVersion);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_GET_PROTOCOLVERSION_RETURN(this, hrc, 9 /*unhandled exception*/,*aProtocolVersion);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProtocolVersion=%RU32 hrc=%Rhrc\n", this, "GuestDnDSource::getProtocolVersion", *aProtocolVersion, hrc));
    return hrc;
}

STDMETHODIMP GuestDnDSourceWrap::COMGETTER(InternalAndReservedAttribute1IDnDBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestDnDSourceWrap::COMGETTER(InternalAndReservedAttribute2IDnDBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IDnDSource properties
//

STDMETHODIMP GuestDnDSourceWrap::COMGETTER(InternalAndReservedAttribute1IDnDSource)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestDnDSourceWrap::COMGETTER(InternalAndReservedAttribute2IDnDSource)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IGuestDnDSource properties
//

STDMETHODIMP GuestDnDSourceWrap::COMGETTER(MidlDoesNotLikeEmptyInterfaces)(BOOL *aMidlDoesNotLikeEmptyInterfaces)
{
#if 0 /* This is a dummy attribute */
    LogRelFlow(("{%p} %s: enter aMidlDoesNotLikeEmptyInterfaces=%p\n", this, "GuestDnDSource::getMidlDoesNotLikeEmptyInterfaces", aMidlDoesNotLikeEmptyInterfaces));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMidlDoesNotLikeEmptyInterfaces);
        
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMidlDoesNotLikeEmptyInterfaces(aMidlDoesNotLikeEmptyInterfaces);
        }
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
    }

    LogRelFlow(("{%p} %s: leave *aMidlDoesNotLikeEmptyInterfaces=%RTbool hrc=%Rhrc\n", this, "GuestDnDSource::getMidlDoesNotLikeEmptyInterfaces", *aMidlDoesNotLikeEmptyInterfaces, hrc));
    return hrc;
#else  /* dummy attribute */
    NOREF(aMidlDoesNotLikeEmptyInterfaces);
    return E_FAIL;
#endif /* dummy attribute */
}


//
// IDnDBase methods
//

STDMETHODIMP GuestDnDSourceWrap::IsFormatSupported(IN_BSTR aFormat,
                                                   BOOL *aSupported)
{
    LogRelFlow(("{%p} %s:enter aFormat=%ls aSupported=%p\n", this, "GuestDnDSource::isFormatSupported", aFormat, aSupported));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupported);


        BSTRInConverter TmpFormat(aFormat);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_ISFORMATSUPPORTED_ENTER(this, TmpFormat.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = isFormatSupported(TmpFormat.str(),
                                    aSupported);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_ISFORMATSUPPORTED_RETURN(this, hrc, 0 /*normal*/, TmpFormat.str().c_str(), *aSupported != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_ISFORMATSUPPORTED_RETURN(this, hrc, 1 /*hrc exception*/, 0, *aSupported != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_ISFORMATSUPPORTED_RETURN(this, hrc, 9 /*unhandled exception*/, 0, *aSupported != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aSupported=%RTbool hrc=%Rhrc\n", this, "GuestDnDSource::isFormatSupported", *aSupported, hrc));
    return hrc;
}

STDMETHODIMP GuestDnDSourceWrap::AddFormats(ComSafeArrayIn(IN_BSTR, aFormats))
{
    LogRelFlow(("{%p} %s:enter aFormats=%zu\n", this, "GuestDnDSource::addFormats", aFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ArrayBSTRInConverter TmpFormats(ComSafeArrayInArg(aFormats));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_ADDFORMATS_ENTER(this, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = addFormats(TmpFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_ADDFORMATS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_ADDFORMATS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_ADDFORMATS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GuestDnDSource::addFormats", hrc));
    return hrc;
}

STDMETHODIMP GuestDnDSourceWrap::RemoveFormats(ComSafeArrayIn(IN_BSTR, aFormats))
{
    LogRelFlow(("{%p} %s:enter aFormats=%zu\n", this, "GuestDnDSource::removeFormats", aFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ArrayBSTRInConverter TmpFormats(ComSafeArrayInArg(aFormats));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_REMOVEFORMATS_ENTER(this, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeFormats(TmpFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_REMOVEFORMATS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_REMOVEFORMATS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_REMOVEFORMATS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GuestDnDSource::removeFormats", hrc));
    return hrc;
}

STDMETHODIMP GuestDnDSourceWrap::InternalAndReservedMethod1IDnDBase()
{
    return E_NOTIMPL;
}

//
// IDnDSource methods
//

STDMETHODIMP GuestDnDSourceWrap::DragIsPending(ULONG aScreenId,
                                               ComSafeArrayOut(BSTR, aFormats),
                                               ComSafeArrayOut(DnDAction_T, aAllowedActions),
                                               DnDAction_T *aDefaultAction)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aFormats=%p aAllowedActions=%p aDefaultAction=%p\n", this, "GuestDnDSource::dragIsPending", aScreenId, aFormats, aAllowedActions, aDefaultAction));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFormats);
        CheckComArgOutPointerValidThrow(aAllowedActions);
        CheckComArgOutPointerValidThrow(aDefaultAction);


        
        ArrayBSTROutConverter TmpFormats(ComSafeArrayOutArg(aFormats));
        ArrayOutConverter<DnDAction_T> TmpAllowedActions(ComSafeArrayOutArg(aAllowedActions));
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_DRAGISPENDING_ENTER(this, aScreenId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = dragIsPending(aScreenId,
                                TmpFormats.array(),
                                TmpAllowedActions.array(),
                                aDefaultAction);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_DRAGISPENDING_RETURN(this, hrc, 0 /*normal*/, aScreenId, (uint32_t)TmpFormats.array().size(), NULL /*for now*/, (uint32_t)TmpAllowedActions.array().size(), NULL /*for now*/, *aDefaultAction);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_DRAGISPENDING_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, 0, 0, 0, 0, *aDefaultAction);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_DRAGISPENDING_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, 0, 0, 0, 0, *aDefaultAction);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFormats=%zu *aAllowedActions=%zu aDefaultAction=%RU32 hrc=%Rhrc\n", this, "GuestDnDSource::dragIsPending", ComSafeArraySize(*aFormats), ComSafeArraySize(*aAllowedActions), *aDefaultAction, hrc));
    return hrc;
}

STDMETHODIMP GuestDnDSourceWrap::Drop(IN_BSTR aFormat,
                                      DnDAction_T aAction,
                                      IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aFormat=%ls aAction=%RU32 aProgress=%p\n", this, "GuestDnDSource::drop", aFormat, aAction, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        BSTRInConverter TmpFormat(aFormat);
        
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_DROP_ENTER(this, TmpFormat.str().c_str(), aAction);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = drop(TmpFormat.str(),
                       aAction,
                       TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_DROP_RETURN(this, hrc, 0 /*normal*/, TmpFormat.str().c_str(), aAction, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_DROP_RETURN(this, hrc, 1 /*hrc exception*/, 0, aAction, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_DROP_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aAction, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "GuestDnDSource::drop", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP GuestDnDSourceWrap::ReceiveData(ComSafeArrayOut(BYTE, aData))
{
    LogRelFlow(("{%p} %s:enter aData=%p\n", this, "GuestDnDSource::receiveData", aData));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aData);


        ArrayOutConverter<BYTE> TmpData(ComSafeArrayOutArg(aData));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_RECEIVEDATA_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = receiveData(TmpData.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_RECEIVEDATA_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpData.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_RECEIVEDATA_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDSOURCE_RECEIVEDATA_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aData=%zu hrc=%Rhrc\n", this, "GuestDnDSource::receiveData", ComSafeArraySize(*aData), hrc));
    return hrc;
}

STDMETHODIMP GuestDnDSourceWrap::InternalAndReservedMethod1IDnDSource()
{
    return E_NOTIMPL;
}

//
// IGuestDnDSource methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(GuestDnDSourceWrap)
NS_IMPL_THREADSAFE_ISUPPORTS3_CI(GuestDnDSourceWrap, IGuestDnDSource, IDnDSource, IDnDBase)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "GuestDnDSourceWrap.cpp"


// ##### BEGINFILE "GuestDnDTargetWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IGuestDnDTarget.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_GUESTDNDTARGET

#include "GuestDnDTargetWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(GuestDnDTargetWrap)

//
// IDnDBase properties
//

STDMETHODIMP GuestDnDTargetWrap::COMGETTER(Formats)(ComSafeArrayOut(BSTR, aFormats))
{
    LogRelFlow(("{%p} %s: enter aFormats=%p\n", this, "GuestDnDTarget::getFormats", aFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFormats);
        ArrayBSTROutConverter TmpFormats(ComSafeArrayOutArg(aFormats));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_GET_FORMATS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFormats(TmpFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_GET_FORMATS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_GET_FORMATS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_GET_FORMATS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFormats=%zu hrc=%Rhrc\n", this, "GuestDnDTarget::getFormats", ComSafeArraySize(*aFormats), hrc));
    return hrc;
}

STDMETHODIMP GuestDnDTargetWrap::COMGETTER(ProtocolVersion)(ULONG *aProtocolVersion)
{
    LogRelFlow(("{%p} %s: enter aProtocolVersion=%p\n", this, "GuestDnDTarget::getProtocolVersion", aProtocolVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProtocolVersion);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_GET_PROTOCOLVERSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProtocolVersion(aProtocolVersion);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_GET_PROTOCOLVERSION_RETURN(this, hrc, 0 /*normal*/,*aProtocolVersion);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_GET_PROTOCOLVERSION_RETURN(this, hrc, 1 /*hrc exception*/,*aProtocolVersion);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_GET_PROTOCOLVERSION_RETURN(this, hrc, 9 /*unhandled exception*/,*aProtocolVersion);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProtocolVersion=%RU32 hrc=%Rhrc\n", this, "GuestDnDTarget::getProtocolVersion", *aProtocolVersion, hrc));
    return hrc;
}

STDMETHODIMP GuestDnDTargetWrap::COMGETTER(InternalAndReservedAttribute1IDnDBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestDnDTargetWrap::COMGETTER(InternalAndReservedAttribute2IDnDBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IDnDTarget properties
//

STDMETHODIMP GuestDnDTargetWrap::COMGETTER(InternalAndReservedAttribute1IDnDTarget)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestDnDTargetWrap::COMGETTER(InternalAndReservedAttribute2IDnDTarget)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IGuestDnDTarget properties
//

STDMETHODIMP GuestDnDTargetWrap::COMGETTER(MidlDoesNotLikeEmptyInterfaces)(BOOL *aMidlDoesNotLikeEmptyInterfaces)
{
#if 0 /* This is a dummy attribute */
    LogRelFlow(("{%p} %s: enter aMidlDoesNotLikeEmptyInterfaces=%p\n", this, "GuestDnDTarget::getMidlDoesNotLikeEmptyInterfaces", aMidlDoesNotLikeEmptyInterfaces));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMidlDoesNotLikeEmptyInterfaces);
        
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMidlDoesNotLikeEmptyInterfaces(aMidlDoesNotLikeEmptyInterfaces);
        }
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
    }

    LogRelFlow(("{%p} %s: leave *aMidlDoesNotLikeEmptyInterfaces=%RTbool hrc=%Rhrc\n", this, "GuestDnDTarget::getMidlDoesNotLikeEmptyInterfaces", *aMidlDoesNotLikeEmptyInterfaces, hrc));
    return hrc;
#else  /* dummy attribute */
    NOREF(aMidlDoesNotLikeEmptyInterfaces);
    return E_FAIL;
#endif /* dummy attribute */
}


//
// IDnDBase methods
//

STDMETHODIMP GuestDnDTargetWrap::IsFormatSupported(IN_BSTR aFormat,
                                                   BOOL *aSupported)
{
    LogRelFlow(("{%p} %s:enter aFormat=%ls aSupported=%p\n", this, "GuestDnDTarget::isFormatSupported", aFormat, aSupported));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupported);


        BSTRInConverter TmpFormat(aFormat);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ISFORMATSUPPORTED_ENTER(this, TmpFormat.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = isFormatSupported(TmpFormat.str(),
                                    aSupported);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ISFORMATSUPPORTED_RETURN(this, hrc, 0 /*normal*/, TmpFormat.str().c_str(), *aSupported != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ISFORMATSUPPORTED_RETURN(this, hrc, 1 /*hrc exception*/, 0, *aSupported != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ISFORMATSUPPORTED_RETURN(this, hrc, 9 /*unhandled exception*/, 0, *aSupported != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aSupported=%RTbool hrc=%Rhrc\n", this, "GuestDnDTarget::isFormatSupported", *aSupported, hrc));
    return hrc;
}

STDMETHODIMP GuestDnDTargetWrap::AddFormats(ComSafeArrayIn(IN_BSTR, aFormats))
{
    LogRelFlow(("{%p} %s:enter aFormats=%zu\n", this, "GuestDnDTarget::addFormats", aFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ArrayBSTRInConverter TmpFormats(ComSafeArrayInArg(aFormats));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ADDFORMATS_ENTER(this, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = addFormats(TmpFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ADDFORMATS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ADDFORMATS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ADDFORMATS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GuestDnDTarget::addFormats", hrc));
    return hrc;
}

STDMETHODIMP GuestDnDTargetWrap::RemoveFormats(ComSafeArrayIn(IN_BSTR, aFormats))
{
    LogRelFlow(("{%p} %s:enter aFormats=%zu\n", this, "GuestDnDTarget::removeFormats", aFormats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ArrayBSTRInConverter TmpFormats(ComSafeArrayInArg(aFormats));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_REMOVEFORMATS_ENTER(this, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = removeFormats(TmpFormats.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_REMOVEFORMATS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_REMOVEFORMATS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_REMOVEFORMATS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GuestDnDTarget::removeFormats", hrc));
    return hrc;
}

STDMETHODIMP GuestDnDTargetWrap::InternalAndReservedMethod1IDnDBase()
{
    return E_NOTIMPL;
}

//
// IDnDTarget methods
//

STDMETHODIMP GuestDnDTargetWrap::Enter(ULONG aScreenId,
                                       ULONG aY,
                                       ULONG aX,
                                       DnDAction_T aDefaultAction,
                                       ComSafeArrayIn(DnDAction_T, aAllowedActions),
                                       ComSafeArrayIn(IN_BSTR, aFormats),
                                       DnDAction_T *aResultAction)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aY=%RU32 aX=%RU32 aDefaultAction=%RU32 aAllowedActions=%zu aFormats=%zu aResultAction=%p\n", this, "GuestDnDTarget::enter", aScreenId, aY, aX, aDefaultAction, aAllowedActions, aFormats, aResultAction));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResultAction);


        
        
        
        
        ArrayInConverter<DnDAction_T> TmpAllowedActions(ComSafeArrayInArg(aAllowedActions));
        ArrayBSTRInConverter TmpFormats(ComSafeArrayInArg(aFormats));
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ENTER_ENTER(this, aScreenId, aY, aX, aDefaultAction, (uint32_t)TmpAllowedActions.array().size(), NULL /*for now*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = enter(aScreenId,
                        aY,
                        aX,
                        aDefaultAction,
                        TmpAllowedActions.array(),
                        TmpFormats.array(),
                        aResultAction);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ENTER_RETURN(this, hrc, 0 /*normal*/, aScreenId, aY, aX, aDefaultAction, (uint32_t)TmpAllowedActions.array().size(), NULL /*for now*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/, *aResultAction);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ENTER_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, aY, aX, aDefaultAction, 0, 0, 0, 0, *aResultAction);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_ENTER_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, aY, aX, aDefaultAction, 0, 0, 0, 0, *aResultAction);
#endif
    }

    LogRelFlow(("{%p} %s: leave aResultAction=%RU32 hrc=%Rhrc\n", this, "GuestDnDTarget::enter", *aResultAction, hrc));
    return hrc;
}

STDMETHODIMP GuestDnDTargetWrap::Move(ULONG aScreenId,
                                      ULONG aX,
                                      ULONG aY,
                                      DnDAction_T aDefaultAction,
                                      ComSafeArrayIn(DnDAction_T, aAllowedActions),
                                      ComSafeArrayIn(IN_BSTR, aFormats),
                                      DnDAction_T *aResultAction)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aX=%RU32 aY=%RU32 aDefaultAction=%RU32 aAllowedActions=%zu aFormats=%zu aResultAction=%p\n", this, "GuestDnDTarget::move", aScreenId, aX, aY, aDefaultAction, aAllowedActions, aFormats, aResultAction));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResultAction);


        
        
        
        
        ArrayInConverter<DnDAction_T> TmpAllowedActions(ComSafeArrayInArg(aAllowedActions));
        ArrayBSTRInConverter TmpFormats(ComSafeArrayInArg(aFormats));
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_MOVE_ENTER(this, aScreenId, aX, aY, aDefaultAction, (uint32_t)TmpAllowedActions.array().size(), NULL /*for now*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = move(aScreenId,
                       aX,
                       aY,
                       aDefaultAction,
                       TmpAllowedActions.array(),
                       TmpFormats.array(),
                       aResultAction);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_MOVE_RETURN(this, hrc, 0 /*normal*/, aScreenId, aX, aY, aDefaultAction, (uint32_t)TmpAllowedActions.array().size(), NULL /*for now*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/, *aResultAction);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_MOVE_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, aX, aY, aDefaultAction, 0, 0, 0, 0, *aResultAction);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_MOVE_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, aX, aY, aDefaultAction, 0, 0, 0, 0, *aResultAction);
#endif
    }

    LogRelFlow(("{%p} %s: leave aResultAction=%RU32 hrc=%Rhrc\n", this, "GuestDnDTarget::move", *aResultAction, hrc));
    return hrc;
}

STDMETHODIMP GuestDnDTargetWrap::Leave(ULONG aScreenId)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32\n", this, "GuestDnDTarget::leave", aScreenId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_LEAVE_ENTER(this, aScreenId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = leave(aScreenId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_LEAVE_RETURN(this, hrc, 0 /*normal*/, aScreenId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_LEAVE_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_LEAVE_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GuestDnDTarget::leave", hrc));
    return hrc;
}

STDMETHODIMP GuestDnDTargetWrap::Drop(ULONG aScreenId,
                                      ULONG aX,
                                      ULONG aY,
                                      DnDAction_T aDefaultAction,
                                      ComSafeArrayIn(DnDAction_T, aAllowedActions),
                                      ComSafeArrayIn(IN_BSTR, aFormats),
                                      BSTR *aFormat,
                                      DnDAction_T *aResultAction)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aX=%RU32 aY=%RU32 aDefaultAction=%RU32 aAllowedActions=%zu aFormats=%zu aFormat=%p aResultAction=%p\n", this, "GuestDnDTarget::drop", aScreenId, aX, aY, aDefaultAction, aAllowedActions, aFormats, aFormat, aResultAction));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFormat);
        CheckComArgOutPointerValidThrow(aResultAction);


        
        
        
        
        ArrayInConverter<DnDAction_T> TmpAllowedActions(ComSafeArrayInArg(aAllowedActions));
        ArrayBSTRInConverter TmpFormats(ComSafeArrayInArg(aFormats));
        BSTROutConverter TmpFormat(aFormat);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_DROP_ENTER(this, aScreenId, aX, aY, aDefaultAction, (uint32_t)TmpAllowedActions.array().size(), NULL /*for now*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = drop(aScreenId,
                       aX,
                       aY,
                       aDefaultAction,
                       TmpAllowedActions.array(),
                       TmpFormats.array(),
                       TmpFormat.str(),
                       aResultAction);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_DROP_RETURN(this, hrc, 0 /*normal*/, aScreenId, aX, aY, aDefaultAction, (uint32_t)TmpAllowedActions.array().size(), NULL /*for now*/, (uint32_t)TmpFormats.array().size(), NULL /*for now*/, TmpFormat.str().c_str(), *aResultAction);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_DROP_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, aX, aY, aDefaultAction, 0, 0, 0, 0, 0, *aResultAction);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_DROP_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, aX, aY, aDefaultAction, 0, 0, 0, 0, 0, *aResultAction);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFormat=%ls aResultAction=%RU32 hrc=%Rhrc\n", this, "GuestDnDTarget::drop", *aFormat, *aResultAction, hrc));
    return hrc;
}

STDMETHODIMP GuestDnDTargetWrap::SendData(ULONG aScreenId,
                                          IN_BSTR aFormat,
                                          ComSafeArrayIn(BYTE, aData),
                                          IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aFormat=%ls aData=%zu aProgress=%p\n", this, "GuestDnDTarget::sendData", aScreenId, aFormat, aData, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        
        BSTRInConverter TmpFormat(aFormat);
        ArrayInConverter<BYTE> TmpData(ComSafeArrayInArg(aData));
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_SENDDATA_ENTER(this, aScreenId, TmpFormat.str().c_str(), (uint32_t)TmpData.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = sendData(aScreenId,
                           TmpFormat.str(),
                           TmpData.array(),
                           TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_SENDDATA_RETURN(this, hrc, 0 /*normal*/, aScreenId, TmpFormat.str().c_str(), (uint32_t)TmpData.array().size(), NULL /*for now*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_SENDDATA_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_SENDDATA_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "GuestDnDTarget::sendData", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP GuestDnDTargetWrap::Cancel(BOOL *aVeto)
{
    LogRelFlow(("{%p} %s:enter aVeto=%p\n", this, "GuestDnDTarget::cancel", aVeto));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVeto);


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_CANCEL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = cancel(aVeto);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_CANCEL_RETURN(this, hrc, 0 /*normal*/, *aVeto != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_CANCEL_RETURN(this, hrc, 1 /*hrc exception*/, *aVeto != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTDNDTARGET_CANCEL_RETURN(this, hrc, 9 /*unhandled exception*/, *aVeto != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aVeto=%RTbool hrc=%Rhrc\n", this, "GuestDnDTarget::cancel", *aVeto, hrc));
    return hrc;
}

STDMETHODIMP GuestDnDTargetWrap::InternalAndReservedMethod1IDnDTarget()
{
    return E_NOTIMPL;
}

//
// IGuestDnDTarget methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(GuestDnDTargetWrap)
NS_IMPL_THREADSAFE_ISUPPORTS3_CI(GuestDnDTargetWrap, IGuestDnDTarget, IDnDTarget, IDnDBase)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "GuestDnDTargetWrap.cpp"


// ##### BEGINFILE "ProcessWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IProcess.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_PROCESS

#include "ProcessWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(ProcessWrap)

//
// IProcess properties
//

STDMETHODIMP ProcessWrap::COMGETTER(Arguments)(ComSafeArrayOut(BSTR, aArguments))
{
    LogRelFlow(("{%p} %s: enter aArguments=%p\n", this, "Process::getArguments", aArguments));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aArguments);
        ArrayBSTROutConverter TmpArguments(ComSafeArrayOutArg(aArguments));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_ARGUMENTS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getArguments(TmpArguments.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_ARGUMENTS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpArguments.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_ARGUMENTS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_ARGUMENTS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aArguments=%zu hrc=%Rhrc\n", this, "Process::getArguments", ComSafeArraySize(*aArguments), hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::COMGETTER(Environment)(ComSafeArrayOut(BSTR, aEnvironment))
{
    LogRelFlow(("{%p} %s: enter aEnvironment=%p\n", this, "Process::getEnvironment", aEnvironment));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEnvironment);
        ArrayBSTROutConverter TmpEnvironment(ComSafeArrayOutArg(aEnvironment));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_ENVIRONMENT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEnvironment(TmpEnvironment.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_ENVIRONMENT_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpEnvironment.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_ENVIRONMENT_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_ENVIRONMENT_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEnvironment=%zu hrc=%Rhrc\n", this, "Process::getEnvironment", ComSafeArraySize(*aEnvironment), hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::COMGETTER(EventSource)(IEventSource **aEventSource)
{
    LogRelFlow(("{%p} %s: enter aEventSource=%p\n", this, "Process::getEventSource", aEventSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEventSource);
        ComTypeOutConverter<IEventSource> TmpEventSource(aEventSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EVENTSOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEventSource(TmpEventSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EVENTSOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpEventSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EVENTSOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EVENTSOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEventSource=%p hrc=%Rhrc\n", this, "Process::getEventSource", *aEventSource, hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::COMGETTER(ExecutablePath)(BSTR *aExecutablePath)
{
    LogRelFlow(("{%p} %s: enter aExecutablePath=%p\n", this, "Process::getExecutablePath", aExecutablePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aExecutablePath);
        BSTROutConverter TmpExecutablePath(aExecutablePath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EXECUTABLEPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getExecutablePath(TmpExecutablePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EXECUTABLEPATH_RETURN(this, hrc, 0 /*normal*/,TmpExecutablePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EXECUTABLEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EXECUTABLEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aExecutablePath=%ls hrc=%Rhrc\n", this, "Process::getExecutablePath", *aExecutablePath, hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::COMGETTER(ExitCode)(LONG *aExitCode)
{
    LogRelFlow(("{%p} %s: enter aExitCode=%p\n", this, "Process::getExitCode", aExitCode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aExitCode);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EXITCODE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getExitCode(aExitCode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EXITCODE_RETURN(this, hrc, 0 /*normal*/,*aExitCode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EXITCODE_RETURN(this, hrc, 1 /*hrc exception*/,*aExitCode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_EXITCODE_RETURN(this, hrc, 9 /*unhandled exception*/,*aExitCode);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aExitCode=%RI32 hrc=%Rhrc\n", this, "Process::getExitCode", *aExitCode, hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "Process::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "Process::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::COMGETTER(PID)(ULONG *aPID)
{
    LogRelFlow(("{%p} %s: enter aPID=%p\n", this, "Process::getPID", aPID));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPID);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_PID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPID(aPID);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_PID_RETURN(this, hrc, 0 /*normal*/,*aPID);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_PID_RETURN(this, hrc, 1 /*hrc exception*/,*aPID);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_PID_RETURN(this, hrc, 9 /*unhandled exception*/,*aPID);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPID=%RU32 hrc=%Rhrc\n", this, "Process::getPID", *aPID, hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::COMGETTER(Status)(ProcessStatus_T *aStatus)
{
    LogRelFlow(("{%p} %s: enter aStatus=%p\n", this, "Process::getStatus", aStatus));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aStatus);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_STATUS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getStatus(aStatus);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_STATUS_RETURN(this, hrc, 0 /*normal*/,*aStatus);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_STATUS_RETURN(this, hrc, 1 /*hrc exception*/,*aStatus);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_GET_STATUS_RETURN(this, hrc, 9 /*unhandled exception*/,*aStatus);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aStatus=%RU32 hrc=%Rhrc\n", this, "Process::getStatus", *aStatus, hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::COMGETTER(InternalAndReservedAttribute1IProcess)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ProcessWrap::COMGETTER(InternalAndReservedAttribute2IProcess)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ProcessWrap::COMGETTER(InternalAndReservedAttribute3IProcess)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ProcessWrap::COMGETTER(InternalAndReservedAttribute4IProcess)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ProcessWrap::COMGETTER(InternalAndReservedAttribute5IProcess)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ProcessWrap::COMGETTER(InternalAndReservedAttribute6IProcess)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ProcessWrap::COMGETTER(InternalAndReservedAttribute7IProcess)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ProcessWrap::COMGETTER(InternalAndReservedAttribute8IProcess)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IProcess methods
//

STDMETHODIMP ProcessWrap::WaitFor(ULONG aWaitFor,
                                  ULONG aTimeoutMS,
                                  ProcessWaitResult_T *aReason)
{
    LogRelFlow(("{%p} %s:enter aWaitFor=%RU32 aTimeoutMS=%RU32 aReason=%p\n", this, "Process::waitFor", aWaitFor, aTimeoutMS, aReason));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aReason);


        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WAITFOR_ENTER(this, aWaitFor, aTimeoutMS);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = waitFor(aWaitFor,
                          aTimeoutMS,
                          aReason);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WAITFOR_RETURN(this, hrc, 0 /*normal*/, aWaitFor, aTimeoutMS, *aReason);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WAITFOR_RETURN(this, hrc, 1 /*hrc exception*/, aWaitFor, aTimeoutMS, *aReason);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WAITFOR_RETURN(this, hrc, 9 /*unhandled exception*/, aWaitFor, aTimeoutMS, *aReason);
#endif
    }

    LogRelFlow(("{%p} %s: leave aReason=%RU32 hrc=%Rhrc\n", this, "Process::waitFor", *aReason, hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::WaitForArray(ComSafeArrayIn(ProcessWaitForFlag_T, aWaitFor),
                                       ULONG aTimeoutMS,
                                       ProcessWaitResult_T *aReason)
{
    LogRelFlow(("{%p} %s:enter aWaitFor=%zu aTimeoutMS=%RU32 aReason=%p\n", this, "Process::waitForArray", aWaitFor, aTimeoutMS, aReason));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aReason);


        ArrayInConverter<ProcessWaitForFlag_T> TmpWaitFor(ComSafeArrayInArg(aWaitFor));
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WAITFORARRAY_ENTER(this, (uint32_t)TmpWaitFor.array().size(), NULL /*for now*/, aTimeoutMS);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = waitForArray(TmpWaitFor.array(),
                               aTimeoutMS,
                               aReason);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WAITFORARRAY_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpWaitFor.array().size(), NULL /*for now*/, aTimeoutMS, *aReason);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WAITFORARRAY_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, aTimeoutMS, *aReason);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WAITFORARRAY_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, aTimeoutMS, *aReason);
#endif
    }

    LogRelFlow(("{%p} %s: leave aReason=%RU32 hrc=%Rhrc\n", this, "Process::waitForArray", *aReason, hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::Read(ULONG aHandle,
                               ULONG aToRead,
                               ULONG aTimeoutMS,
                               ComSafeArrayOut(BYTE, aData))
{
    LogRelFlow(("{%p} %s:enter aHandle=%RU32 aToRead=%RU32 aTimeoutMS=%RU32 aData=%p\n", this, "Process::read", aHandle, aToRead, aTimeoutMS, aData));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aData);


        
        
        
        ArrayOutConverter<BYTE> TmpData(ComSafeArrayOutArg(aData));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_READ_ENTER(this, aHandle, aToRead, aTimeoutMS);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = read(aHandle,
                       aToRead,
                       aTimeoutMS,
                       TmpData.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_READ_RETURN(this, hrc, 0 /*normal*/, aHandle, aToRead, aTimeoutMS, (uint32_t)TmpData.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_READ_RETURN(this, hrc, 1 /*hrc exception*/, aHandle, aToRead, aTimeoutMS, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_READ_RETURN(this, hrc, 9 /*unhandled exception*/, aHandle, aToRead, aTimeoutMS, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aData=%zu hrc=%Rhrc\n", this, "Process::read", ComSafeArraySize(*aData), hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::Write(ULONG aHandle,
                                ULONG aFlags,
                                ComSafeArrayIn(BYTE, aData),
                                ULONG aTimeoutMS,
                                ULONG *aWritten)
{
    LogRelFlow(("{%p} %s:enter aHandle=%RU32 aFlags=%RU32 aData=%zu aTimeoutMS=%RU32 aWritten=%p\n", this, "Process::write", aHandle, aFlags, aData, aTimeoutMS, aWritten));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWritten);


        
        
        ArrayInConverter<BYTE> TmpData(ComSafeArrayInArg(aData));
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WRITE_ENTER(this, aHandle, aFlags, (uint32_t)TmpData.array().size(), NULL /*for now*/, aTimeoutMS);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = write(aHandle,
                        aFlags,
                        TmpData.array(),
                        aTimeoutMS,
                        aWritten);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WRITE_RETURN(this, hrc, 0 /*normal*/, aHandle, aFlags, (uint32_t)TmpData.array().size(), NULL /*for now*/, aTimeoutMS, *aWritten);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WRITE_RETURN(this, hrc, 1 /*hrc exception*/, aHandle, aFlags, 0, 0, aTimeoutMS, *aWritten);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WRITE_RETURN(this, hrc, 9 /*unhandled exception*/, aHandle, aFlags, 0, 0, aTimeoutMS, *aWritten);
#endif
    }

    LogRelFlow(("{%p} %s: leave aWritten=%RU32 hrc=%Rhrc\n", this, "Process::write", *aWritten, hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::WriteArray(ULONG aHandle,
                                     ComSafeArrayIn(ProcessInputFlag_T, aFlags),
                                     ComSafeArrayIn(BYTE, aData),
                                     ULONG aTimeoutMS,
                                     ULONG *aWritten)
{
    LogRelFlow(("{%p} %s:enter aHandle=%RU32 aFlags=%zu aData=%zu aTimeoutMS=%RU32 aWritten=%p\n", this, "Process::writeArray", aHandle, aFlags, aData, aTimeoutMS, aWritten));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWritten);


        
        ArrayInConverter<ProcessInputFlag_T> TmpFlags(ComSafeArrayInArg(aFlags));
        ArrayInConverter<BYTE> TmpData(ComSafeArrayInArg(aData));
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WRITEARRAY_ENTER(this, aHandle, (uint32_t)TmpFlags.array().size(), NULL /*for now*/, (uint32_t)TmpData.array().size(), NULL /*for now*/, aTimeoutMS);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = writeArray(aHandle,
                             TmpFlags.array(),
                             TmpData.array(),
                             aTimeoutMS,
                             aWritten);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WRITEARRAY_RETURN(this, hrc, 0 /*normal*/, aHandle, (uint32_t)TmpFlags.array().size(), NULL /*for now*/, (uint32_t)TmpData.array().size(), NULL /*for now*/, aTimeoutMS, *aWritten);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WRITEARRAY_RETURN(this, hrc, 1 /*hrc exception*/, aHandle, 0, 0, 0, 0, aTimeoutMS, *aWritten);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_WRITEARRAY_RETURN(this, hrc, 9 /*unhandled exception*/, aHandle, 0, 0, 0, 0, aTimeoutMS, *aWritten);
#endif
    }

    LogRelFlow(("{%p} %s: leave aWritten=%RU32 hrc=%Rhrc\n", this, "Process::writeArray", *aWritten, hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::Terminate()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Process::terminate"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_TERMINATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = terminate();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_TERMINATE_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_TERMINATE_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROCESS_TERMINATE_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Process::terminate", hrc));
    return hrc;
}

STDMETHODIMP ProcessWrap::InternalAndReservedMethod1IProcess()
{
    return E_NOTIMPL;
}

STDMETHODIMP ProcessWrap::InternalAndReservedMethod2IProcess()
{
    return E_NOTIMPL;
}

STDMETHODIMP ProcessWrap::InternalAndReservedMethod3IProcess()
{
    return E_NOTIMPL;
}

STDMETHODIMP ProcessWrap::InternalAndReservedMethod4IProcess()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(ProcessWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ProcessWrap, IProcess)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "ProcessWrap.cpp"


// ##### BEGINFILE "DirectoryWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IDirectory.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_DIRECTORY

#include "DirectoryWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(DirectoryWrap)

//
// IDirectory properties
//

STDMETHODIMP DirectoryWrap::COMGETTER(DirectoryName)(BSTR *aDirectoryName)
{
    LogRelFlow(("{%p} %s: enter aDirectoryName=%p\n", this, "Directory::getDirectoryName", aDirectoryName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDirectoryName);
        BSTROutConverter TmpDirectoryName(aDirectoryName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_GET_DIRECTORYNAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDirectoryName(TmpDirectoryName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_GET_DIRECTORYNAME_RETURN(this, hrc, 0 /*normal*/,TmpDirectoryName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_GET_DIRECTORYNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_GET_DIRECTORYNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDirectoryName=%ls hrc=%Rhrc\n", this, "Directory::getDirectoryName", *aDirectoryName, hrc));
    return hrc;
}

STDMETHODIMP DirectoryWrap::COMGETTER(Filter)(BSTR *aFilter)
{
    LogRelFlow(("{%p} %s: enter aFilter=%p\n", this, "Directory::getFilter", aFilter));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFilter);
        BSTROutConverter TmpFilter(aFilter);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_GET_FILTER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFilter(TmpFilter.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_GET_FILTER_RETURN(this, hrc, 0 /*normal*/,TmpFilter.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_GET_FILTER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_GET_FILTER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFilter=%ls hrc=%Rhrc\n", this, "Directory::getFilter", *aFilter, hrc));
    return hrc;
}

STDMETHODIMP DirectoryWrap::COMGETTER(InternalAndReservedAttribute1IDirectory)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DirectoryWrap::COMGETTER(InternalAndReservedAttribute2IDirectory)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DirectoryWrap::COMGETTER(InternalAndReservedAttribute3IDirectory)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DirectoryWrap::COMGETTER(InternalAndReservedAttribute4IDirectory)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DirectoryWrap::COMGETTER(InternalAndReservedAttribute5IDirectory)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DirectoryWrap::COMGETTER(InternalAndReservedAttribute6IDirectory)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DirectoryWrap::COMGETTER(InternalAndReservedAttribute7IDirectory)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DirectoryWrap::COMGETTER(InternalAndReservedAttribute8IDirectory)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IDirectory methods
//

STDMETHODIMP DirectoryWrap::Close()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Directory::close"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_CLOSE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = close();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_CLOSE_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_CLOSE_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_CLOSE_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Directory::close", hrc));
    return hrc;
}

STDMETHODIMP DirectoryWrap::Read(IFsObjInfo **aObjInfo)
{
    LogRelFlow(("{%p} %s:enter aObjInfo=%p\n", this, "Directory::read", aObjInfo));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aObjInfo);


        ComTypeOutConverter<IFsObjInfo> TmpObjInfo(aObjInfo);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_READ_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = read(TmpObjInfo.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_READ_RETURN(this, hrc, 0 /*normal*/, (void *)TmpObjInfo.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_READ_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DIRECTORY_READ_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aObjInfo=%p hrc=%Rhrc\n", this, "Directory::read", *aObjInfo, hrc));
    return hrc;
}

STDMETHODIMP DirectoryWrap::InternalAndReservedMethod1IDirectory()
{
    return E_NOTIMPL;
}

STDMETHODIMP DirectoryWrap::InternalAndReservedMethod2IDirectory()
{
    return E_NOTIMPL;
}

STDMETHODIMP DirectoryWrap::InternalAndReservedMethod3IDirectory()
{
    return E_NOTIMPL;
}

STDMETHODIMP DirectoryWrap::InternalAndReservedMethod4IDirectory()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(DirectoryWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(DirectoryWrap, IDirectory)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "DirectoryWrap.cpp"


// ##### BEGINFILE "FileWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IFile.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_FILE

#include "FileWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(FileWrap)

//
// IFile properties
//

STDMETHODIMP FileWrap::COMGETTER(EventSource)(IEventSource **aEventSource)
{
    LogRelFlow(("{%p} %s: enter aEventSource=%p\n", this, "File::getEventSource", aEventSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEventSource);
        ComTypeOutConverter<IEventSource> TmpEventSource(aEventSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_EVENTSOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEventSource(TmpEventSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_EVENTSOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpEventSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_EVENTSOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_EVENTSOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEventSource=%p hrc=%Rhrc\n", this, "File::getEventSource", *aEventSource, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::COMGETTER(Id)(ULONG *aId)
{
    LogRelFlow(("{%p} %s: enter aId=%p\n", this, "File::getId", aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aId);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_ID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getId(aId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_ID_RETURN(this, hrc, 0 /*normal*/,*aId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_ID_RETURN(this, hrc, 1 /*hrc exception*/,*aId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_ID_RETURN(this, hrc, 9 /*unhandled exception*/,*aId);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aId=%RU32 hrc=%Rhrc\n", this, "File::getId", *aId, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::COMGETTER(InitialSize)(LONG64 *aInitialSize)
{
    LogRelFlow(("{%p} %s: enter aInitialSize=%p\n", this, "File::getInitialSize", aInitialSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aInitialSize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_INITIALSIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getInitialSize(aInitialSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_INITIALSIZE_RETURN(this, hrc, 0 /*normal*/,*aInitialSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_INITIALSIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aInitialSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_INITIALSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aInitialSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aInitialSize=%RI64 hrc=%Rhrc\n", this, "File::getInitialSize", *aInitialSize, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::COMGETTER(Offset)(LONG64 *aOffset)
{
    LogRelFlow(("{%p} %s: enter aOffset=%p\n", this, "File::getOffset", aOffset));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOffset);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_OFFSET_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOffset(aOffset);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_OFFSET_RETURN(this, hrc, 0 /*normal*/,*aOffset);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_OFFSET_RETURN(this, hrc, 1 /*hrc exception*/,*aOffset);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_OFFSET_RETURN(this, hrc, 9 /*unhandled exception*/,*aOffset);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOffset=%RI64 hrc=%Rhrc\n", this, "File::getOffset", *aOffset, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::COMGETTER(Status)(FileStatus_T *aStatus)
{
    LogRelFlow(("{%p} %s: enter aStatus=%p\n", this, "File::getStatus", aStatus));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aStatus);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_STATUS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getStatus(aStatus);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_STATUS_RETURN(this, hrc, 0 /*normal*/,*aStatus);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_STATUS_RETURN(this, hrc, 1 /*hrc exception*/,*aStatus);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_STATUS_RETURN(this, hrc, 9 /*unhandled exception*/,*aStatus);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aStatus=%RU32 hrc=%Rhrc\n", this, "File::getStatus", *aStatus, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::COMGETTER(Filename)(BSTR *aFilename)
{
    LogRelFlow(("{%p} %s: enter aFilename=%p\n", this, "File::getFilename", aFilename));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFilename);
        BSTROutConverter TmpFilename(aFilename);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_FILENAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFilename(TmpFilename.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_FILENAME_RETURN(this, hrc, 0 /*normal*/,TmpFilename.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_FILENAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_FILENAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFilename=%ls hrc=%Rhrc\n", this, "File::getFilename", *aFilename, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::COMGETTER(CreationMode)(ULONG *aCreationMode)
{
    LogRelFlow(("{%p} %s: enter aCreationMode=%p\n", this, "File::getCreationMode", aCreationMode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCreationMode);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_CREATIONMODE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCreationMode(aCreationMode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_CREATIONMODE_RETURN(this, hrc, 0 /*normal*/,*aCreationMode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_CREATIONMODE_RETURN(this, hrc, 1 /*hrc exception*/,*aCreationMode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_CREATIONMODE_RETURN(this, hrc, 9 /*unhandled exception*/,*aCreationMode);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCreationMode=%RU32 hrc=%Rhrc\n", this, "File::getCreationMode", *aCreationMode, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::COMGETTER(OpenAction)(FileOpenAction_T *aOpenAction)
{
    LogRelFlow(("{%p} %s: enter aOpenAction=%p\n", this, "File::getOpenAction", aOpenAction));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOpenAction);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_OPENACTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOpenAction(aOpenAction);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_OPENACTION_RETURN(this, hrc, 0 /*normal*/,*aOpenAction);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_OPENACTION_RETURN(this, hrc, 1 /*hrc exception*/,*aOpenAction);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_OPENACTION_RETURN(this, hrc, 9 /*unhandled exception*/,*aOpenAction);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOpenAction=%RU32 hrc=%Rhrc\n", this, "File::getOpenAction", *aOpenAction, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::COMGETTER(AccessMode)(FileAccessMode_T *aAccessMode)
{
    LogRelFlow(("{%p} %s: enter aAccessMode=%p\n", this, "File::getAccessMode", aAccessMode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAccessMode);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_ACCESSMODE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAccessMode(aAccessMode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_ACCESSMODE_RETURN(this, hrc, 0 /*normal*/,*aAccessMode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_ACCESSMODE_RETURN(this, hrc, 1 /*hrc exception*/,*aAccessMode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_GET_ACCESSMODE_RETURN(this, hrc, 9 /*unhandled exception*/,*aAccessMode);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAccessMode=%RU32 hrc=%Rhrc\n", this, "File::getAccessMode", *aAccessMode, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::COMGETTER(InternalAndReservedAttribute1IFile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FileWrap::COMGETTER(InternalAndReservedAttribute2IFile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FileWrap::COMGETTER(InternalAndReservedAttribute3IFile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FileWrap::COMGETTER(InternalAndReservedAttribute4IFile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FileWrap::COMGETTER(InternalAndReservedAttribute5IFile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FileWrap::COMGETTER(InternalAndReservedAttribute6IFile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FileWrap::COMGETTER(InternalAndReservedAttribute7IFile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FileWrap::COMGETTER(InternalAndReservedAttribute8IFile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IFile methods
//

STDMETHODIMP FileWrap::Close()
{
    LogRelFlow(("{%p} %s:enter\n", this, "File::close"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_CLOSE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = close();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_CLOSE_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_CLOSE_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_CLOSE_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "File::close", hrc));
    return hrc;
}

STDMETHODIMP FileWrap::QueryInfo(IFsObjInfo **aObjInfo)
{
    LogRelFlow(("{%p} %s:enter aObjInfo=%p\n", this, "File::queryInfo", aObjInfo));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aObjInfo);


        ComTypeOutConverter<IFsObjInfo> TmpObjInfo(aObjInfo);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_QUERYINFO_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = queryInfo(TmpObjInfo.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_QUERYINFO_RETURN(this, hrc, 0 /*normal*/, (void *)TmpObjInfo.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_QUERYINFO_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_QUERYINFO_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aObjInfo=%p hrc=%Rhrc\n", this, "File::queryInfo", *aObjInfo, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::QuerySize(LONG64 *aSize)
{
    LogRelFlow(("{%p} %s:enter aSize=%p\n", this, "File::querySize", aSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSize);


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_QUERYSIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = querySize(aSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_QUERYSIZE_RETURN(this, hrc, 0 /*normal*/, *aSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_QUERYSIZE_RETURN(this, hrc, 1 /*hrc exception*/, *aSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_QUERYSIZE_RETURN(this, hrc, 9 /*unhandled exception*/, *aSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave aSize=%RI64 hrc=%Rhrc\n", this, "File::querySize", *aSize, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::Read(ULONG aToRead,
                            ULONG aTimeoutMS,
                            ComSafeArrayOut(BYTE, aData))
{
    LogRelFlow(("{%p} %s:enter aToRead=%RU32 aTimeoutMS=%RU32 aData=%p\n", this, "File::read", aToRead, aTimeoutMS, aData));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aData);


        
        
        ArrayOutConverter<BYTE> TmpData(ComSafeArrayOutArg(aData));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_READ_ENTER(this, aToRead, aTimeoutMS);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = read(aToRead,
                       aTimeoutMS,
                       TmpData.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_READ_RETURN(this, hrc, 0 /*normal*/, aToRead, aTimeoutMS, (uint32_t)TmpData.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_READ_RETURN(this, hrc, 1 /*hrc exception*/, aToRead, aTimeoutMS, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_READ_RETURN(this, hrc, 9 /*unhandled exception*/, aToRead, aTimeoutMS, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aData=%zu hrc=%Rhrc\n", this, "File::read", ComSafeArraySize(*aData), hrc));
    return hrc;
}

STDMETHODIMP FileWrap::ReadAt(LONG64 aOffset,
                              ULONG aToRead,
                              ULONG aTimeoutMS,
                              ComSafeArrayOut(BYTE, aData))
{
    LogRelFlow(("{%p} %s:enter aOffset=%RI64 aToRead=%RU32 aTimeoutMS=%RU32 aData=%p\n", this, "File::readAt", aOffset, aToRead, aTimeoutMS, aData));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aData);


        
        
        
        ArrayOutConverter<BYTE> TmpData(ComSafeArrayOutArg(aData));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_READAT_ENTER(this, aOffset, aToRead, aTimeoutMS);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = readAt(aOffset,
                         aToRead,
                         aTimeoutMS,
                         TmpData.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_READAT_RETURN(this, hrc, 0 /*normal*/, aOffset, aToRead, aTimeoutMS, (uint32_t)TmpData.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_READAT_RETURN(this, hrc, 1 /*hrc exception*/, aOffset, aToRead, aTimeoutMS, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_READAT_RETURN(this, hrc, 9 /*unhandled exception*/, aOffset, aToRead, aTimeoutMS, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aData=%zu hrc=%Rhrc\n", this, "File::readAt", ComSafeArraySize(*aData), hrc));
    return hrc;
}

STDMETHODIMP FileWrap::Seek(LONG64 aOffset,
                            FileSeekOrigin_T aWhence,
                            LONG64 *aNewOffset)
{
    LogRelFlow(("{%p} %s:enter aOffset=%RI64 aWhence=%RU32 aNewOffset=%p\n", this, "File::seek", aOffset, aWhence, aNewOffset));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNewOffset);


        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SEEK_ENTER(this, aOffset, aWhence);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = seek(aOffset,
                       aWhence,
                       aNewOffset);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SEEK_RETURN(this, hrc, 0 /*normal*/, aOffset, aWhence, *aNewOffset);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SEEK_RETURN(this, hrc, 1 /*hrc exception*/, aOffset, aWhence, *aNewOffset);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SEEK_RETURN(this, hrc, 9 /*unhandled exception*/, aOffset, aWhence, *aNewOffset);
#endif
    }

    LogRelFlow(("{%p} %s: leave aNewOffset=%RI64 hrc=%Rhrc\n", this, "File::seek", *aNewOffset, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::SetACL(IN_BSTR aAcl,
                              ULONG aMode)
{
    LogRelFlow(("{%p} %s:enter aAcl=%ls aMode=%RU32\n", this, "File::setACL", aAcl, aMode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpAcl(aAcl);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SETACL_ENTER(this, TmpAcl.str().c_str(), aMode);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setACL(TmpAcl.str(),
                         aMode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SETACL_RETURN(this, hrc, 0 /*normal*/, TmpAcl.str().c_str(), aMode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SETACL_RETURN(this, hrc, 1 /*hrc exception*/, 0, aMode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SETACL_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aMode);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "File::setACL", hrc));
    return hrc;
}

STDMETHODIMP FileWrap::SetSize(LONG64 aSize)
{
    LogRelFlow(("{%p} %s:enter aSize=%RI64\n", this, "File::setSize", aSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SETSIZE_ENTER(this, aSize);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setSize(aSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SETSIZE_RETURN(this, hrc, 0 /*normal*/, aSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SETSIZE_RETURN(this, hrc, 1 /*hrc exception*/, aSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_SETSIZE_RETURN(this, hrc, 9 /*unhandled exception*/, aSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "File::setSize", hrc));
    return hrc;
}

STDMETHODIMP FileWrap::Write(ComSafeArrayIn(BYTE, aData),
                             ULONG aTimeoutMS,
                             ULONG *aWritten)
{
    LogRelFlow(("{%p} %s:enter aData=%zu aTimeoutMS=%RU32 aWritten=%p\n", this, "File::write", aData, aTimeoutMS, aWritten));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWritten);


        ArrayInConverter<BYTE> TmpData(ComSafeArrayInArg(aData));
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_WRITE_ENTER(this, (uint32_t)TmpData.array().size(), NULL /*for now*/, aTimeoutMS);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = write(TmpData.array(),
                        aTimeoutMS,
                        aWritten);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_WRITE_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpData.array().size(), NULL /*for now*/, aTimeoutMS, *aWritten);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_WRITE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, aTimeoutMS, *aWritten);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_WRITE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, aTimeoutMS, *aWritten);
#endif
    }

    LogRelFlow(("{%p} %s: leave aWritten=%RU32 hrc=%Rhrc\n", this, "File::write", *aWritten, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::WriteAt(LONG64 aOffset,
                               ComSafeArrayIn(BYTE, aData),
                               ULONG aTimeoutMS,
                               ULONG *aWritten)
{
    LogRelFlow(("{%p} %s:enter aOffset=%RI64 aData=%zu aTimeoutMS=%RU32 aWritten=%p\n", this, "File::writeAt", aOffset, aData, aTimeoutMS, aWritten));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWritten);


        
        ArrayInConverter<BYTE> TmpData(ComSafeArrayInArg(aData));
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_WRITEAT_ENTER(this, aOffset, (uint32_t)TmpData.array().size(), NULL /*for now*/, aTimeoutMS);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = writeAt(aOffset,
                          TmpData.array(),
                          aTimeoutMS,
                          aWritten);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_WRITEAT_RETURN(this, hrc, 0 /*normal*/, aOffset, (uint32_t)TmpData.array().size(), NULL /*for now*/, aTimeoutMS, *aWritten);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_WRITEAT_RETURN(this, hrc, 1 /*hrc exception*/, aOffset, 0, 0, aTimeoutMS, *aWritten);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FILE_WRITEAT_RETURN(this, hrc, 9 /*unhandled exception*/, aOffset, 0, 0, aTimeoutMS, *aWritten);
#endif
    }

    LogRelFlow(("{%p} %s: leave aWritten=%RU32 hrc=%Rhrc\n", this, "File::writeAt", *aWritten, hrc));
    return hrc;
}

STDMETHODIMP FileWrap::InternalAndReservedMethod1IFile()
{
    return E_NOTIMPL;
}

STDMETHODIMP FileWrap::InternalAndReservedMethod2IFile()
{
    return E_NOTIMPL;
}

STDMETHODIMP FileWrap::InternalAndReservedMethod3IFile()
{
    return E_NOTIMPL;
}

STDMETHODIMP FileWrap::InternalAndReservedMethod4IFile()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(FileWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(FileWrap, IFile)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "FileWrap.cpp"


// ##### BEGINFILE "FsObjInfoWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IFsObjInfo.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_FSOBJINFO

#include "FsObjInfoWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(FsObjInfoWrap)

//
// IFsObjInfo properties
//

STDMETHODIMP FsObjInfoWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "FsObjInfo::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "FsObjInfo::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(Type)(FsObjType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "FsObjInfo::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "FsObjInfo::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(FileAttributes)(BSTR *aFileAttributes)
{
    LogRelFlow(("{%p} %s: enter aFileAttributes=%p\n", this, "FsObjInfo::getFileAttributes", aFileAttributes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFileAttributes);
        BSTROutConverter TmpFileAttributes(aFileAttributes);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_FILEATTRIBUTES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFileAttributes(TmpFileAttributes.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_FILEATTRIBUTES_RETURN(this, hrc, 0 /*normal*/,TmpFileAttributes.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_FILEATTRIBUTES_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_FILEATTRIBUTES_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFileAttributes=%ls hrc=%Rhrc\n", this, "FsObjInfo::getFileAttributes", *aFileAttributes, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(ObjectSize)(LONG64 *aObjectSize)
{
    LogRelFlow(("{%p} %s: enter aObjectSize=%p\n", this, "FsObjInfo::getObjectSize", aObjectSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aObjectSize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_OBJECTSIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getObjectSize(aObjectSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_OBJECTSIZE_RETURN(this, hrc, 0 /*normal*/,*aObjectSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_OBJECTSIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aObjectSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_OBJECTSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aObjectSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aObjectSize=%RI64 hrc=%Rhrc\n", this, "FsObjInfo::getObjectSize", *aObjectSize, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(AllocatedSize)(LONG64 *aAllocatedSize)
{
    LogRelFlow(("{%p} %s: enter aAllocatedSize=%p\n", this, "FsObjInfo::getAllocatedSize", aAllocatedSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAllocatedSize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_ALLOCATEDSIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAllocatedSize(aAllocatedSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_ALLOCATEDSIZE_RETURN(this, hrc, 0 /*normal*/,*aAllocatedSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_ALLOCATEDSIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aAllocatedSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_ALLOCATEDSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aAllocatedSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAllocatedSize=%RI64 hrc=%Rhrc\n", this, "FsObjInfo::getAllocatedSize", *aAllocatedSize, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(AccessTime)(LONG64 *aAccessTime)
{
    LogRelFlow(("{%p} %s: enter aAccessTime=%p\n", this, "FsObjInfo::getAccessTime", aAccessTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAccessTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_ACCESSTIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAccessTime(aAccessTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_ACCESSTIME_RETURN(this, hrc, 0 /*normal*/,*aAccessTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_ACCESSTIME_RETURN(this, hrc, 1 /*hrc exception*/,*aAccessTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_ACCESSTIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aAccessTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAccessTime=%RI64 hrc=%Rhrc\n", this, "FsObjInfo::getAccessTime", *aAccessTime, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(BirthTime)(LONG64 *aBirthTime)
{
    LogRelFlow(("{%p} %s: enter aBirthTime=%p\n", this, "FsObjInfo::getBirthTime", aBirthTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBirthTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_BIRTHTIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBirthTime(aBirthTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_BIRTHTIME_RETURN(this, hrc, 0 /*normal*/,*aBirthTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_BIRTHTIME_RETURN(this, hrc, 1 /*hrc exception*/,*aBirthTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_BIRTHTIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aBirthTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBirthTime=%RI64 hrc=%Rhrc\n", this, "FsObjInfo::getBirthTime", *aBirthTime, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(ChangeTime)(LONG64 *aChangeTime)
{
    LogRelFlow(("{%p} %s: enter aChangeTime=%p\n", this, "FsObjInfo::getChangeTime", aChangeTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aChangeTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_CHANGETIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getChangeTime(aChangeTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_CHANGETIME_RETURN(this, hrc, 0 /*normal*/,*aChangeTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_CHANGETIME_RETURN(this, hrc, 1 /*hrc exception*/,*aChangeTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_CHANGETIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aChangeTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aChangeTime=%RI64 hrc=%Rhrc\n", this, "FsObjInfo::getChangeTime", *aChangeTime, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(ModificationTime)(LONG64 *aModificationTime)
{
    LogRelFlow(("{%p} %s: enter aModificationTime=%p\n", this, "FsObjInfo::getModificationTime", aModificationTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aModificationTime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_MODIFICATIONTIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getModificationTime(aModificationTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_MODIFICATIONTIME_RETURN(this, hrc, 0 /*normal*/,*aModificationTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_MODIFICATIONTIME_RETURN(this, hrc, 1 /*hrc exception*/,*aModificationTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_MODIFICATIONTIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aModificationTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aModificationTime=%RI64 hrc=%Rhrc\n", this, "FsObjInfo::getModificationTime", *aModificationTime, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(UID)(LONG *aUID)
{
    LogRelFlow(("{%p} %s: enter aUID=%p\n", this, "FsObjInfo::getUID", aUID));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUID);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_UID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUID(aUID);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_UID_RETURN(this, hrc, 0 /*normal*/,*aUID);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_UID_RETURN(this, hrc, 1 /*hrc exception*/,*aUID);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_UID_RETURN(this, hrc, 9 /*unhandled exception*/,*aUID);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUID=%RI32 hrc=%Rhrc\n", this, "FsObjInfo::getUID", *aUID, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(UserName)(BSTR *aUserName)
{
    LogRelFlow(("{%p} %s: enter aUserName=%p\n", this, "FsObjInfo::getUserName", aUserName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUserName);
        BSTROutConverter TmpUserName(aUserName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_USERNAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUserName(TmpUserName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_USERNAME_RETURN(this, hrc, 0 /*normal*/,TmpUserName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_USERNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_USERNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUserName=%ls hrc=%Rhrc\n", this, "FsObjInfo::getUserName", *aUserName, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(GID)(LONG *aGID)
{
    LogRelFlow(("{%p} %s: enter aGID=%p\n", this, "FsObjInfo::getGID", aGID));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGID);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGID(aGID);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GID_RETURN(this, hrc, 0 /*normal*/,*aGID);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GID_RETURN(this, hrc, 1 /*hrc exception*/,*aGID);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GID_RETURN(this, hrc, 9 /*unhandled exception*/,*aGID);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aGID=%RI32 hrc=%Rhrc\n", this, "FsObjInfo::getGID", *aGID, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(GroupName)(BSTR *aGroupName)
{
    LogRelFlow(("{%p} %s: enter aGroupName=%p\n", this, "FsObjInfo::getGroupName", aGroupName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGroupName);
        BSTROutConverter TmpGroupName(aGroupName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GROUPNAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGroupName(TmpGroupName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GROUPNAME_RETURN(this, hrc, 0 /*normal*/,TmpGroupName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GROUPNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GROUPNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aGroupName=%ls hrc=%Rhrc\n", this, "FsObjInfo::getGroupName", *aGroupName, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(NodeId)(LONG64 *aNodeId)
{
    LogRelFlow(("{%p} %s: enter aNodeId=%p\n", this, "FsObjInfo::getNodeId", aNodeId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNodeId);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NODEID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getNodeId(aNodeId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NODEID_RETURN(this, hrc, 0 /*normal*/,*aNodeId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NODEID_RETURN(this, hrc, 1 /*hrc exception*/,*aNodeId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NODEID_RETURN(this, hrc, 9 /*unhandled exception*/,*aNodeId);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNodeId=%RI64 hrc=%Rhrc\n", this, "FsObjInfo::getNodeId", *aNodeId, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(NodeIdDevice)(ULONG *aNodeIdDevice)
{
    LogRelFlow(("{%p} %s: enter aNodeIdDevice=%p\n", this, "FsObjInfo::getNodeIdDevice", aNodeIdDevice));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNodeIdDevice);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NODEIDDEVICE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getNodeIdDevice(aNodeIdDevice);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NODEIDDEVICE_RETURN(this, hrc, 0 /*normal*/,*aNodeIdDevice);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NODEIDDEVICE_RETURN(this, hrc, 1 /*hrc exception*/,*aNodeIdDevice);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_NODEIDDEVICE_RETURN(this, hrc, 9 /*unhandled exception*/,*aNodeIdDevice);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNodeIdDevice=%RU32 hrc=%Rhrc\n", this, "FsObjInfo::getNodeIdDevice", *aNodeIdDevice, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(HardLinks)(ULONG *aHardLinks)
{
    LogRelFlow(("{%p} %s: enter aHardLinks=%p\n", this, "FsObjInfo::getHardLinks", aHardLinks));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHardLinks);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_HARDLINKS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHardLinks(aHardLinks);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_HARDLINKS_RETURN(this, hrc, 0 /*normal*/,*aHardLinks);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_HARDLINKS_RETURN(this, hrc, 1 /*hrc exception*/,*aHardLinks);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_HARDLINKS_RETURN(this, hrc, 9 /*unhandled exception*/,*aHardLinks);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHardLinks=%RU32 hrc=%Rhrc\n", this, "FsObjInfo::getHardLinks", *aHardLinks, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(DeviceNumber)(ULONG *aDeviceNumber)
{
    LogRelFlow(("{%p} %s: enter aDeviceNumber=%p\n", this, "FsObjInfo::getDeviceNumber", aDeviceNumber));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDeviceNumber);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_DEVICENUMBER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDeviceNumber(aDeviceNumber);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_DEVICENUMBER_RETURN(this, hrc, 0 /*normal*/,*aDeviceNumber);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_DEVICENUMBER_RETURN(this, hrc, 1 /*hrc exception*/,*aDeviceNumber);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_DEVICENUMBER_RETURN(this, hrc, 9 /*unhandled exception*/,*aDeviceNumber);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDeviceNumber=%RU32 hrc=%Rhrc\n", this, "FsObjInfo::getDeviceNumber", *aDeviceNumber, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(GenerationId)(ULONG *aGenerationId)
{
    LogRelFlow(("{%p} %s: enter aGenerationId=%p\n", this, "FsObjInfo::getGenerationId", aGenerationId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGenerationId);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GENERATIONID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGenerationId(aGenerationId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GENERATIONID_RETURN(this, hrc, 0 /*normal*/,*aGenerationId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GENERATIONID_RETURN(this, hrc, 1 /*hrc exception*/,*aGenerationId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_GENERATIONID_RETURN(this, hrc, 9 /*unhandled exception*/,*aGenerationId);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aGenerationId=%RU32 hrc=%Rhrc\n", this, "FsObjInfo::getGenerationId", *aGenerationId, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(UserFlags)(ULONG *aUserFlags)
{
    LogRelFlow(("{%p} %s: enter aUserFlags=%p\n", this, "FsObjInfo::getUserFlags", aUserFlags));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUserFlags);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_USERFLAGS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUserFlags(aUserFlags);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_USERFLAGS_RETURN(this, hrc, 0 /*normal*/,*aUserFlags);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_USERFLAGS_RETURN(this, hrc, 1 /*hrc exception*/,*aUserFlags);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FSOBJINFO_GET_USERFLAGS_RETURN(this, hrc, 9 /*unhandled exception*/,*aUserFlags);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUserFlags=%RU32 hrc=%Rhrc\n", this, "FsObjInfo::getUserFlags", *aUserFlags, hrc));
    return hrc;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(InternalAndReservedAttribute1IFsObjInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(InternalAndReservedAttribute2IFsObjInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(InternalAndReservedAttribute3IFsObjInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(InternalAndReservedAttribute4IFsObjInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(InternalAndReservedAttribute5IFsObjInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(InternalAndReservedAttribute6IFsObjInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(InternalAndReservedAttribute7IFsObjInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FsObjInfoWrap::COMGETTER(InternalAndReservedAttribute8IFsObjInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IFsObjInfo methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(FsObjInfoWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(FsObjInfoWrap, IFsObjInfo)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "FsObjInfoWrap.cpp"


// ##### BEGINFILE "GuestWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IGuest.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_GUEST

#include "GuestWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(GuestWrap)

//
// IGuest properties
//

STDMETHODIMP GuestWrap::COMGETTER(OSTypeId)(BSTR *aOSTypeId)
{
    LogRelFlow(("{%p} %s: enter aOSTypeId=%p\n", this, "Guest::getOSTypeId", aOSTypeId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOSTypeId);
        BSTROutConverter TmpOSTypeId(aOSTypeId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_OSTYPEID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOSTypeId(TmpOSTypeId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_OSTYPEID_RETURN(this, hrc, 0 /*normal*/,TmpOSTypeId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_OSTYPEID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_OSTYPEID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOSTypeId=%ls hrc=%Rhrc\n", this, "Guest::getOSTypeId", *aOSTypeId, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMGETTER(AdditionsRunLevel)(AdditionsRunLevelType_T *aAdditionsRunLevel)
{
    LogRelFlow(("{%p} %s: enter aAdditionsRunLevel=%p\n", this, "Guest::getAdditionsRunLevel", aAdditionsRunLevel));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAdditionsRunLevel);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSRUNLEVEL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAdditionsRunLevel(aAdditionsRunLevel);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSRUNLEVEL_RETURN(this, hrc, 0 /*normal*/,*aAdditionsRunLevel);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSRUNLEVEL_RETURN(this, hrc, 1 /*hrc exception*/,*aAdditionsRunLevel);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSRUNLEVEL_RETURN(this, hrc, 9 /*unhandled exception*/,*aAdditionsRunLevel);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAdditionsRunLevel=%RU32 hrc=%Rhrc\n", this, "Guest::getAdditionsRunLevel", *aAdditionsRunLevel, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMGETTER(AdditionsVersion)(BSTR *aAdditionsVersion)
{
    LogRelFlow(("{%p} %s: enter aAdditionsVersion=%p\n", this, "Guest::getAdditionsVersion", aAdditionsVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAdditionsVersion);
        BSTROutConverter TmpAdditionsVersion(aAdditionsVersion);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSVERSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAdditionsVersion(TmpAdditionsVersion.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSVERSION_RETURN(this, hrc, 0 /*normal*/,TmpAdditionsVersion.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSVERSION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSVERSION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAdditionsVersion=%ls hrc=%Rhrc\n", this, "Guest::getAdditionsVersion", *aAdditionsVersion, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMGETTER(AdditionsRevision)(ULONG *aAdditionsRevision)
{
    LogRelFlow(("{%p} %s: enter aAdditionsRevision=%p\n", this, "Guest::getAdditionsRevision", aAdditionsRevision));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAdditionsRevision);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSREVISION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAdditionsRevision(aAdditionsRevision);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSREVISION_RETURN(this, hrc, 0 /*normal*/,*aAdditionsRevision);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSREVISION_RETURN(this, hrc, 1 /*hrc exception*/,*aAdditionsRevision);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_ADDITIONSREVISION_RETURN(this, hrc, 9 /*unhandled exception*/,*aAdditionsRevision);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAdditionsRevision=%RU32 hrc=%Rhrc\n", this, "Guest::getAdditionsRevision", *aAdditionsRevision, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMGETTER(DnDSource)(IGuestDnDSource **aDnDSource)
{
    LogRelFlow(("{%p} %s: enter aDnDSource=%p\n", this, "Guest::getDnDSource", aDnDSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDnDSource);
        ComTypeOutConverter<IGuestDnDSource> TmpDnDSource(aDnDSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_DNDSOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDnDSource(TmpDnDSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_DNDSOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpDnDSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_DNDSOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_DNDSOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDnDSource=%p hrc=%Rhrc\n", this, "Guest::getDnDSource", *aDnDSource, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMGETTER(DnDTarget)(IGuestDnDTarget **aDnDTarget)
{
    LogRelFlow(("{%p} %s: enter aDnDTarget=%p\n", this, "Guest::getDnDTarget", aDnDTarget));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDnDTarget);
        ComTypeOutConverter<IGuestDnDTarget> TmpDnDTarget(aDnDTarget);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_DNDTARGET_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDnDTarget(TmpDnDTarget.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_DNDTARGET_RETURN(this, hrc, 0 /*normal*/,(void *)TmpDnDTarget.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_DNDTARGET_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_DNDTARGET_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDnDTarget=%p hrc=%Rhrc\n", this, "Guest::getDnDTarget", *aDnDTarget, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMGETTER(EventSource)(IEventSource **aEventSource)
{
    LogRelFlow(("{%p} %s: enter aEventSource=%p\n", this, "Guest::getEventSource", aEventSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEventSource);
        ComTypeOutConverter<IEventSource> TmpEventSource(aEventSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_EVENTSOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEventSource(TmpEventSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_EVENTSOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpEventSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_EVENTSOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_EVENTSOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEventSource=%p hrc=%Rhrc\n", this, "Guest::getEventSource", *aEventSource, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMGETTER(Facilities)(ComSafeArrayOut(IAdditionsFacility *, aFacilities))
{
    LogRelFlow(("{%p} %s: enter aFacilities=%p\n", this, "Guest::getFacilities", aFacilities));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFacilities);
        ArrayComTypeOutConverter<IAdditionsFacility> TmpFacilities(ComSafeArrayOutArg(aFacilities));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_FACILITIES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFacilities(TmpFacilities.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_FACILITIES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpFacilities.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_FACILITIES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_FACILITIES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFacilities=%zu hrc=%Rhrc\n", this, "Guest::getFacilities", ComSafeArraySize(*aFacilities), hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMGETTER(Sessions)(ComSafeArrayOut(IGuestSession *, aSessions))
{
    LogRelFlow(("{%p} %s: enter aSessions=%p\n", this, "Guest::getSessions", aSessions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSessions);
        ArrayComTypeOutConverter<IGuestSession> TmpSessions(ComSafeArrayOutArg(aSessions));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_SESSIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSessions(TmpSessions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_SESSIONS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpSessions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_SESSIONS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_SESSIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSessions=%zu hrc=%Rhrc\n", this, "Guest::getSessions", ComSafeArraySize(*aSessions), hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMGETTER(MemoryBalloonSize)(ULONG *aMemoryBalloonSize)
{
    LogRelFlow(("{%p} %s: enter aMemoryBalloonSize=%p\n", this, "Guest::getMemoryBalloonSize", aMemoryBalloonSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMemoryBalloonSize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_MEMORYBALLOONSIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMemoryBalloonSize(aMemoryBalloonSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_MEMORYBALLOONSIZE_RETURN(this, hrc, 0 /*normal*/,*aMemoryBalloonSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_MEMORYBALLOONSIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aMemoryBalloonSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_MEMORYBALLOONSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aMemoryBalloonSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMemoryBalloonSize=%RU32 hrc=%Rhrc\n", this, "Guest::getMemoryBalloonSize", *aMemoryBalloonSize, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMSETTER(MemoryBalloonSize)(ULONG aMemoryBalloonSize)
{
    LogRelFlow(("{%p} %s: enter aMemoryBalloonSize=%RU32\n", this, "Guest::setMemoryBalloonSize", aMemoryBalloonSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SET_MEMORYBALLOONSIZE_ENTER(this, aMemoryBalloonSize);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMemoryBalloonSize(aMemoryBalloonSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SET_MEMORYBALLOONSIZE_RETURN(this, hrc, 0 /*normal*/,aMemoryBalloonSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SET_MEMORYBALLOONSIZE_RETURN(this, hrc, 1 /*hrc exception*/,aMemoryBalloonSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SET_MEMORYBALLOONSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,aMemoryBalloonSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Guest::setMemoryBalloonSize", hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMGETTER(StatisticsUpdateInterval)(ULONG *aStatisticsUpdateInterval)
{
    LogRelFlow(("{%p} %s: enter aStatisticsUpdateInterval=%p\n", this, "Guest::getStatisticsUpdateInterval", aStatisticsUpdateInterval));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aStatisticsUpdateInterval);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_STATISTICSUPDATEINTERVAL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getStatisticsUpdateInterval(aStatisticsUpdateInterval);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_STATISTICSUPDATEINTERVAL_RETURN(this, hrc, 0 /*normal*/,*aStatisticsUpdateInterval);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_STATISTICSUPDATEINTERVAL_RETURN(this, hrc, 1 /*hrc exception*/,*aStatisticsUpdateInterval);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GET_STATISTICSUPDATEINTERVAL_RETURN(this, hrc, 9 /*unhandled exception*/,*aStatisticsUpdateInterval);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aStatisticsUpdateInterval=%RU32 hrc=%Rhrc\n", this, "Guest::getStatisticsUpdateInterval", *aStatisticsUpdateInterval, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMSETTER(StatisticsUpdateInterval)(ULONG aStatisticsUpdateInterval)
{
    LogRelFlow(("{%p} %s: enter aStatisticsUpdateInterval=%RU32\n", this, "Guest::setStatisticsUpdateInterval", aStatisticsUpdateInterval));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SET_STATISTICSUPDATEINTERVAL_ENTER(this, aStatisticsUpdateInterval);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setStatisticsUpdateInterval(aStatisticsUpdateInterval);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SET_STATISTICSUPDATEINTERVAL_RETURN(this, hrc, 0 /*normal*/,aStatisticsUpdateInterval);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SET_STATISTICSUPDATEINTERVAL_RETURN(this, hrc, 1 /*hrc exception*/,aStatisticsUpdateInterval);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SET_STATISTICSUPDATEINTERVAL_RETURN(this, hrc, 9 /*unhandled exception*/,aStatisticsUpdateInterval);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Guest::setStatisticsUpdateInterval", hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute1IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute2IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute3IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute4IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute5IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute6IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute7IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute8IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute9IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute10IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute11IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute12IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute13IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute14IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute15IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::COMGETTER(InternalAndReservedAttribute16IGuest)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IGuest methods
//

STDMETHODIMP GuestWrap::InternalGetStatistics(ULONG *aCpuUser,
                                              ULONG *aCpuKernel,
                                              ULONG *aCpuIdle,
                                              ULONG *aMemTotal,
                                              ULONG *aMemFree,
                                              ULONG *aMemBalloon,
                                              ULONG *aMemShared,
                                              ULONG *aMemCache,
                                              ULONG *aPagedTotal,
                                              ULONG *aMemAllocTotal,
                                              ULONG *aMemFreeTotal,
                                              ULONG *aMemBalloonTotal,
                                              ULONG *aMemSharedTotal)
{
    LogRelFlow(("{%p} %s:enter aCpuUser=%p aCpuKernel=%p aCpuIdle=%p aMemTotal=%p aMemFree=%p aMemBalloon=%p aMemShared=%p aMemCache=%p aPagedTotal=%p aMemAllocTotal=%p aMemFreeTotal=%p aMemBalloonTotal=%p aMemSharedTotal=%p\n", this, "Guest::internalGetStatistics", aCpuUser, aCpuKernel, aCpuIdle, aMemTotal, aMemFree, aMemBalloon, aMemShared, aMemCache, aPagedTotal, aMemAllocTotal, aMemFreeTotal, aMemBalloonTotal, aMemSharedTotal));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCpuUser);
        CheckComArgOutPointerValidThrow(aCpuKernel);
        CheckComArgOutPointerValidThrow(aCpuIdle);
        CheckComArgOutPointerValidThrow(aMemTotal);
        CheckComArgOutPointerValidThrow(aMemFree);
        CheckComArgOutPointerValidThrow(aMemBalloon);
        CheckComArgOutPointerValidThrow(aMemShared);
        CheckComArgOutPointerValidThrow(aMemCache);
        CheckComArgOutPointerValidThrow(aPagedTotal);
        CheckComArgOutPointerValidThrow(aMemAllocTotal);
        CheckComArgOutPointerValidThrow(aMemFreeTotal);
        CheckComArgOutPointerValidThrow(aMemBalloonTotal);
        CheckComArgOutPointerValidThrow(aMemSharedTotal);


        
        
        
        
        
        
        
        
        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_INTERNALGETSTATISTICS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = internalGetStatistics(aCpuUser,
                                        aCpuKernel,
                                        aCpuIdle,
                                        aMemTotal,
                                        aMemFree,
                                        aMemBalloon,
                                        aMemShared,
                                        aMemCache,
                                        aPagedTotal,
                                        aMemAllocTotal,
                                        aMemFreeTotal,
                                        aMemBalloonTotal,
                                        aMemSharedTotal);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_INTERNALGETSTATISTICS_RETURN(this, hrc, 0 /*normal*/, *aCpuUser, *aCpuKernel, *aCpuIdle, *aMemTotal, *aMemFree, *aMemBalloon, *aMemShared, *aMemCache, *aPagedTotal, *aMemAllocTotal, *aMemFreeTotal, *aMemBalloonTotal, *aMemSharedTotal);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_INTERNALGETSTATISTICS_RETURN(this, hrc, 1 /*hrc exception*/, *aCpuUser, *aCpuKernel, *aCpuIdle, *aMemTotal, *aMemFree, *aMemBalloon, *aMemShared, *aMemCache, *aPagedTotal, *aMemAllocTotal, *aMemFreeTotal, *aMemBalloonTotal, *aMemSharedTotal);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_INTERNALGETSTATISTICS_RETURN(this, hrc, 9 /*unhandled exception*/, *aCpuUser, *aCpuKernel, *aCpuIdle, *aMemTotal, *aMemFree, *aMemBalloon, *aMemShared, *aMemCache, *aPagedTotal, *aMemAllocTotal, *aMemFreeTotal, *aMemBalloonTotal, *aMemSharedTotal);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCpuUser=%RU32 *aCpuKernel=%RU32 *aCpuIdle=%RU32 *aMemTotal=%RU32 *aMemFree=%RU32 *aMemBalloon=%RU32 *aMemShared=%RU32 *aMemCache=%RU32 *aPagedTotal=%RU32 *aMemAllocTotal=%RU32 *aMemFreeTotal=%RU32 *aMemBalloonTotal=%RU32 *aMemSharedTotal=%RU32 hrc=%Rhrc\n", this, "Guest::internalGetStatistics", *aCpuUser, *aCpuKernel, *aCpuIdle, *aMemTotal, *aMemFree, *aMemBalloon, *aMemShared, *aMemCache, *aPagedTotal, *aMemAllocTotal, *aMemFreeTotal, *aMemBalloonTotal, *aMemSharedTotal, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::GetFacilityStatus(AdditionsFacilityType_T aFacility,
                                          LONG64 *aTimestamp,
                                          AdditionsFacilityStatus_T *aStatus)
{
    LogRelFlow(("{%p} %s:enter aFacility=%RU32 aTimestamp=%p aStatus=%p\n", this, "Guest::getFacilityStatus", aFacility, aTimestamp, aStatus));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aTimestamp);
        CheckComArgOutPointerValidThrow(aStatus);


        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GETFACILITYSTATUS_ENTER(this, aFacility);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFacilityStatus(aFacility,
                                    aTimestamp,
                                    aStatus);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GETFACILITYSTATUS_RETURN(this, hrc, 0 /*normal*/, aFacility, *aTimestamp, *aStatus);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GETFACILITYSTATUS_RETURN(this, hrc, 1 /*hrc exception*/, aFacility, *aTimestamp, *aStatus);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GETFACILITYSTATUS_RETURN(this, hrc, 9 /*unhandled exception*/, aFacility, *aTimestamp, *aStatus);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aTimestamp=%RI64 aStatus=%RU32 hrc=%Rhrc\n", this, "Guest::getFacilityStatus", *aTimestamp, *aStatus, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::GetAdditionsStatus(AdditionsRunLevelType_T aLevel,
                                           BOOL *aActive)
{
    LogRelFlow(("{%p} %s:enter aLevel=%RU32 aActive=%p\n", this, "Guest::getAdditionsStatus", aLevel, aActive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aActive);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GETADDITIONSSTATUS_ENTER(this, aLevel);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAdditionsStatus(aLevel,
                                     aActive);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GETADDITIONSSTATUS_RETURN(this, hrc, 0 /*normal*/, aLevel, *aActive != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GETADDITIONSSTATUS_RETURN(this, hrc, 1 /*hrc exception*/, aLevel, *aActive != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_GETADDITIONSSTATUS_RETURN(this, hrc, 9 /*unhandled exception*/, aLevel, *aActive != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aActive=%RTbool hrc=%Rhrc\n", this, "Guest::getAdditionsStatus", *aActive, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::SetCredentials(IN_BSTR aUserName,
                                       IN_BSTR aPassword,
                                       IN_BSTR aDomain,
                                       BOOL aAllowInteractiveLogon)
{
    LogRelFlow(("{%p} %s:enter aUserName=%ls aPassword=%ls aDomain=%ls aAllowInteractiveLogon=%RTbool\n", this, "Guest::setCredentials", aUserName, aPassword, aDomain, aAllowInteractiveLogon));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpUserName(aUserName);
        BSTRInConverter TmpPassword(aPassword);
        BSTRInConverter TmpDomain(aDomain);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SETCREDENTIALS_ENTER(this, TmpUserName.str().c_str(), TmpPassword.str().c_str(), TmpDomain.str().c_str(), aAllowInteractiveLogon != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCredentials(TmpUserName.str(),
                                 TmpPassword.str(),
                                 TmpDomain.str(),
                                 aAllowInteractiveLogon != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SETCREDENTIALS_RETURN(this, hrc, 0 /*normal*/, TmpUserName.str().c_str(), TmpPassword.str().c_str(), TmpDomain.str().c_str(), aAllowInteractiveLogon != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SETCREDENTIALS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, aAllowInteractiveLogon != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_SETCREDENTIALS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, aAllowInteractiveLogon != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Guest::setCredentials", hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::CreateSession(IN_BSTR aUser,
                                      IN_BSTR aPassword,
                                      IN_BSTR aDomain,
                                      IN_BSTR aSessionName,
                                      IGuestSession **aGuestSession)
{
    LogRelFlow(("{%p} %s:enter aUser=%ls aPassword=%ls aDomain=%ls aSessionName=%ls aGuestSession=%p\n", this, "Guest::createSession", aUser, aPassword, aDomain, aSessionName, aGuestSession));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGuestSession);


        BSTRInConverter TmpUser(aUser);
        BSTRInConverter TmpPassword(aPassword);
        BSTRInConverter TmpDomain(aDomain);
        BSTRInConverter TmpSessionName(aSessionName);
        ComTypeOutConverter<IGuestSession> TmpGuestSession(aGuestSession);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_CREATESESSION_ENTER(this, TmpUser.str().c_str(), TmpPassword.str().c_str(), TmpDomain.str().c_str(), TmpSessionName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createSession(TmpUser.str(),
                                TmpPassword.str(),
                                TmpDomain.str(),
                                TmpSessionName.str(),
                                TmpGuestSession.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_CREATESESSION_RETURN(this, hrc, 0 /*normal*/, TmpUser.str().c_str(), TmpPassword.str().c_str(), TmpDomain.str().c_str(), TmpSessionName.str().c_str(), (void *)TmpGuestSession.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_CREATESESSION_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_CREATESESSION_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aGuestSession=%p hrc=%Rhrc\n", this, "Guest::createSession", *aGuestSession, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::FindSession(IN_BSTR aSessionName,
                                    ComSafeArrayOut(IGuestSession *, aSessions))
{
    LogRelFlow(("{%p} %s:enter aSessionName=%ls aSessions=%p\n", this, "Guest::findSession", aSessionName, aSessions));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSessions);


        BSTRInConverter TmpSessionName(aSessionName);
        ArrayComTypeOutConverter<IGuestSession> TmpSessions(ComSafeArrayOutArg(aSessions));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_FINDSESSION_ENTER(this, TmpSessionName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = findSession(TmpSessionName.str(),
                              TmpSessions.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_FINDSESSION_RETURN(this, hrc, 0 /*normal*/, TmpSessionName.str().c_str(), (uint32_t)TmpSessions.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_FINDSESSION_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_FINDSESSION_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aSessions=%zu hrc=%Rhrc\n", this, "Guest::findSession", ComSafeArraySize(*aSessions), hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::UpdateGuestAdditions(IN_BSTR aSource,
                                             ComSafeArrayIn(IN_BSTR, aArguments),
                                             ComSafeArrayIn(AdditionsUpdateFlag_T, aFlags),
                                             IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aSource=%ls aArguments=%zu aFlags=%zu aProgress=%p\n", this, "Guest::updateGuestAdditions", aSource, aArguments, aFlags, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        BSTRInConverter TmpSource(aSource);
        ArrayBSTRInConverter TmpArguments(ComSafeArrayInArg(aArguments));
        ArrayInConverter<AdditionsUpdateFlag_T> TmpFlags(ComSafeArrayInArg(aFlags));
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_UPDATEGUESTADDITIONS_ENTER(this, TmpSource.str().c_str(), (uint32_t)TmpArguments.array().size(), NULL /*for now*/, (uint32_t)TmpFlags.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = updateGuestAdditions(TmpSource.str(),
                                       TmpArguments.array(),
                                       TmpFlags.array(),
                                       TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_UPDATEGUESTADDITIONS_RETURN(this, hrc, 0 /*normal*/, TmpSource.str().c_str(), (uint32_t)TmpArguments.array().size(), NULL /*for now*/, (uint32_t)TmpFlags.array().size(), NULL /*for now*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_UPDATEGUESTADDITIONS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUEST_UPDATEGUESTADDITIONS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Guest::updateGuestAdditions", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP GuestWrap::InternalAndReservedMethod1IGuest()
{
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::InternalAndReservedMethod2IGuest()
{
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::InternalAndReservedMethod3IGuest()
{
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::InternalAndReservedMethod4IGuest()
{
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::InternalAndReservedMethod5IGuest()
{
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::InternalAndReservedMethod6IGuest()
{
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::InternalAndReservedMethod7IGuest()
{
    return E_NOTIMPL;
}

STDMETHODIMP GuestWrap::InternalAndReservedMethod8IGuest()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(GuestWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(GuestWrap, IGuest)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "GuestWrap.cpp"


// ##### BEGINFILE "MediumWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IMedium.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_MEDIUM

#include "MediumWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(MediumWrap)

//
// IMedium properties
//

STDMETHODIMP MediumWrap::COMGETTER(Id)(BSTR *aId)
{
    LogRelFlow(("{%p} %s: enter aId=%p\n", this, "Medium::getId", aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aId);
        UuidOutConverter TmpId(aId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_ID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getId(TmpId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_ID_RETURN(this, hrc, 0 /*normal*/,TmpId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_ID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_ID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aId=%ls hrc=%Rhrc\n", this, "Medium::getId", *aId, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(Description)(BSTR *aDescription)
{
    LogRelFlow(("{%p} %s: enter aDescription=%p\n", this, "Medium::getDescription", aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDescription);
        BSTROutConverter TmpDescription(aDescription);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_DESCRIPTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDescription(autoCaller, TmpDescription.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_DESCRIPTION_RETURN(this, hrc, 0 /*normal*/,TmpDescription.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_DESCRIPTION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_DESCRIPTION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDescription=%ls hrc=%Rhrc\n", this, "Medium::getDescription", *aDescription, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMSETTER(Description)(IN_BSTR aDescription)
{
    LogRelFlow(("{%p} %s: enter aDescription=%ls\n", this, "Medium::setDescription", aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpDescription(aDescription);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_DESCRIPTION_ENTER(this, TmpDescription.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setDescription(autoCaller, TmpDescription.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_DESCRIPTION_RETURN(this, hrc, 0 /*normal*/,TmpDescription.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_DESCRIPTION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_DESCRIPTION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Medium::setDescription", hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(State)(MediumState_T *aState)
{
    LogRelFlow(("{%p} %s: enter aState=%p\n", this, "Medium::getState", aState));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aState);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_STATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getState(aState);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_STATE_RETURN(this, hrc, 0 /*normal*/,*aState);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_STATE_RETURN(this, hrc, 1 /*hrc exception*/,*aState);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_STATE_RETURN(this, hrc, 9 /*unhandled exception*/,*aState);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aState=%RU32 hrc=%Rhrc\n", this, "Medium::getState", *aState, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(Variant)(ComSafeArrayOut(MediumVariant_T, aVariant))
{
    LogRelFlow(("{%p} %s: enter aVariant=%p\n", this, "Medium::getVariant", aVariant));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVariant);
        ArrayOutConverter<MediumVariant_T> TmpVariant(ComSafeArrayOutArg(aVariant));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_VARIANT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVariant(TmpVariant.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_VARIANT_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpVariant.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_VARIANT_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_VARIANT_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVariant=%zu hrc=%Rhrc\n", this, "Medium::getVariant", ComSafeArraySize(*aVariant), hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(Location)(BSTR *aLocation)
{
    LogRelFlow(("{%p} %s: enter aLocation=%p\n", this, "Medium::getLocation", aLocation));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLocation);
        BSTROutConverter TmpLocation(aLocation);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LOCATION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLocation(TmpLocation.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LOCATION_RETURN(this, hrc, 0 /*normal*/,TmpLocation.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LOCATION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LOCATION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLocation=%ls hrc=%Rhrc\n", this, "Medium::getLocation", *aLocation, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMSETTER(Location)(IN_BSTR aLocation)
{
    LogRelFlow(("{%p} %s: enter aLocation=%ls\n", this, "Medium::setLocation", aLocation));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpLocation(aLocation);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_LOCATION_ENTER(this, TmpLocation.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setLocation(TmpLocation.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_LOCATION_RETURN(this, hrc, 0 /*normal*/,TmpLocation.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_LOCATION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_LOCATION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Medium::setLocation", hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "Medium::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "Medium::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(DeviceType)(DeviceType_T *aDeviceType)
{
    LogRelFlow(("{%p} %s: enter aDeviceType=%p\n", this, "Medium::getDeviceType", aDeviceType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDeviceType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_DEVICETYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDeviceType(aDeviceType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_DEVICETYPE_RETURN(this, hrc, 0 /*normal*/,*aDeviceType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_DEVICETYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aDeviceType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_DEVICETYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aDeviceType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDeviceType=%RU32 hrc=%Rhrc\n", this, "Medium::getDeviceType", *aDeviceType, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(HostDrive)(BOOL *aHostDrive)
{
    LogRelFlow(("{%p} %s: enter aHostDrive=%p\n", this, "Medium::getHostDrive", aHostDrive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHostDrive);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_HOSTDRIVE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHostDrive(aHostDrive);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_HOSTDRIVE_RETURN(this, hrc, 0 /*normal*/,*aHostDrive != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_HOSTDRIVE_RETURN(this, hrc, 1 /*hrc exception*/,*aHostDrive != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_HOSTDRIVE_RETURN(this, hrc, 9 /*unhandled exception*/,*aHostDrive != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHostDrive=%RTbool hrc=%Rhrc\n", this, "Medium::getHostDrive", *aHostDrive, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(Size)(LONG64 *aSize)
{
    LogRelFlow(("{%p} %s: enter aSize=%p\n", this, "Medium::getSize", aSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_SIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSize(aSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_SIZE_RETURN(this, hrc, 0 /*normal*/,*aSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_SIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_SIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSize=%RI64 hrc=%Rhrc\n", this, "Medium::getSize", *aSize, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(Format)(BSTR *aFormat)
{
    LogRelFlow(("{%p} %s: enter aFormat=%p\n", this, "Medium::getFormat", aFormat));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFormat);
        BSTROutConverter TmpFormat(aFormat);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_FORMAT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFormat(TmpFormat.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_FORMAT_RETURN(this, hrc, 0 /*normal*/,TmpFormat.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_FORMAT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_FORMAT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFormat=%ls hrc=%Rhrc\n", this, "Medium::getFormat", *aFormat, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(MediumFormat)(IMediumFormat **aMediumFormat)
{
    LogRelFlow(("{%p} %s: enter aMediumFormat=%p\n", this, "Medium::getMediumFormat", aMediumFormat));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMediumFormat);
        ComTypeOutConverter<IMediumFormat> TmpMediumFormat(aMediumFormat);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_MEDIUMFORMAT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMediumFormat(TmpMediumFormat.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_MEDIUMFORMAT_RETURN(this, hrc, 0 /*normal*/,(void *)TmpMediumFormat.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_MEDIUMFORMAT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_MEDIUMFORMAT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMediumFormat=%p hrc=%Rhrc\n", this, "Medium::getMediumFormat", *aMediumFormat, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(Type)(MediumType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "Medium::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(autoCaller, aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "Medium::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMSETTER(Type)(MediumType_T aType)
{
    LogRelFlow(("{%p} %s: enter aType=%RU32\n", this, "Medium::setType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_TYPE_ENTER(this, aType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setType(autoCaller, aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_TYPE_RETURN(this, hrc, 0 /*normal*/,aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Medium::setType", hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(AllowedTypes)(ComSafeArrayOut(MediumType_T, aAllowedTypes))
{
    LogRelFlow(("{%p} %s: enter aAllowedTypes=%p\n", this, "Medium::getAllowedTypes", aAllowedTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAllowedTypes);
        ArrayOutConverter<MediumType_T> TmpAllowedTypes(ComSafeArrayOutArg(aAllowedTypes));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_ALLOWEDTYPES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAllowedTypes(TmpAllowedTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_ALLOWEDTYPES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpAllowedTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_ALLOWEDTYPES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_ALLOWEDTYPES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAllowedTypes=%zu hrc=%Rhrc\n", this, "Medium::getAllowedTypes", ComSafeArraySize(*aAllowedTypes), hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(Parent)(IMedium **aParent)
{
    LogRelFlow(("{%p} %s: enter aParent=%p\n", this, "Medium::getParent", aParent));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aParent);
        ComTypeOutConverter<IMedium> TmpParent(aParent);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_PARENT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getParent(autoCaller, TmpParent.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_PARENT_RETURN(this, hrc, 0 /*normal*/,(void *)TmpParent.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_PARENT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_PARENT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aParent=%p hrc=%Rhrc\n", this, "Medium::getParent", *aParent, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(Children)(ComSafeArrayOut(IMedium *, aChildren))
{
    LogRelFlow(("{%p} %s: enter aChildren=%p\n", this, "Medium::getChildren", aChildren));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aChildren);
        ArrayComTypeOutConverter<IMedium> TmpChildren(ComSafeArrayOutArg(aChildren));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_CHILDREN_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getChildren(autoCaller, TmpChildren.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_CHILDREN_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpChildren.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_CHILDREN_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_CHILDREN_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aChildren=%zu hrc=%Rhrc\n", this, "Medium::getChildren", ComSafeArraySize(*aChildren), hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(Base)(IMedium **aBase)
{
    LogRelFlow(("{%p} %s: enter aBase=%p\n", this, "Medium::getBase", aBase));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBase);
        ComTypeOutConverter<IMedium> TmpBase(aBase);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_BASE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBase(autoCaller, TmpBase.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_BASE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpBase.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_BASE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_BASE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBase=%p hrc=%Rhrc\n", this, "Medium::getBase", *aBase, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(ReadOnly)(BOOL *aReadOnly)
{
    LogRelFlow(("{%p} %s: enter aReadOnly=%p\n", this, "Medium::getReadOnly", aReadOnly));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aReadOnly);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_READONLY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getReadOnly(autoCaller, aReadOnly);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_READONLY_RETURN(this, hrc, 0 /*normal*/,*aReadOnly != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_READONLY_RETURN(this, hrc, 1 /*hrc exception*/,*aReadOnly != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_READONLY_RETURN(this, hrc, 9 /*unhandled exception*/,*aReadOnly != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aReadOnly=%RTbool hrc=%Rhrc\n", this, "Medium::getReadOnly", *aReadOnly, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(LogicalSize)(LONG64 *aLogicalSize)
{
    LogRelFlow(("{%p} %s: enter aLogicalSize=%p\n", this, "Medium::getLogicalSize", aLogicalSize));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLogicalSize);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LOGICALSIZE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLogicalSize(aLogicalSize);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LOGICALSIZE_RETURN(this, hrc, 0 /*normal*/,*aLogicalSize);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LOGICALSIZE_RETURN(this, hrc, 1 /*hrc exception*/,*aLogicalSize);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LOGICALSIZE_RETURN(this, hrc, 9 /*unhandled exception*/,*aLogicalSize);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLogicalSize=%RI64 hrc=%Rhrc\n", this, "Medium::getLogicalSize", *aLogicalSize, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(AutoReset)(BOOL *aAutoReset)
{
    LogRelFlow(("{%p} %s: enter aAutoReset=%p\n", this, "Medium::getAutoReset", aAutoReset));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAutoReset);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_AUTORESET_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAutoReset(aAutoReset);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_AUTORESET_RETURN(this, hrc, 0 /*normal*/,*aAutoReset != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_AUTORESET_RETURN(this, hrc, 1 /*hrc exception*/,*aAutoReset != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_AUTORESET_RETURN(this, hrc, 9 /*unhandled exception*/,*aAutoReset != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAutoReset=%RTbool hrc=%Rhrc\n", this, "Medium::getAutoReset", *aAutoReset, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMSETTER(AutoReset)(BOOL aAutoReset)
{
    LogRelFlow(("{%p} %s: enter aAutoReset=%RTbool\n", this, "Medium::setAutoReset", aAutoReset));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_AUTORESET_ENTER(this, aAutoReset != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAutoReset(aAutoReset != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_AUTORESET_RETURN(this, hrc, 0 /*normal*/,aAutoReset != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_AUTORESET_RETURN(this, hrc, 1 /*hrc exception*/,aAutoReset != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SET_AUTORESET_RETURN(this, hrc, 9 /*unhandled exception*/,aAutoReset != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Medium::setAutoReset", hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(LastAccessError)(BSTR *aLastAccessError)
{
    LogRelFlow(("{%p} %s: enter aLastAccessError=%p\n", this, "Medium::getLastAccessError", aLastAccessError));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLastAccessError);
        BSTROutConverter TmpLastAccessError(aLastAccessError);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LASTACCESSERROR_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLastAccessError(TmpLastAccessError.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LASTACCESSERROR_RETURN(this, hrc, 0 /*normal*/,TmpLastAccessError.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LASTACCESSERROR_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_LASTACCESSERROR_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLastAccessError=%ls hrc=%Rhrc\n", this, "Medium::getLastAccessError", *aLastAccessError, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(MachineIds)(ComSafeArrayOut(BSTR, aMachineIds))
{
    LogRelFlow(("{%p} %s: enter aMachineIds=%p\n", this, "Medium::getMachineIds", aMachineIds));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMachineIds);
        ArrayUuidOutConverter TmpMachineIds(ComSafeArrayOutArg(aMachineIds));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_MACHINEIDS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMachineIds(TmpMachineIds.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_MACHINEIDS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpMachineIds.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_MACHINEIDS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GET_MACHINEIDS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMachineIds=%zu hrc=%Rhrc\n", this, "Medium::getMachineIds", ComSafeArraySize(*aMachineIds), hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute1IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute2IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute3IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute4IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute5IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute6IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute7IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute8IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute9IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute10IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute11IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::COMGETTER(InternalAndReservedAttribute12IMedium)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IMedium methods
//

STDMETHODIMP MediumWrap::SetIds(BOOL aSetImageId,
                                IN_BSTR aImageId,
                                BOOL aSetParentId,
                                IN_BSTR aParentId)
{
    LogRelFlow(("{%p} %s:enter aSetImageId=%RTbool aImageId=%ls aSetParentId=%RTbool aParentId=%ls\n", this, "Medium::setIds", aSetImageId, aImageId, aSetParentId, aParentId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        UuidInConverter TmpImageId(aImageId);
        
        UuidInConverter TmpParentId(aParentId);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETIDS_ENTER(this, aSetImageId != FALSE, TmpImageId.uuid().toStringCurly().c_str(), aSetParentId != FALSE, TmpParentId.uuid().toStringCurly().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setIds(autoCaller,
                     aSetImageId != FALSE,
                         TmpImageId.uuid(),
                         aSetParentId != FALSE,
                         TmpParentId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETIDS_RETURN(this, hrc, 0 /*normal*/, aSetImageId != FALSE, TmpImageId.uuid().toStringCurly().c_str(), aSetParentId != FALSE, TmpParentId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETIDS_RETURN(this, hrc, 1 /*hrc exception*/, aSetImageId != FALSE, 0, aSetParentId != FALSE, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETIDS_RETURN(this, hrc, 9 /*unhandled exception*/, aSetImageId != FALSE, 0, aSetParentId != FALSE, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Medium::setIds", hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::RefreshState(MediumState_T *aState)
{
    LogRelFlow(("{%p} %s:enter aState=%p\n", this, "Medium::refreshState", aState));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aState);


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_REFRESHSTATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = refreshState(autoCaller,
                           aState);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_REFRESHSTATE_RETURN(this, hrc, 0 /*normal*/, *aState);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_REFRESHSTATE_RETURN(this, hrc, 1 /*hrc exception*/, *aState);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_REFRESHSTATE_RETURN(this, hrc, 9 /*unhandled exception*/, *aState);
#endif
    }

    LogRelFlow(("{%p} %s: leave aState=%RU32 hrc=%Rhrc\n", this, "Medium::refreshState", *aState, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::GetSnapshotIds(IN_BSTR aMachineId,
                                        ComSafeArrayOut(BSTR, aSnapshotIds))
{
    LogRelFlow(("{%p} %s:enter aMachineId=%ls aSnapshotIds=%p\n", this, "Medium::getSnapshotIds", aMachineId, aSnapshotIds));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSnapshotIds);


        UuidInConverter TmpMachineId(aMachineId);
        ArrayUuidOutConverter TmpSnapshotIds(ComSafeArrayOutArg(aSnapshotIds));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETSNAPSHOTIDS_ENTER(this, TmpMachineId.uuid().toStringCurly().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSnapshotIds(TmpMachineId.uuid(),
                                 TmpSnapshotIds.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETSNAPSHOTIDS_RETURN(this, hrc, 0 /*normal*/, TmpMachineId.uuid().toStringCurly().c_str(), (uint32_t)TmpSnapshotIds.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETSNAPSHOTIDS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETSNAPSHOTIDS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aSnapshotIds=%zu hrc=%Rhrc\n", this, "Medium::getSnapshotIds", ComSafeArraySize(*aSnapshotIds), hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::LockRead(IToken **aToken)
{
    LogRelFlow(("{%p} %s:enter aToken=%p\n", this, "Medium::lockRead", aToken));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aToken);


        ComTypeOutConverter<IToken> TmpToken(aToken);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_LOCKREAD_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = lockRead(TmpToken.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_LOCKREAD_RETURN(this, hrc, 0 /*normal*/, (void *)TmpToken.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_LOCKREAD_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_LOCKREAD_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aToken=%p hrc=%Rhrc\n", this, "Medium::lockRead", *aToken, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::LockWrite(IToken **aToken)
{
    LogRelFlow(("{%p} %s:enter aToken=%p\n", this, "Medium::lockWrite", aToken));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aToken);


        ComTypeOutConverter<IToken> TmpToken(aToken);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_LOCKWRITE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = lockWrite(TmpToken.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_LOCKWRITE_RETURN(this, hrc, 0 /*normal*/, (void *)TmpToken.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_LOCKWRITE_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_LOCKWRITE_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aToken=%p hrc=%Rhrc\n", this, "Medium::lockWrite", *aToken, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::Close()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Medium::close"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLOSE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = close(autoCaller);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLOSE_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLOSE_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLOSE_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Medium::close", hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::GetProperty(IN_BSTR aName,
                                     BSTR *aValue)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aValue=%p\n", this, "Medium::getProperty", aName, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);


        BSTRInConverter TmpName(aName);
        BSTROutConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETPROPERTY_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProperty(TmpName.str(),
                              TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETPROPERTY_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aValue=%ls hrc=%Rhrc\n", this, "Medium::getProperty", *aValue, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::SetProperty(IN_BSTR aName,
                                     IN_BSTR aValue)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aValue=%ls\n", this, "Medium::setProperty", aName, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        BSTRInConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETPROPERTY_ENTER(this, TmpName.str().c_str(), TmpValue.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProperty(TmpName.str(),
                              TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETPROPERTY_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Medium::setProperty", hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::GetProperties(IN_BSTR aNames,
                                       ComSafeArrayOut(BSTR, aReturnNames),
                                       ComSafeArrayOut(BSTR, aReturnValues))
{
    LogRelFlow(("{%p} %s:enter aNames=%ls aReturnNames=%p aReturnValues=%p\n", this, "Medium::getProperties", aNames, aReturnNames, aReturnValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aReturnNames);
        CheckComArgOutPointerValidThrow(aReturnValues);


        BSTRInConverter TmpNames(aNames);
        ArrayBSTROutConverter TmpReturnNames(ComSafeArrayOutArg(aReturnNames));
        ArrayBSTROutConverter TmpReturnValues(ComSafeArrayOutArg(aReturnValues));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETPROPERTIES_ENTER(this, TmpNames.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProperties(TmpNames.str(),
                                TmpReturnNames.array(),
                                TmpReturnValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETPROPERTIES_RETURN(this, hrc, 0 /*normal*/, TmpNames.str().c_str(), (uint32_t)TmpReturnNames.array().size(), NULL /*for now*/, (uint32_t)TmpReturnValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETPROPERTIES_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETPROPERTIES_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aReturnNames=%zu aReturnValues=%zu hrc=%Rhrc\n", this, "Medium::getProperties", ComSafeArraySize(*aReturnNames), ComSafeArraySize(*aReturnValues), hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::SetProperties(ComSafeArrayIn(IN_BSTR, aNames),
                                       ComSafeArrayIn(IN_BSTR, aValues))
{
    LogRelFlow(("{%p} %s:enter aNames=%zu aValues=%zu\n", this, "Medium::setProperties", aNames, aValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ArrayBSTRInConverter TmpNames(ComSafeArrayInArg(aNames));
        ArrayBSTRInConverter TmpValues(ComSafeArrayInArg(aValues));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETPROPERTIES_ENTER(this, (uint32_t)TmpNames.array().size(), NULL /*for now*/, (uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProperties(TmpNames.array(),
                                TmpValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETPROPERTIES_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpNames.array().size(), NULL /*for now*/, (uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETPROPERTIES_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_SETPROPERTIES_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Medium::setProperties", hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::CreateBaseStorage(LONG64 aLogicalSize,
                                           ComSafeArrayIn(MediumVariant_T, aVariant),
                                           IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aLogicalSize=%RI64 aVariant=%zu aProgress=%p\n", this, "Medium::createBaseStorage", aLogicalSize, aVariant, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        
        ArrayInConverter<MediumVariant_T> TmpVariant(ComSafeArrayInArg(aVariant));
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CREATEBASESTORAGE_ENTER(this, aLogicalSize, (uint32_t)TmpVariant.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createBaseStorage(aLogicalSize,
                                    TmpVariant.array(),
                                    TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CREATEBASESTORAGE_RETURN(this, hrc, 0 /*normal*/, aLogicalSize, (uint32_t)TmpVariant.array().size(), NULL /*for now*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CREATEBASESTORAGE_RETURN(this, hrc, 1 /*hrc exception*/, aLogicalSize, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CREATEBASESTORAGE_RETURN(this, hrc, 9 /*unhandled exception*/, aLogicalSize, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Medium::createBaseStorage", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::DeleteStorage(IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aProgress=%p\n", this, "Medium::deleteStorage", aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_DELETESTORAGE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = deleteStorage(TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_DELETESTORAGE_RETURN(this, hrc, 0 /*normal*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_DELETESTORAGE_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_DELETESTORAGE_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Medium::deleteStorage", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::CreateDiffStorage(IMedium *aTarget,
                                           ComSafeArrayIn(MediumVariant_T, aVariant),
                                           IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aTarget=%p aVariant=%zu aProgress=%p\n", this, "Medium::createDiffStorage", aTarget, aVariant, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeInConverter<IMedium> TmpTarget(aTarget);
        ArrayInConverter<MediumVariant_T> TmpVariant(ComSafeArrayInArg(aVariant));
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CREATEDIFFSTORAGE_ENTER(this, (void *)TmpTarget.ptr(), (uint32_t)TmpVariant.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createDiffStorage(autoCaller,
                                TmpTarget.ptr(),
                                    TmpVariant.array(),
                                    TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CREATEDIFFSTORAGE_RETURN(this, hrc, 0 /*normal*/, (void *)TmpTarget.ptr(), (uint32_t)TmpVariant.array().size(), NULL /*for now*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CREATEDIFFSTORAGE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CREATEDIFFSTORAGE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Medium::createDiffStorage", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::MergeTo(IMedium *aTarget,
                                 IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aTarget=%p aProgress=%p\n", this, "Medium::mergeTo", aTarget, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeInConverter<IMedium> TmpTarget(aTarget);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_MERGETO_ENTER(this, (void *)TmpTarget.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = mergeTo(TmpTarget.ptr(),
                          TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_MERGETO_RETURN(this, hrc, 0 /*normal*/, (void *)TmpTarget.ptr(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_MERGETO_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_MERGETO_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Medium::mergeTo", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::CloneTo(IMedium *aTarget,
                                 ComSafeArrayIn(MediumVariant_T, aVariant),
                                 IMedium *aParent,
                                 IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aTarget=%p aVariant=%zu aParent=%p aProgress=%p\n", this, "Medium::cloneTo", aTarget, aVariant, aParent, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeInConverter<IMedium> TmpTarget(aTarget);
        ArrayInConverter<MediumVariant_T> TmpVariant(ComSafeArrayInArg(aVariant));
        ComTypeInConverter<IMedium> TmpParent(aParent);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLONETO_ENTER(this, (void *)TmpTarget.ptr(), (uint32_t)TmpVariant.array().size(), NULL /*for now*/, (void *)TmpParent.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = cloneTo(TmpTarget.ptr(),
                          TmpVariant.array(),
                          TmpParent.ptr(),
                          TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLONETO_RETURN(this, hrc, 0 /*normal*/, (void *)TmpTarget.ptr(), (uint32_t)TmpVariant.array().size(), NULL /*for now*/, (void *)TmpParent.ptr(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLONETO_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLONETO_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Medium::cloneTo", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::CloneToBase(IMedium *aTarget,
                                     ComSafeArrayIn(MediumVariant_T, aVariant),
                                     IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aTarget=%p aVariant=%zu aProgress=%p\n", this, "Medium::cloneToBase", aTarget, aVariant, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeInConverter<IMedium> TmpTarget(aTarget);
        ArrayInConverter<MediumVariant_T> TmpVariant(ComSafeArrayInArg(aVariant));
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLONETOBASE_ENTER(this, (void *)TmpTarget.ptr(), (uint32_t)TmpVariant.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = cloneToBase(TmpTarget.ptr(),
                              TmpVariant.array(),
                              TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLONETOBASE_RETURN(this, hrc, 0 /*normal*/, (void *)TmpTarget.ptr(), (uint32_t)TmpVariant.array().size(), NULL /*for now*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLONETOBASE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CLONETOBASE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Medium::cloneToBase", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::MoveTo(IN_BSTR aLocation,
                                IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aLocation=%ls aProgress=%p\n", this, "Medium::moveTo", aLocation, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        BSTRInConverter TmpLocation(aLocation);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_MOVETO_ENTER(this, TmpLocation.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = moveTo(autoCaller,
                     TmpLocation.str(),
                         TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_MOVETO_RETURN(this, hrc, 0 /*normal*/, TmpLocation.str().c_str(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_MOVETO_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_MOVETO_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Medium::moveTo", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::Compact(IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aProgress=%p\n", this, "Medium::compact", aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_COMPACT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = compact(TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_COMPACT_RETURN(this, hrc, 0 /*normal*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_COMPACT_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_COMPACT_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Medium::compact", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::Resize(LONG64 aLogicalSize,
                                IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aLogicalSize=%RI64 aProgress=%p\n", this, "Medium::resize", aLogicalSize, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_RESIZE_ENTER(this, aLogicalSize);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = resize(aLogicalSize,
                         TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_RESIZE_RETURN(this, hrc, 0 /*normal*/, aLogicalSize, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_RESIZE_RETURN(this, hrc, 1 /*hrc exception*/, aLogicalSize, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_RESIZE_RETURN(this, hrc, 9 /*unhandled exception*/, aLogicalSize, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Medium::resize", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::Reset(IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aProgress=%p\n", this, "Medium::reset", aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_RESET_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = reset(autoCaller,
                    TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_RESET_RETURN(this, hrc, 0 /*normal*/, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_RESET_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_RESET_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Medium::reset", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::ChangeEncryption(IN_BSTR aCurrentPassword,
                                          IN_BSTR aCipher,
                                          IN_BSTR aNewPassword,
                                          IN_BSTR aNewPasswordId,
                                          IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aCurrentPassword=%ls aCipher=%ls aNewPassword=%ls aNewPasswordId=%ls aProgress=%p\n", this, "Medium::changeEncryption", aCurrentPassword, aCipher, aNewPassword, aNewPasswordId, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        BSTRInConverter TmpCurrentPassword(aCurrentPassword);
        BSTRInConverter TmpCipher(aCipher);
        BSTRInConverter TmpNewPassword(aNewPassword);
        BSTRInConverter TmpNewPasswordId(aNewPasswordId);
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CHANGEENCRYPTION_ENTER(this, TmpCurrentPassword.str().c_str(), TmpCipher.str().c_str(), TmpNewPassword.str().c_str(), TmpNewPasswordId.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = changeEncryption(TmpCurrentPassword.str(),
                                   TmpCipher.str(),
                                   TmpNewPassword.str(),
                                   TmpNewPasswordId.str(),
                                   TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CHANGEENCRYPTION_RETURN(this, hrc, 0 /*normal*/, TmpCurrentPassword.str().c_str(), TmpCipher.str().c_str(), TmpNewPassword.str().c_str(), TmpNewPasswordId.str().c_str(), (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CHANGEENCRYPTION_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CHANGEENCRYPTION_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "Medium::changeEncryption", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::GetEncryptionSettings(BSTR *aCipher,
                                               BSTR *aPasswordId)
{
    LogRelFlow(("{%p} %s:enter aCipher=%p aPasswordId=%p\n", this, "Medium::getEncryptionSettings", aCipher, aPasswordId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCipher);
        CheckComArgOutPointerValidThrow(aPasswordId);


        BSTROutConverter TmpCipher(aCipher);
        BSTROutConverter TmpPasswordId(aPasswordId);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETENCRYPTIONSETTINGS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEncryptionSettings(autoCaller,
                                    TmpCipher.str(),
                                        TmpPasswordId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETENCRYPTIONSETTINGS_RETURN(this, hrc, 0 /*normal*/, TmpCipher.str().c_str(), TmpPasswordId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETENCRYPTIONSETTINGS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_GETENCRYPTIONSETTINGS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCipher=%ls aPasswordId=%ls hrc=%Rhrc\n", this, "Medium::getEncryptionSettings", *aCipher, *aPasswordId, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::CheckEncryptionPassword(IN_BSTR aPassword)
{
    LogRelFlow(("{%p} %s:enter aPassword=%ls\n", this, "Medium::checkEncryptionPassword", aPassword));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpPassword(aPassword);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CHECKENCRYPTIONPASSWORD_ENTER(this, TmpPassword.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = checkEncryptionPassword(TmpPassword.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CHECKENCRYPTIONPASSWORD_RETURN(this, hrc, 0 /*normal*/, TmpPassword.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CHECKENCRYPTIONPASSWORD_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_CHECKENCRYPTIONPASSWORD_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Medium::checkEncryptionPassword", hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::OpenForIO(BOOL aWritable,
                                   IN_BSTR aPassword,
                                   IMediumIO **aMediumIO)
{
    LogRelFlow(("{%p} %s:enter aWritable=%RTbool aPassword=%ls aMediumIO=%p\n", this, "Medium::openForIO", aWritable, aPassword, aMediumIO));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMediumIO);


        
        BSTRInConverter TmpPassword(aPassword);
        ComTypeOutConverter<IMediumIO> TmpMediumIO(aMediumIO);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_OPENFORIO_ENTER(this, aWritable != FALSE, TmpPassword.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = openForIO(aWritable != FALSE,
                            TmpPassword.str(),
                            TmpMediumIO.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_OPENFORIO_RETURN(this, hrc, 0 /*normal*/, aWritable != FALSE, TmpPassword.str().c_str(), (void *)TmpMediumIO.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_OPENFORIO_RETURN(this, hrc, 1 /*hrc exception*/, aWritable != FALSE, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUM_OPENFORIO_RETURN(this, hrc, 9 /*unhandled exception*/, aWritable != FALSE, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMediumIO=%p hrc=%Rhrc\n", this, "Medium::openForIO", *aMediumIO, hrc));
    return hrc;
}

STDMETHODIMP MediumWrap::InternalAndReservedMethod1IMedium()
{
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::InternalAndReservedMethod2IMedium()
{
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::InternalAndReservedMethod3IMedium()
{
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::InternalAndReservedMethod4IMedium()
{
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::InternalAndReservedMethod5IMedium()
{
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::InternalAndReservedMethod6IMedium()
{
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::InternalAndReservedMethod7IMedium()
{
    return E_NOTIMPL;
}

STDMETHODIMP MediumWrap::InternalAndReservedMethod8IMedium()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(MediumWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(MediumWrap, IMedium)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "MediumWrap.cpp"


// ##### BEGINFILE "MediumFormatWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IMediumFormat.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_MEDIUMFORMAT

#include "MediumFormatWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(MediumFormatWrap)

//
// IMediumFormat properties
//

STDMETHODIMP MediumFormatWrap::COMGETTER(Id)(BSTR *aId)
{
    LogRelFlow(("{%p} %s: enter aId=%p\n", this, "MediumFormat::getId", aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aId);
        BSTROutConverter TmpId(aId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_ID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getId(TmpId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_ID_RETURN(this, hrc, 0 /*normal*/,TmpId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_ID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_ID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aId=%ls hrc=%Rhrc\n", this, "MediumFormat::getId", *aId, hrc));
    return hrc;
}

STDMETHODIMP MediumFormatWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "MediumFormat::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "MediumFormat::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP MediumFormatWrap::COMGETTER(Capabilities)(ComSafeArrayOut(MediumFormatCapabilities_T, aCapabilities))
{
    LogRelFlow(("{%p} %s: enter aCapabilities=%p\n", this, "MediumFormat::getCapabilities", aCapabilities));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCapabilities);
        ArrayOutConverter<MediumFormatCapabilities_T> TmpCapabilities(ComSafeArrayOutArg(aCapabilities));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_CAPABILITIES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCapabilities(TmpCapabilities.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_CAPABILITIES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpCapabilities.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_CAPABILITIES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_GET_CAPABILITIES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCapabilities=%zu hrc=%Rhrc\n", this, "MediumFormat::getCapabilities", ComSafeArraySize(*aCapabilities), hrc));
    return hrc;
}

STDMETHODIMP MediumFormatWrap::COMGETTER(InternalAndReservedAttribute1IMediumFormat)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumFormatWrap::COMGETTER(InternalAndReservedAttribute2IMediumFormat)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumFormatWrap::COMGETTER(InternalAndReservedAttribute3IMediumFormat)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MediumFormatWrap::COMGETTER(InternalAndReservedAttribute4IMediumFormat)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IMediumFormat methods
//

STDMETHODIMP MediumFormatWrap::DescribeFileExtensions(ComSafeArrayOut(BSTR, aExtensions),
                                                      ComSafeArrayOut(DeviceType_T, aTypes))
{
    LogRelFlow(("{%p} %s:enter aExtensions=%p aTypes=%p\n", this, "MediumFormat::describeFileExtensions", aExtensions, aTypes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aExtensions);
        CheckComArgOutPointerValidThrow(aTypes);


        ArrayBSTROutConverter TmpExtensions(ComSafeArrayOutArg(aExtensions));
        ArrayOutConverter<DeviceType_T> TmpTypes(ComSafeArrayOutArg(aTypes));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_DESCRIBEFILEEXTENSIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = describeFileExtensions(TmpExtensions.array(),
                                         TmpTypes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_DESCRIBEFILEEXTENSIONS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpExtensions.array().size(), NULL /*for now*/, (uint32_t)TmpTypes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_DESCRIBEFILEEXTENSIONS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_DESCRIBEFILEEXTENSIONS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aExtensions=%zu *aTypes=%zu hrc=%Rhrc\n", this, "MediumFormat::describeFileExtensions", ComSafeArraySize(*aExtensions), ComSafeArraySize(*aTypes), hrc));
    return hrc;
}

STDMETHODIMP MediumFormatWrap::DescribeProperties(ComSafeArrayOut(BSTR, aNames),
                                                  ComSafeArrayOut(BSTR, aDescriptions),
                                                  ComSafeArrayOut(DataType_T, aTypes),
                                                  ComSafeArrayOut(ULONG, aFlags),
                                                  ComSafeArrayOut(BSTR, aDefaults))
{
    LogRelFlow(("{%p} %s:enter aNames=%p aDescriptions=%p aTypes=%p aFlags=%p aDefaults=%p\n", this, "MediumFormat::describeProperties", aNames, aDescriptions, aTypes, aFlags, aDefaults));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNames);
        CheckComArgOutPointerValidThrow(aDescriptions);
        CheckComArgOutPointerValidThrow(aTypes);
        CheckComArgOutPointerValidThrow(aFlags);
        CheckComArgOutPointerValidThrow(aDefaults);


        ArrayBSTROutConverter TmpNames(ComSafeArrayOutArg(aNames));
        ArrayBSTROutConverter TmpDescriptions(ComSafeArrayOutArg(aDescriptions));
        ArrayOutConverter<DataType_T> TmpTypes(ComSafeArrayOutArg(aTypes));
        ArrayOutConverter<ULONG> TmpFlags(ComSafeArrayOutArg(aFlags));
        ArrayBSTROutConverter TmpDefaults(ComSafeArrayOutArg(aDefaults));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_DESCRIBEPROPERTIES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = describeProperties(TmpNames.array(),
                                     TmpDescriptions.array(),
                                     TmpTypes.array(),
                                     TmpFlags.array(),
                                     TmpDefaults.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_DESCRIBEPROPERTIES_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpNames.array().size(), NULL /*for now*/, (uint32_t)TmpDescriptions.array().size(), NULL /*for now*/, (uint32_t)TmpTypes.array().size(), NULL /*for now*/, (uint32_t)TmpFlags.array().size(), NULL /*for now*/, (uint32_t)TmpDefaults.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_DESCRIBEPROPERTIES_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MEDIUMFORMAT_DESCRIBEPROPERTIES_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNames=%zu *aDescriptions=%zu *aTypes=%zu *aFlags=%zu *aDefaults=%zu hrc=%Rhrc\n", this, "MediumFormat::describeProperties", ComSafeArraySize(*aNames), ComSafeArraySize(*aDescriptions), ComSafeArraySize(*aTypes), ComSafeArraySize(*aFlags), ComSafeArraySize(*aDefaults), hrc));
    return hrc;
}

STDMETHODIMP MediumFormatWrap::InternalAndReservedMethod1IMediumFormat()
{
    return E_NOTIMPL;
}

STDMETHODIMP MediumFormatWrap::InternalAndReservedMethod2IMediumFormat()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(MediumFormatWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(MediumFormatWrap, IMediumFormat)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "MediumFormatWrap.cpp"


// ##### BEGINFILE "TokenWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IToken.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_TOKEN

#include "TokenWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(TokenWrap)

//
// IToken properties
//

STDMETHODIMP TokenWrap::COMGETTER(InternalAndReservedAttribute1IToken)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP TokenWrap::COMGETTER(InternalAndReservedAttribute2IToken)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IToken methods
//

STDMETHODIMP TokenWrap::Abandon()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Token::abandon"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_TOKEN_ABANDON_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = abandon(autoCaller);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_TOKEN_ABANDON_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_TOKEN_ABANDON_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_TOKEN_ABANDON_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Token::abandon", hrc));
    return hrc;
}

STDMETHODIMP TokenWrap::Dummy()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Token::dummy"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_TOKEN_DUMMY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = dummy();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_TOKEN_DUMMY_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_TOKEN_DUMMY_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_TOKEN_DUMMY_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Token::dummy", hrc));
    return hrc;
}

STDMETHODIMP TokenWrap::InternalAndReservedMethod1IToken()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(TokenWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(TokenWrap, IToken)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "TokenWrap.cpp"


// ##### BEGINFILE "KeyboardWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IKeyboard.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_KEYBOARD

#include "KeyboardWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(KeyboardWrap)

//
// IKeyboard properties
//

STDMETHODIMP KeyboardWrap::COMGETTER(KeyboardLEDs)(ComSafeArrayOut(KeyboardLED_T, aKeyboardLEDs))
{
    LogRelFlow(("{%p} %s: enter aKeyboardLEDs=%p\n", this, "Keyboard::getKeyboardLEDs", aKeyboardLEDs));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aKeyboardLEDs);
        ArrayOutConverter<KeyboardLED_T> TmpKeyboardLEDs(ComSafeArrayOutArg(aKeyboardLEDs));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_GET_KEYBOARDLEDS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getKeyboardLEDs(TmpKeyboardLEDs.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_GET_KEYBOARDLEDS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpKeyboardLEDs.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_GET_KEYBOARDLEDS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_GET_KEYBOARDLEDS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aKeyboardLEDs=%zu hrc=%Rhrc\n", this, "Keyboard::getKeyboardLEDs", ComSafeArraySize(*aKeyboardLEDs), hrc));
    return hrc;
}

STDMETHODIMP KeyboardWrap::COMGETTER(EventSource)(IEventSource **aEventSource)
{
    LogRelFlow(("{%p} %s: enter aEventSource=%p\n", this, "Keyboard::getEventSource", aEventSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEventSource);
        ComTypeOutConverter<IEventSource> TmpEventSource(aEventSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_GET_EVENTSOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEventSource(TmpEventSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_GET_EVENTSOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpEventSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_GET_EVENTSOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_GET_EVENTSOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEventSource=%p hrc=%Rhrc\n", this, "Keyboard::getEventSource", *aEventSource, hrc));
    return hrc;
}

STDMETHODIMP KeyboardWrap::COMGETTER(InternalAndReservedAttribute1IKeyboard)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP KeyboardWrap::COMGETTER(InternalAndReservedAttribute2IKeyboard)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP KeyboardWrap::COMGETTER(InternalAndReservedAttribute3IKeyboard)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP KeyboardWrap::COMGETTER(InternalAndReservedAttribute4IKeyboard)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IKeyboard methods
//

STDMETHODIMP KeyboardWrap::PutScancode(LONG aScancode)
{
    LogRelFlow(("{%p} %s:enter aScancode=%RI32\n", this, "Keyboard::putScancode", aScancode));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTSCANCODE_ENTER(this, aScancode);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = putScancode(aScancode);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTSCANCODE_RETURN(this, hrc, 0 /*normal*/, aScancode);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTSCANCODE_RETURN(this, hrc, 1 /*hrc exception*/, aScancode);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTSCANCODE_RETURN(this, hrc, 9 /*unhandled exception*/, aScancode);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Keyboard::putScancode", hrc));
    return hrc;
}

STDMETHODIMP KeyboardWrap::PutScancodes(ComSafeArrayIn(LONG, aScancodes),
                                        ULONG *aCodesStored)
{
    LogRelFlow(("{%p} %s:enter aScancodes=%zu aCodesStored=%p\n", this, "Keyboard::putScancodes", aScancodes, aCodesStored));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCodesStored);


        ArrayInConverter<LONG> TmpScancodes(ComSafeArrayInArg(aScancodes));
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTSCANCODES_ENTER(this, (uint32_t)TmpScancodes.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = putScancodes(TmpScancodes.array(),
                               aCodesStored);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTSCANCODES_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpScancodes.array().size(), NULL /*for now*/, *aCodesStored);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTSCANCODES_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, *aCodesStored);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTSCANCODES_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, *aCodesStored);
#endif
    }

    LogRelFlow(("{%p} %s: leave aCodesStored=%RU32 hrc=%Rhrc\n", this, "Keyboard::putScancodes", *aCodesStored, hrc));
    return hrc;
}

STDMETHODIMP KeyboardWrap::PutCAD()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Keyboard::putCAD"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTCAD_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = putCAD();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTCAD_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTCAD_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTCAD_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Keyboard::putCAD", hrc));
    return hrc;
}

STDMETHODIMP KeyboardWrap::ReleaseKeys()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Keyboard::releaseKeys"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_RELEASEKEYS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = releaseKeys();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_RELEASEKEYS_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_RELEASEKEYS_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_RELEASEKEYS_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Keyboard::releaseKeys", hrc));
    return hrc;
}

STDMETHODIMP KeyboardWrap::PutUsageCode(LONG aUsageCode,
                                        LONG aUsagePage,
                                        BOOL aKeyRelease)
{
    LogRelFlow(("{%p} %s:enter aUsageCode=%RI32 aUsagePage=%RI32 aKeyRelease=%RTbool\n", this, "Keyboard::putUsageCode", aUsageCode, aUsagePage, aKeyRelease));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTUSAGECODE_ENTER(this, aUsageCode, aUsagePage, aKeyRelease != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = putUsageCode(aUsageCode,
                               aUsagePage,
                               aKeyRelease != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTUSAGECODE_RETURN(this, hrc, 0 /*normal*/, aUsageCode, aUsagePage, aKeyRelease != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTUSAGECODE_RETURN(this, hrc, 1 /*hrc exception*/, aUsageCode, aUsagePage, aKeyRelease != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_KEYBOARD_PUTUSAGECODE_RETURN(this, hrc, 9 /*unhandled exception*/, aUsageCode, aUsagePage, aKeyRelease != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Keyboard::putUsageCode", hrc));
    return hrc;
}

STDMETHODIMP KeyboardWrap::InternalAndReservedMethod1IKeyboard()
{
    return E_NOTIMPL;
}

STDMETHODIMP KeyboardWrap::InternalAndReservedMethod2IKeyboard()
{
    return E_NOTIMPL;
}

STDMETHODIMP KeyboardWrap::InternalAndReservedMethod3IKeyboard()
{
    return E_NOTIMPL;
}

STDMETHODIMP KeyboardWrap::InternalAndReservedMethod4IKeyboard()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(KeyboardWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(KeyboardWrap, IKeyboard)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "KeyboardWrap.cpp"


// ##### BEGINFILE "MouseWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IMouse.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_MOUSE

#include "MouseWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(MouseWrap)

//
// IMouse properties
//

STDMETHODIMP MouseWrap::COMGETTER(AbsoluteSupported)(BOOL *aAbsoluteSupported)
{
    LogRelFlow(("{%p} %s: enter aAbsoluteSupported=%p\n", this, "Mouse::getAbsoluteSupported", aAbsoluteSupported));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAbsoluteSupported);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_ABSOLUTESUPPORTED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAbsoluteSupported(aAbsoluteSupported);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_ABSOLUTESUPPORTED_RETURN(this, hrc, 0 /*normal*/,*aAbsoluteSupported != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_ABSOLUTESUPPORTED_RETURN(this, hrc, 1 /*hrc exception*/,*aAbsoluteSupported != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_ABSOLUTESUPPORTED_RETURN(this, hrc, 9 /*unhandled exception*/,*aAbsoluteSupported != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAbsoluteSupported=%RTbool hrc=%Rhrc\n", this, "Mouse::getAbsoluteSupported", *aAbsoluteSupported, hrc));
    return hrc;
}

STDMETHODIMP MouseWrap::COMGETTER(RelativeSupported)(BOOL *aRelativeSupported)
{
    LogRelFlow(("{%p} %s: enter aRelativeSupported=%p\n", this, "Mouse::getRelativeSupported", aRelativeSupported));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRelativeSupported);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_RELATIVESUPPORTED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRelativeSupported(aRelativeSupported);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_RELATIVESUPPORTED_RETURN(this, hrc, 0 /*normal*/,*aRelativeSupported != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_RELATIVESUPPORTED_RETURN(this, hrc, 1 /*hrc exception*/,*aRelativeSupported != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_RELATIVESUPPORTED_RETURN(this, hrc, 9 /*unhandled exception*/,*aRelativeSupported != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRelativeSupported=%RTbool hrc=%Rhrc\n", this, "Mouse::getRelativeSupported", *aRelativeSupported, hrc));
    return hrc;
}

STDMETHODIMP MouseWrap::COMGETTER(MultiTouchSupported)(BOOL *aMultiTouchSupported)
{
    LogRelFlow(("{%p} %s: enter aMultiTouchSupported=%p\n", this, "Mouse::getMultiTouchSupported", aMultiTouchSupported));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMultiTouchSupported);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_MULTITOUCHSUPPORTED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMultiTouchSupported(aMultiTouchSupported);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_MULTITOUCHSUPPORTED_RETURN(this, hrc, 0 /*normal*/,*aMultiTouchSupported != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_MULTITOUCHSUPPORTED_RETURN(this, hrc, 1 /*hrc exception*/,*aMultiTouchSupported != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_MULTITOUCHSUPPORTED_RETURN(this, hrc, 9 /*unhandled exception*/,*aMultiTouchSupported != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMultiTouchSupported=%RTbool hrc=%Rhrc\n", this, "Mouse::getMultiTouchSupported", *aMultiTouchSupported, hrc));
    return hrc;
}

STDMETHODIMP MouseWrap::COMGETTER(NeedsHostCursor)(BOOL *aNeedsHostCursor)
{
    LogRelFlow(("{%p} %s: enter aNeedsHostCursor=%p\n", this, "Mouse::getNeedsHostCursor", aNeedsHostCursor));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNeedsHostCursor);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_NEEDSHOSTCURSOR_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getNeedsHostCursor(aNeedsHostCursor);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_NEEDSHOSTCURSOR_RETURN(this, hrc, 0 /*normal*/,*aNeedsHostCursor != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_NEEDSHOSTCURSOR_RETURN(this, hrc, 1 /*hrc exception*/,*aNeedsHostCursor != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_NEEDSHOSTCURSOR_RETURN(this, hrc, 9 /*unhandled exception*/,*aNeedsHostCursor != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNeedsHostCursor=%RTbool hrc=%Rhrc\n", this, "Mouse::getNeedsHostCursor", *aNeedsHostCursor, hrc));
    return hrc;
}

STDMETHODIMP MouseWrap::COMGETTER(PointerShape)(IMousePointerShape **aPointerShape)
{
    LogRelFlow(("{%p} %s: enter aPointerShape=%p\n", this, "Mouse::getPointerShape", aPointerShape));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPointerShape);
        ComTypeOutConverter<IMousePointerShape> TmpPointerShape(aPointerShape);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_POINTERSHAPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPointerShape(TmpPointerShape.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_POINTERSHAPE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpPointerShape.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_POINTERSHAPE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_POINTERSHAPE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPointerShape=%p hrc=%Rhrc\n", this, "Mouse::getPointerShape", *aPointerShape, hrc));
    return hrc;
}

STDMETHODIMP MouseWrap::COMGETTER(EventSource)(IEventSource **aEventSource)
{
    LogRelFlow(("{%p} %s: enter aEventSource=%p\n", this, "Mouse::getEventSource", aEventSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEventSource);
        ComTypeOutConverter<IEventSource> TmpEventSource(aEventSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_EVENTSOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEventSource(TmpEventSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_EVENTSOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpEventSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_EVENTSOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_GET_EVENTSOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEventSource=%p hrc=%Rhrc\n", this, "Mouse::getEventSource", *aEventSource, hrc));
    return hrc;
}

STDMETHODIMP MouseWrap::COMGETTER(InternalAndReservedAttribute1IMouse)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MouseWrap::COMGETTER(InternalAndReservedAttribute2IMouse)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MouseWrap::COMGETTER(InternalAndReservedAttribute3IMouse)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MouseWrap::COMGETTER(InternalAndReservedAttribute4IMouse)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IMouse methods
//

STDMETHODIMP MouseWrap::PutMouseEvent(LONG aDx,
                                      LONG aDy,
                                      LONG aDz,
                                      LONG aDw,
                                      LONG aButtonState)
{
    LogRelFlow(("{%p} %s:enter aDx=%RI32 aDy=%RI32 aDz=%RI32 aDw=%RI32 aButtonState=%RI32\n", this, "Mouse::putMouseEvent", aDx, aDy, aDz, aDw, aButtonState));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTMOUSEEVENT_ENTER(this, aDx, aDy, aDz, aDw, aButtonState);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = putMouseEvent(aDx,
                                aDy,
                                aDz,
                                aDw,
                                aButtonState);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTMOUSEEVENT_RETURN(this, hrc, 0 /*normal*/, aDx, aDy, aDz, aDw, aButtonState);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTMOUSEEVENT_RETURN(this, hrc, 1 /*hrc exception*/, aDx, aDy, aDz, aDw, aButtonState);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTMOUSEEVENT_RETURN(this, hrc, 9 /*unhandled exception*/, aDx, aDy, aDz, aDw, aButtonState);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Mouse::putMouseEvent", hrc));
    return hrc;
}

STDMETHODIMP MouseWrap::PutMouseEventAbsolute(LONG aX,
                                              LONG aY,
                                              LONG aDz,
                                              LONG aDw,
                                              LONG aButtonState)
{
    LogRelFlow(("{%p} %s:enter aX=%RI32 aY=%RI32 aDz=%RI32 aDw=%RI32 aButtonState=%RI32\n", this, "Mouse::putMouseEventAbsolute", aX, aY, aDz, aDw, aButtonState));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTMOUSEEVENTABSOLUTE_ENTER(this, aX, aY, aDz, aDw, aButtonState);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = putMouseEventAbsolute(aX,
                                        aY,
                                        aDz,
                                        aDw,
                                        aButtonState);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTMOUSEEVENTABSOLUTE_RETURN(this, hrc, 0 /*normal*/, aX, aY, aDz, aDw, aButtonState);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTMOUSEEVENTABSOLUTE_RETURN(this, hrc, 1 /*hrc exception*/, aX, aY, aDz, aDw, aButtonState);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTMOUSEEVENTABSOLUTE_RETURN(this, hrc, 9 /*unhandled exception*/, aX, aY, aDz, aDw, aButtonState);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Mouse::putMouseEventAbsolute", hrc));
    return hrc;
}

STDMETHODIMP MouseWrap::PutEventMultiTouch(LONG aCount,
                                           ComSafeArrayIn(LONG64, aContacts),
                                           ULONG aScanTime)
{
    LogRelFlow(("{%p} %s:enter aCount=%RI32 aContacts=%zu aScanTime=%RU32\n", this, "Mouse::putEventMultiTouch", aCount, aContacts, aScanTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        ArrayInConverter<LONG64> TmpContacts(ComSafeArrayInArg(aContacts));
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTEVENTMULTITOUCH_ENTER(this, aCount, (uint32_t)TmpContacts.array().size(), NULL /*for now*/, aScanTime);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = putEventMultiTouch(aCount,
                                     TmpContacts.array(),
                                     aScanTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTEVENTMULTITOUCH_RETURN(this, hrc, 0 /*normal*/, aCount, (uint32_t)TmpContacts.array().size(), NULL /*for now*/, aScanTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTEVENTMULTITOUCH_RETURN(this, hrc, 1 /*hrc exception*/, aCount, 0, 0, aScanTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTEVENTMULTITOUCH_RETURN(this, hrc, 9 /*unhandled exception*/, aCount, 0, 0, aScanTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Mouse::putEventMultiTouch", hrc));
    return hrc;
}

STDMETHODIMP MouseWrap::PutEventMultiTouchString(LONG aCount,
                                                 IN_BSTR aContacts,
                                                 ULONG aScanTime)
{
    LogRelFlow(("{%p} %s:enter aCount=%RI32 aContacts=%ls aScanTime=%RU32\n", this, "Mouse::putEventMultiTouchString", aCount, aContacts, aScanTime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        BSTRInConverter TmpContacts(aContacts);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTEVENTMULTITOUCHSTRING_ENTER(this, aCount, TmpContacts.str().c_str(), aScanTime);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = putEventMultiTouchString(aCount,
                                           TmpContacts.str(),
                                           aScanTime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTEVENTMULTITOUCHSTRING_RETURN(this, hrc, 0 /*normal*/, aCount, TmpContacts.str().c_str(), aScanTime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTEVENTMULTITOUCHSTRING_RETURN(this, hrc, 1 /*hrc exception*/, aCount, 0, aScanTime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MOUSE_PUTEVENTMULTITOUCHSTRING_RETURN(this, hrc, 9 /*unhandled exception*/, aCount, 0, aScanTime);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Mouse::putEventMultiTouchString", hrc));
    return hrc;
}

STDMETHODIMP MouseWrap::InternalAndReservedMethod1IMouse()
{
    return E_NOTIMPL;
}

STDMETHODIMP MouseWrap::InternalAndReservedMethod2IMouse()
{
    return E_NOTIMPL;
}

STDMETHODIMP MouseWrap::InternalAndReservedMethod3IMouse()
{
    return E_NOTIMPL;
}

STDMETHODIMP MouseWrap::InternalAndReservedMethod4IMouse()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(MouseWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(MouseWrap, IMouse)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "MouseWrap.cpp"


// ##### BEGINFILE "FramebufferOverlayWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IFramebufferOverlay.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_FRAMEBUFFEROVERLAY

#include "FramebufferOverlayWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(FramebufferOverlayWrap)

//
// IFramebuffer properties
//

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(Width)(ULONG *aWidth)
{
    LogRelFlow(("{%p} %s: enter aWidth=%p\n", this, "FramebufferOverlay::getWidth", aWidth));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWidth);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_WIDTH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWidth(aWidth);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_WIDTH_RETURN(this, hrc, 0 /*normal*/,*aWidth);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_WIDTH_RETURN(this, hrc, 1 /*hrc exception*/,*aWidth);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_WIDTH_RETURN(this, hrc, 9 /*unhandled exception*/,*aWidth);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWidth=%RU32 hrc=%Rhrc\n", this, "FramebufferOverlay::getWidth", *aWidth, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(Height)(ULONG *aHeight)
{
    LogRelFlow(("{%p} %s: enter aHeight=%p\n", this, "FramebufferOverlay::getHeight", aHeight));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHeight);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_HEIGHT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHeight(aHeight);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_HEIGHT_RETURN(this, hrc, 0 /*normal*/,*aHeight);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_HEIGHT_RETURN(this, hrc, 1 /*hrc exception*/,*aHeight);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_HEIGHT_RETURN(this, hrc, 9 /*unhandled exception*/,*aHeight);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHeight=%RU32 hrc=%Rhrc\n", this, "FramebufferOverlay::getHeight", *aHeight, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(BitsPerPixel)(ULONG *aBitsPerPixel)
{
    LogRelFlow(("{%p} %s: enter aBitsPerPixel=%p\n", this, "FramebufferOverlay::getBitsPerPixel", aBitsPerPixel));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBitsPerPixel);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_BITSPERPIXEL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBitsPerPixel(aBitsPerPixel);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_BITSPERPIXEL_RETURN(this, hrc, 0 /*normal*/,*aBitsPerPixel);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_BITSPERPIXEL_RETURN(this, hrc, 1 /*hrc exception*/,*aBitsPerPixel);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_BITSPERPIXEL_RETURN(this, hrc, 9 /*unhandled exception*/,*aBitsPerPixel);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBitsPerPixel=%RU32 hrc=%Rhrc\n", this, "FramebufferOverlay::getBitsPerPixel", *aBitsPerPixel, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(BytesPerLine)(ULONG *aBytesPerLine)
{
    LogRelFlow(("{%p} %s: enter aBytesPerLine=%p\n", this, "FramebufferOverlay::getBytesPerLine", aBytesPerLine));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBytesPerLine);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_BYTESPERLINE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBytesPerLine(aBytesPerLine);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_BYTESPERLINE_RETURN(this, hrc, 0 /*normal*/,*aBytesPerLine);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_BYTESPERLINE_RETURN(this, hrc, 1 /*hrc exception*/,*aBytesPerLine);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_BYTESPERLINE_RETURN(this, hrc, 9 /*unhandled exception*/,*aBytesPerLine);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBytesPerLine=%RU32 hrc=%Rhrc\n", this, "FramebufferOverlay::getBytesPerLine", *aBytesPerLine, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(PixelFormat)(BitmapFormat_T *aPixelFormat)
{
    LogRelFlow(("{%p} %s: enter aPixelFormat=%p\n", this, "FramebufferOverlay::getPixelFormat", aPixelFormat));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPixelFormat);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_PIXELFORMAT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPixelFormat(aPixelFormat);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_PIXELFORMAT_RETURN(this, hrc, 0 /*normal*/,*aPixelFormat);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_PIXELFORMAT_RETURN(this, hrc, 1 /*hrc exception*/,*aPixelFormat);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_PIXELFORMAT_RETURN(this, hrc, 9 /*unhandled exception*/,*aPixelFormat);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPixelFormat=%RU32 hrc=%Rhrc\n", this, "FramebufferOverlay::getPixelFormat", *aPixelFormat, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(HeightReduction)(ULONG *aHeightReduction)
{
    LogRelFlow(("{%p} %s: enter aHeightReduction=%p\n", this, "FramebufferOverlay::getHeightReduction", aHeightReduction));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHeightReduction);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_HEIGHTREDUCTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHeightReduction(aHeightReduction);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_HEIGHTREDUCTION_RETURN(this, hrc, 0 /*normal*/,*aHeightReduction);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_HEIGHTREDUCTION_RETURN(this, hrc, 1 /*hrc exception*/,*aHeightReduction);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_HEIGHTREDUCTION_RETURN(this, hrc, 9 /*unhandled exception*/,*aHeightReduction);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHeightReduction=%RU32 hrc=%Rhrc\n", this, "FramebufferOverlay::getHeightReduction", *aHeightReduction, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(Overlay)(IFramebufferOverlay **aOverlay)
{
    LogRelFlow(("{%p} %s: enter aOverlay=%p\n", this, "FramebufferOverlay::getOverlay", aOverlay));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOverlay);
        ComTypeOutConverter<IFramebufferOverlay> TmpOverlay(aOverlay);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_OVERLAY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOverlay(TmpOverlay.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_OVERLAY_RETURN(this, hrc, 0 /*normal*/,(void *)TmpOverlay.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_OVERLAY_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_OVERLAY_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOverlay=%p hrc=%Rhrc\n", this, "FramebufferOverlay::getOverlay", *aOverlay, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(WinId)(LONG64 *aWinId)
{
    LogRelFlow(("{%p} %s: enter aWinId=%p\n", this, "FramebufferOverlay::getWinId", aWinId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWinId);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_WINID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWinId(aWinId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_WINID_RETURN(this, hrc, 0 /*normal*/,*aWinId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_WINID_RETURN(this, hrc, 1 /*hrc exception*/,*aWinId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_WINID_RETURN(this, hrc, 9 /*unhandled exception*/,*aWinId);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWinId=%RI64 hrc=%Rhrc\n", this, "FramebufferOverlay::getWinId", *aWinId, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(Capabilities)(ComSafeArrayOut(FramebufferCapabilities_T, aCapabilities))
{
    LogRelFlow(("{%p} %s: enter aCapabilities=%p\n", this, "FramebufferOverlay::getCapabilities", aCapabilities));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCapabilities);
        ArrayOutConverter<FramebufferCapabilities_T> TmpCapabilities(ComSafeArrayOutArg(aCapabilities));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_CAPABILITIES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCapabilities(TmpCapabilities.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_CAPABILITIES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpCapabilities.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_CAPABILITIES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_CAPABILITIES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCapabilities=%zu hrc=%Rhrc\n", this, "FramebufferOverlay::getCapabilities", ComSafeArraySize(*aCapabilities), hrc));
    return hrc;
}

//
// IFramebufferOverlay properties
//

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(X)(ULONG *aX)
{
    LogRelFlow(("{%p} %s: enter aX=%p\n", this, "FramebufferOverlay::getX", aX));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aX);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_X_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getX(aX);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_X_RETURN(this, hrc, 0 /*normal*/,*aX);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_X_RETURN(this, hrc, 1 /*hrc exception*/,*aX);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_X_RETURN(this, hrc, 9 /*unhandled exception*/,*aX);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aX=%RU32 hrc=%Rhrc\n", this, "FramebufferOverlay::getX", *aX, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(Y)(ULONG *aY)
{
    LogRelFlow(("{%p} %s: enter aY=%p\n", this, "FramebufferOverlay::getY", aY));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aY);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_Y_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getY(aY);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_Y_RETURN(this, hrc, 0 /*normal*/,*aY);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_Y_RETURN(this, hrc, 1 /*hrc exception*/,*aY);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_Y_RETURN(this, hrc, 9 /*unhandled exception*/,*aY);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aY=%RU32 hrc=%Rhrc\n", this, "FramebufferOverlay::getY", *aY, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(Visible)(BOOL *aVisible)
{
    LogRelFlow(("{%p} %s: enter aVisible=%p\n", this, "FramebufferOverlay::getVisible", aVisible));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVisible);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_VISIBLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVisible(aVisible);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_VISIBLE_RETURN(this, hrc, 0 /*normal*/,*aVisible != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_VISIBLE_RETURN(this, hrc, 1 /*hrc exception*/,*aVisible != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_VISIBLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aVisible != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVisible=%RTbool hrc=%Rhrc\n", this, "FramebufferOverlay::getVisible", *aVisible, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMSETTER(Visible)(BOOL aVisible)
{
    LogRelFlow(("{%p} %s: enter aVisible=%RTbool\n", this, "FramebufferOverlay::setVisible", aVisible));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SET_VISIBLE_ENTER(this, aVisible != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVisible(aVisible != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SET_VISIBLE_RETURN(this, hrc, 0 /*normal*/,aVisible != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SET_VISIBLE_RETURN(this, hrc, 1 /*hrc exception*/,aVisible != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SET_VISIBLE_RETURN(this, hrc, 9 /*unhandled exception*/,aVisible != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "FramebufferOverlay::setVisible", hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMGETTER(Alpha)(ULONG *aAlpha)
{
    LogRelFlow(("{%p} %s: enter aAlpha=%p\n", this, "FramebufferOverlay::getAlpha", aAlpha));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAlpha);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_ALPHA_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAlpha(aAlpha);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_ALPHA_RETURN(this, hrc, 0 /*normal*/,*aAlpha);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_ALPHA_RETURN(this, hrc, 1 /*hrc exception*/,*aAlpha);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GET_ALPHA_RETURN(this, hrc, 9 /*unhandled exception*/,*aAlpha);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAlpha=%RU32 hrc=%Rhrc\n", this, "FramebufferOverlay::getAlpha", *aAlpha, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::COMSETTER(Alpha)(ULONG aAlpha)
{
    LogRelFlow(("{%p} %s: enter aAlpha=%RU32\n", this, "FramebufferOverlay::setAlpha", aAlpha));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SET_ALPHA_ENTER(this, aAlpha);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAlpha(aAlpha);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SET_ALPHA_RETURN(this, hrc, 0 /*normal*/,aAlpha);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SET_ALPHA_RETURN(this, hrc, 1 /*hrc exception*/,aAlpha);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SET_ALPHA_RETURN(this, hrc, 9 /*unhandled exception*/,aAlpha);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "FramebufferOverlay::setAlpha", hrc));
    return hrc;
}


//
// IFramebuffer methods
//

STDMETHODIMP FramebufferOverlayWrap::NotifyUpdate(ULONG aX,
                                                  ULONG aY,
                                                  ULONG aWidth,
                                                  ULONG aHeight)
{
    LogRelFlow(("{%p} %s:enter aX=%RU32 aY=%RU32 aWidth=%RU32 aHeight=%RU32\n", this, "FramebufferOverlay::notifyUpdate", aX, aY, aWidth, aHeight));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYUPDATE_ENTER(this, aX, aY, aWidth, aHeight);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = notifyUpdate(aX,
                               aY,
                               aWidth,
                               aHeight);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYUPDATE_RETURN(this, hrc, 0 /*normal*/, aX, aY, aWidth, aHeight);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYUPDATE_RETURN(this, hrc, 1 /*hrc exception*/, aX, aY, aWidth, aHeight);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYUPDATE_RETURN(this, hrc, 9 /*unhandled exception*/, aX, aY, aWidth, aHeight);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "FramebufferOverlay::notifyUpdate", hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::NotifyUpdateImage(ULONG aX,
                                                       ULONG aY,
                                                       ULONG aWidth,
                                                       ULONG aHeight,
                                                       ComSafeArrayIn(BYTE, aImage))
{
    LogRelFlow(("{%p} %s:enter aX=%RU32 aY=%RU32 aWidth=%RU32 aHeight=%RU32 aImage=%zu\n", this, "FramebufferOverlay::notifyUpdateImage", aX, aY, aWidth, aHeight, aImage));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        
        ArrayInConverter<BYTE> TmpImage(ComSafeArrayInArg(aImage));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYUPDATEIMAGE_ENTER(this, aX, aY, aWidth, aHeight, (uint32_t)TmpImage.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = notifyUpdateImage(aX,
                                    aY,
                                    aWidth,
                                    aHeight,
                                    TmpImage.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYUPDATEIMAGE_RETURN(this, hrc, 0 /*normal*/, aX, aY, aWidth, aHeight, (uint32_t)TmpImage.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYUPDATEIMAGE_RETURN(this, hrc, 1 /*hrc exception*/, aX, aY, aWidth, aHeight, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYUPDATEIMAGE_RETURN(this, hrc, 9 /*unhandled exception*/, aX, aY, aWidth, aHeight, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "FramebufferOverlay::notifyUpdateImage", hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::NotifyChange(ULONG aScreenId,
                                                  ULONG aXOrigin,
                                                  ULONG aYOrigin,
                                                  ULONG aWidth,
                                                  ULONG aHeight)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aXOrigin=%RU32 aYOrigin=%RU32 aWidth=%RU32 aHeight=%RU32\n", this, "FramebufferOverlay::notifyChange", aScreenId, aXOrigin, aYOrigin, aWidth, aHeight));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYCHANGE_ENTER(this, aScreenId, aXOrigin, aYOrigin, aWidth, aHeight);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = notifyChange(aScreenId,
                               aXOrigin,
                               aYOrigin,
                               aWidth,
                               aHeight);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYCHANGE_RETURN(this, hrc, 0 /*normal*/, aScreenId, aXOrigin, aYOrigin, aWidth, aHeight);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYCHANGE_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, aXOrigin, aYOrigin, aWidth, aHeight);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFYCHANGE_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, aXOrigin, aYOrigin, aWidth, aHeight);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "FramebufferOverlay::notifyChange", hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::VideoModeSupported(ULONG aWidth,
                                                        ULONG aHeight,
                                                        ULONG aBpp,
                                                        BOOL *aSupported)
{
    LogRelFlow(("{%p} %s:enter aWidth=%RU32 aHeight=%RU32 aBpp=%RU32 aSupported=%p\n", this, "FramebufferOverlay::videoModeSupported", aWidth, aHeight, aBpp, aSupported));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSupported);


        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_VIDEOMODESUPPORTED_ENTER(this, aWidth, aHeight, aBpp);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = videoModeSupported(aWidth,
                                     aHeight,
                                     aBpp,
                                     aSupported);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_VIDEOMODESUPPORTED_RETURN(this, hrc, 0 /*normal*/, aWidth, aHeight, aBpp, *aSupported != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_VIDEOMODESUPPORTED_RETURN(this, hrc, 1 /*hrc exception*/, aWidth, aHeight, aBpp, *aSupported != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_VIDEOMODESUPPORTED_RETURN(this, hrc, 9 /*unhandled exception*/, aWidth, aHeight, aBpp, *aSupported != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aSupported=%RTbool hrc=%Rhrc\n", this, "FramebufferOverlay::videoModeSupported", *aSupported, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::GetVisibleRegion(BYTE *aRectangles,
                                                      ULONG aCount,
                                                      ULONG *aCountCopied)
{
    LogRelFlow(("{%p} %s:enter aRectangles=%p aCount=%RU32 aCountCopied=%p\n", this, "FramebufferOverlay::getVisibleRegion", aRectangles, aCount, aCountCopied));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCountCopied);


        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GETVISIBLEREGION_ENTER(this, aRectangles, aCount);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVisibleRegion(aRectangles,
                                   aCount,
                                   aCountCopied);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GETVISIBLEREGION_RETURN(this, hrc, 0 /*normal*/, aRectangles, aCount, *aCountCopied);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GETVISIBLEREGION_RETURN(this, hrc, 1 /*hrc exception*/, aRectangles, aCount, *aCountCopied);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_GETVISIBLEREGION_RETURN(this, hrc, 9 /*unhandled exception*/, aRectangles, aCount, *aCountCopied);
#endif
    }

    LogRelFlow(("{%p} %s: leave aCountCopied=%RU32 hrc=%Rhrc\n", this, "FramebufferOverlay::getVisibleRegion", *aCountCopied, hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::SetVisibleRegion(BYTE *aRectangles,
                                                      ULONG aCount)
{
    LogRelFlow(("{%p} %s:enter aRectangles=%p aCount=%RU32\n", this, "FramebufferOverlay::setVisibleRegion", aRectangles, aCount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SETVISIBLEREGION_ENTER(this, aRectangles, aCount);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVisibleRegion(aRectangles,
                                   aCount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SETVISIBLEREGION_RETURN(this, hrc, 0 /*normal*/, aRectangles, aCount);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SETVISIBLEREGION_RETURN(this, hrc, 1 /*hrc exception*/, aRectangles, aCount);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_SETVISIBLEREGION_RETURN(this, hrc, 9 /*unhandled exception*/, aRectangles, aCount);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "FramebufferOverlay::setVisibleRegion", hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::ProcessVHWACommand(BYTE *aCommand,
                                                        LONG aEnmCmd,
                                                        BOOL aFromGuest)
{
    LogRelFlow(("{%p} %s:enter aCommand=%p aEnmCmd=%RI32 aFromGuest=%RTbool\n", this, "FramebufferOverlay::processVHWACommand", aCommand, aEnmCmd, aFromGuest));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_PROCESSVHWACOMMAND_ENTER(this, aCommand, aEnmCmd, aFromGuest != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = processVHWACommand(aCommand,
                                     aEnmCmd,
                                     aFromGuest != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_PROCESSVHWACOMMAND_RETURN(this, hrc, 0 /*normal*/, aCommand, aEnmCmd, aFromGuest != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_PROCESSVHWACOMMAND_RETURN(this, hrc, 1 /*hrc exception*/, aCommand, aEnmCmd, aFromGuest != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_PROCESSVHWACOMMAND_RETURN(this, hrc, 9 /*unhandled exception*/, aCommand, aEnmCmd, aFromGuest != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "FramebufferOverlay::processVHWACommand", hrc));
    return hrc;
}

STDMETHODIMP FramebufferOverlayWrap::Notify3DEvent(ULONG aType,
                                                   ComSafeArrayIn(BYTE, aData))
{
    LogRelFlow(("{%p} %s:enter aType=%RU32 aData=%zu\n", this, "FramebufferOverlay::notify3DEvent", aType, aData));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        ArrayInConverter<BYTE> TmpData(ComSafeArrayInArg(aData));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFY3DEVENT_ENTER(this, aType, (uint32_t)TmpData.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = notify3DEvent(aType,
                                TmpData.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFY3DEVENT_RETURN(this, hrc, 0 /*normal*/, aType, (uint32_t)TmpData.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFY3DEVENT_RETURN(this, hrc, 1 /*hrc exception*/, aType, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_NOTIFY3DEVENT_RETURN(this, hrc, 9 /*unhandled exception*/, aType, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "FramebufferOverlay::notify3DEvent", hrc));
    return hrc;
}

//
// IFramebufferOverlay methods
//

STDMETHODIMP FramebufferOverlayWrap::Move(ULONG aX,
                                          ULONG aY)
{
    LogRelFlow(("{%p} %s:enter aX=%RU32 aY=%RU32\n", this, "FramebufferOverlay::move", aX, aY));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_MOVE_ENTER(this, aX, aY);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = move(aX,
                       aY);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_MOVE_RETURN(this, hrc, 0 /*normal*/, aX, aY);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_MOVE_RETURN(this, hrc, 1 /*hrc exception*/, aX, aY);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FRAMEBUFFEROVERLAY_MOVE_RETURN(this, hrc, 9 /*unhandled exception*/, aX, aY);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "FramebufferOverlay::move", hrc));
    return hrc;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(FramebufferOverlayWrap)
NS_IMPL_THREADSAFE_ISUPPORTS2_CI(FramebufferOverlayWrap, IFramebufferOverlay, IFramebuffer)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "FramebufferOverlayWrap.cpp"


// ##### BEGINFILE "DisplayWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IDisplay.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_DISPLAY

#include "DisplayWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(DisplayWrap)

//
// IDisplay properties
//

STDMETHODIMP DisplayWrap::COMGETTER(GuestScreenLayout)(ComSafeArrayOut(IGuestScreenInfo *, aGuestScreenLayout))
{
    LogRelFlow(("{%p} %s: enter aGuestScreenLayout=%p\n", this, "Display::getGuestScreenLayout", aGuestScreenLayout));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGuestScreenLayout);
        ArrayComTypeOutConverter<IGuestScreenInfo> TmpGuestScreenLayout(ComSafeArrayOutArg(aGuestScreenLayout));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GET_GUESTSCREENLAYOUT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGuestScreenLayout(TmpGuestScreenLayout.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GET_GUESTSCREENLAYOUT_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpGuestScreenLayout.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GET_GUESTSCREENLAYOUT_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GET_GUESTSCREENLAYOUT_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aGuestScreenLayout=%zu hrc=%Rhrc\n", this, "Display::getGuestScreenLayout", ComSafeArraySize(*aGuestScreenLayout), hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute1IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute2IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute3IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute4IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute5IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute6IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute7IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute8IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute9IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute10IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute11IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute12IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute13IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute14IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute15IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::COMGETTER(InternalAndReservedAttribute16IDisplay)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IEventListener properties
//


//
// IDisplay methods
//

STDMETHODIMP DisplayWrap::GetScreenResolution(ULONG aScreenId,
                                              ULONG *aWidth,
                                              ULONG *aHeight,
                                              ULONG *aBitsPerPixel,
                                              LONG *aXOrigin,
                                              LONG *aYOrigin,
                                              GuestMonitorStatus_T *aGuestMonitorStatus)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aWidth=%p aHeight=%p aBitsPerPixel=%p aXOrigin=%p aYOrigin=%p aGuestMonitorStatus=%p\n", this, "Display::getScreenResolution", aScreenId, aWidth, aHeight, aBitsPerPixel, aXOrigin, aYOrigin, aGuestMonitorStatus));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWidth);
        CheckComArgOutPointerValidThrow(aHeight);
        CheckComArgOutPointerValidThrow(aBitsPerPixel);
        CheckComArgOutPointerValidThrow(aXOrigin);
        CheckComArgOutPointerValidThrow(aYOrigin);
        CheckComArgOutPointerValidThrow(aGuestMonitorStatus);


        
        
        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GETSCREENRESOLUTION_ENTER(this, aScreenId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getScreenResolution(aScreenId,
                                      aWidth,
                                      aHeight,
                                      aBitsPerPixel,
                                      aXOrigin,
                                      aYOrigin,
                                      aGuestMonitorStatus);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GETSCREENRESOLUTION_RETURN(this, hrc, 0 /*normal*/, aScreenId, *aWidth, *aHeight, *aBitsPerPixel, *aXOrigin, *aYOrigin, *aGuestMonitorStatus);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GETSCREENRESOLUTION_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, *aWidth, *aHeight, *aBitsPerPixel, *aXOrigin, *aYOrigin, *aGuestMonitorStatus);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GETSCREENRESOLUTION_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, *aWidth, *aHeight, *aBitsPerPixel, *aXOrigin, *aYOrigin, *aGuestMonitorStatus);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWidth=%RU32 *aHeight=%RU32 *aBitsPerPixel=%RU32 *aXOrigin=%RI32 *aYOrigin=%RI32 *aGuestMonitorStatus=%RU32 hrc=%Rhrc\n", this, "Display::getScreenResolution", *aWidth, *aHeight, *aBitsPerPixel, *aXOrigin, *aYOrigin, *aGuestMonitorStatus, hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::AttachFramebuffer(ULONG aScreenId,
                                            IFramebuffer *aFramebuffer,
                                            BSTR *aId)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aFramebuffer=%p aId=%p\n", this, "Display::attachFramebuffer", aScreenId, aFramebuffer, aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aId);


        
        ComTypeInConverter<IFramebuffer> TmpFramebuffer(aFramebuffer);
        UuidOutConverter TmpId(aId);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_ATTACHFRAMEBUFFER_ENTER(this, aScreenId, (void *)TmpFramebuffer.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = attachFramebuffer(aScreenId,
                                    TmpFramebuffer.ptr(),
                                    TmpId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_ATTACHFRAMEBUFFER_RETURN(this, hrc, 0 /*normal*/, aScreenId, (void *)TmpFramebuffer.ptr(), TmpId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_ATTACHFRAMEBUFFER_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_ATTACHFRAMEBUFFER_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aId=%ls hrc=%Rhrc\n", this, "Display::attachFramebuffer", *aId, hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::DetachFramebuffer(ULONG aScreenId,
                                            IN_BSTR aId)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aId=%ls\n", this, "Display::detachFramebuffer", aScreenId, aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        UuidInConverter TmpId(aId);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DETACHFRAMEBUFFER_ENTER(this, aScreenId, TmpId.uuid().toStringCurly().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = detachFramebuffer(aScreenId,
                                    TmpId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DETACHFRAMEBUFFER_RETURN(this, hrc, 0 /*normal*/, aScreenId, TmpId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DETACHFRAMEBUFFER_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DETACHFRAMEBUFFER_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::detachFramebuffer", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::QueryFramebuffer(ULONG aScreenId,
                                           IFramebuffer **aFramebuffer)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aFramebuffer=%p\n", this, "Display::queryFramebuffer", aScreenId, aFramebuffer));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFramebuffer);


        
        ComTypeOutConverter<IFramebuffer> TmpFramebuffer(aFramebuffer);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_QUERYFRAMEBUFFER_ENTER(this, aScreenId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = queryFramebuffer(aScreenId,
                                   TmpFramebuffer.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_QUERYFRAMEBUFFER_RETURN(this, hrc, 0 /*normal*/, aScreenId, (void *)TmpFramebuffer.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_QUERYFRAMEBUFFER_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_QUERYFRAMEBUFFER_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aFramebuffer=%p hrc=%Rhrc\n", this, "Display::queryFramebuffer", *aFramebuffer, hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::SetVideoModeHint(ULONG aDisplay,
                                           BOOL aEnabled,
                                           BOOL aChangeOrigin,
                                           LONG aOriginX,
                                           LONG aOriginY,
                                           ULONG aWidth,
                                           ULONG aHeight,
                                           ULONG aBitsPerPixel,
                                           BOOL aNotify)
{
    LogRelFlow(("{%p} %s:enter aDisplay=%RU32 aEnabled=%RTbool aChangeOrigin=%RTbool aOriginX=%RI32 aOriginY=%RI32 aWidth=%RU32 aHeight=%RU32 aBitsPerPixel=%RU32 aNotify=%RTbool\n", this, "Display::setVideoModeHint", aDisplay, aEnabled, aChangeOrigin, aOriginX, aOriginY, aWidth, aHeight, aBitsPerPixel, aNotify));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        
        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETVIDEOMODEHINT_ENTER(this, aDisplay, aEnabled != FALSE, aChangeOrigin != FALSE, aOriginX, aOriginY, aWidth, aHeight, aBitsPerPixel, aNotify != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVideoModeHint(aDisplay,
                                   aEnabled != FALSE,
                                   aChangeOrigin != FALSE,
                                   aOriginX,
                                   aOriginY,
                                   aWidth,
                                   aHeight,
                                   aBitsPerPixel,
                                   aNotify != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETVIDEOMODEHINT_RETURN(this, hrc, 0 /*normal*/, aDisplay, aEnabled != FALSE, aChangeOrigin != FALSE, aOriginX, aOriginY, aWidth, aHeight, aBitsPerPixel, aNotify != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETVIDEOMODEHINT_RETURN(this, hrc, 1 /*hrc exception*/, aDisplay, aEnabled != FALSE, aChangeOrigin != FALSE, aOriginX, aOriginY, aWidth, aHeight, aBitsPerPixel, aNotify != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETVIDEOMODEHINT_RETURN(this, hrc, 9 /*unhandled exception*/, aDisplay, aEnabled != FALSE, aChangeOrigin != FALSE, aOriginX, aOriginY, aWidth, aHeight, aBitsPerPixel, aNotify != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::setVideoModeHint", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::GetVideoModeHint(ULONG aDisplay,
                                           BOOL *aEnabled,
                                           BOOL *aChangeOrigin,
                                           LONG *aOriginX,
                                           LONG *aOriginY,
                                           ULONG *aWidth,
                                           ULONG *aHeight,
                                           ULONG *aBitsPerPixel)
{
    LogRelFlow(("{%p} %s:enter aDisplay=%RU32 aEnabled=%p aChangeOrigin=%p aOriginX=%p aOriginY=%p aWidth=%p aHeight=%p aBitsPerPixel=%p\n", this, "Display::getVideoModeHint", aDisplay, aEnabled, aChangeOrigin, aOriginX, aOriginY, aWidth, aHeight, aBitsPerPixel));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEnabled);
        CheckComArgOutPointerValidThrow(aChangeOrigin);
        CheckComArgOutPointerValidThrow(aOriginX);
        CheckComArgOutPointerValidThrow(aOriginY);
        CheckComArgOutPointerValidThrow(aWidth);
        CheckComArgOutPointerValidThrow(aHeight);
        CheckComArgOutPointerValidThrow(aBitsPerPixel);


        
        
        
        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GETVIDEOMODEHINT_ENTER(this, aDisplay);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVideoModeHint(aDisplay,
                                   aEnabled,
                                   aChangeOrigin,
                                   aOriginX,
                                   aOriginY,
                                   aWidth,
                                   aHeight,
                                   aBitsPerPixel);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GETVIDEOMODEHINT_RETURN(this, hrc, 0 /*normal*/, aDisplay, *aEnabled != FALSE, *aChangeOrigin != FALSE, *aOriginX, *aOriginY, *aWidth, *aHeight, *aBitsPerPixel);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GETVIDEOMODEHINT_RETURN(this, hrc, 1 /*hrc exception*/, aDisplay, *aEnabled != FALSE, *aChangeOrigin != FALSE, *aOriginX, *aOriginY, *aWidth, *aHeight, *aBitsPerPixel);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_GETVIDEOMODEHINT_RETURN(this, hrc, 9 /*unhandled exception*/, aDisplay, *aEnabled != FALSE, *aChangeOrigin != FALSE, *aOriginX, *aOriginY, *aWidth, *aHeight, *aBitsPerPixel);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEnabled=%RTbool *aChangeOrigin=%RTbool *aOriginX=%RI32 *aOriginY=%RI32 *aWidth=%RU32 *aHeight=%RU32 *aBitsPerPixel=%RU32 hrc=%Rhrc\n", this, "Display::getVideoModeHint", *aEnabled, *aChangeOrigin, *aOriginX, *aOriginY, *aWidth, *aHeight, *aBitsPerPixel, hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::SetSeamlessMode(BOOL aEnabled)
{
    LogRelFlow(("{%p} %s:enter aEnabled=%RTbool\n", this, "Display::setSeamlessMode", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETSEAMLESSMODE_ENTER(this, aEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setSeamlessMode(aEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETSEAMLESSMODE_RETURN(this, hrc, 0 /*normal*/, aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETSEAMLESSMODE_RETURN(this, hrc, 1 /*hrc exception*/, aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETSEAMLESSMODE_RETURN(this, hrc, 9 /*unhandled exception*/, aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::setSeamlessMode", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::TakeScreenShot(ULONG aScreenId,
                                         BYTE *aAddress,
                                         ULONG aWidth,
                                         ULONG aHeight,
                                         BitmapFormat_T aBitmapFormat)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aAddress=%p aWidth=%RU32 aHeight=%RU32 aBitmapFormat=%RU32\n", this, "Display::takeScreenShot", aScreenId, aAddress, aWidth, aHeight, aBitmapFormat));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_TAKESCREENSHOT_ENTER(this, aScreenId, aAddress, aWidth, aHeight, aBitmapFormat);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = takeScreenShot(aScreenId,
                                 aAddress,
                                 aWidth,
                                 aHeight,
                                 aBitmapFormat);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_TAKESCREENSHOT_RETURN(this, hrc, 0 /*normal*/, aScreenId, aAddress, aWidth, aHeight, aBitmapFormat);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_TAKESCREENSHOT_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, aAddress, aWidth, aHeight, aBitmapFormat);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_TAKESCREENSHOT_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, aAddress, aWidth, aHeight, aBitmapFormat);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::takeScreenShot", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::TakeScreenShotToArray(ULONG aScreenId,
                                                ULONG aWidth,
                                                ULONG aHeight,
                                                BitmapFormat_T aBitmapFormat,
                                                ComSafeArrayOut(BYTE, aScreenData))
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aWidth=%RU32 aHeight=%RU32 aBitmapFormat=%RU32 aScreenData=%p\n", this, "Display::takeScreenShotToArray", aScreenId, aWidth, aHeight, aBitmapFormat, aScreenData));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aScreenData);


        
        
        
        
        ArrayOutConverter<BYTE> TmpScreenData(ComSafeArrayOutArg(aScreenData));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_TAKESCREENSHOTTOARRAY_ENTER(this, aScreenId, aWidth, aHeight, aBitmapFormat);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = takeScreenShotToArray(aScreenId,
                                        aWidth,
                                        aHeight,
                                        aBitmapFormat,
                                        TmpScreenData.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_TAKESCREENSHOTTOARRAY_RETURN(this, hrc, 0 /*normal*/, aScreenId, aWidth, aHeight, aBitmapFormat, (uint32_t)TmpScreenData.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_TAKESCREENSHOTTOARRAY_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, aWidth, aHeight, aBitmapFormat, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_TAKESCREENSHOTTOARRAY_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, aWidth, aHeight, aBitmapFormat, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aScreenData=%zu hrc=%Rhrc\n", this, "Display::takeScreenShotToArray", ComSafeArraySize(*aScreenData), hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::DrawToScreen(ULONG aScreenId,
                                       BYTE *aAddress,
                                       ULONG aX,
                                       ULONG aY,
                                       ULONG aWidth,
                                       ULONG aHeight)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aAddress=%p aX=%RU32 aY=%RU32 aWidth=%RU32 aHeight=%RU32\n", this, "Display::drawToScreen", aScreenId, aAddress, aX, aY, aWidth, aHeight));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DRAWTOSCREEN_ENTER(this, aScreenId, aAddress, aX, aY, aWidth, aHeight);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = drawToScreen(aScreenId,
                               aAddress,
                               aX,
                               aY,
                               aWidth,
                               aHeight);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DRAWTOSCREEN_RETURN(this, hrc, 0 /*normal*/, aScreenId, aAddress, aX, aY, aWidth, aHeight);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DRAWTOSCREEN_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, aAddress, aX, aY, aWidth, aHeight);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DRAWTOSCREEN_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, aAddress, aX, aY, aWidth, aHeight);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::drawToScreen", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::InvalidateAndUpdate()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Display::invalidateAndUpdate"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_INVALIDATEANDUPDATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = invalidateAndUpdate();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_INVALIDATEANDUPDATE_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_INVALIDATEANDUPDATE_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_INVALIDATEANDUPDATE_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::invalidateAndUpdate", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::InvalidateAndUpdateScreen(ULONG aScreenId)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32\n", this, "Display::invalidateAndUpdateScreen", aScreenId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_INVALIDATEANDUPDATESCREEN_ENTER(this, aScreenId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = invalidateAndUpdateScreen(aScreenId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_INVALIDATEANDUPDATESCREEN_RETURN(this, hrc, 0 /*normal*/, aScreenId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_INVALIDATEANDUPDATESCREEN_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_INVALIDATEANDUPDATESCREEN_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::invalidateAndUpdateScreen", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::CompleteVHWACommand(BYTE *aCommand)
{
    LogRelFlow(("{%p} %s:enter aCommand=%p\n", this, "Display::completeVHWACommand", aCommand));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_COMPLETEVHWACOMMAND_ENTER(this, aCommand);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = completeVHWACommand(aCommand);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_COMPLETEVHWACOMMAND_RETURN(this, hrc, 0 /*normal*/, aCommand);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_COMPLETEVHWACOMMAND_RETURN(this, hrc, 1 /*hrc exception*/, aCommand);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_COMPLETEVHWACOMMAND_RETURN(this, hrc, 9 /*unhandled exception*/, aCommand);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::completeVHWACommand", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::ViewportChanged(ULONG aScreenId,
                                          ULONG aX,
                                          ULONG aY,
                                          ULONG aWidth,
                                          ULONG aHeight)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aX=%RU32 aY=%RU32 aWidth=%RU32 aHeight=%RU32\n", this, "Display::viewportChanged", aScreenId, aX, aY, aWidth, aHeight));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_VIEWPORTCHANGED_ENTER(this, aScreenId, aX, aY, aWidth, aHeight);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = viewportChanged(aScreenId,
                                  aX,
                                  aY,
                                  aWidth,
                                  aHeight);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_VIEWPORTCHANGED_RETURN(this, hrc, 0 /*normal*/, aScreenId, aX, aY, aWidth, aHeight);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_VIEWPORTCHANGED_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, aX, aY, aWidth, aHeight);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_VIEWPORTCHANGED_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, aX, aY, aWidth, aHeight);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::viewportChanged", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::QuerySourceBitmap(ULONG aScreenId,
                                            IDisplaySourceBitmap **aDisplaySourceBitmap)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aDisplaySourceBitmap=%p\n", this, "Display::querySourceBitmap", aScreenId, aDisplaySourceBitmap));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDisplaySourceBitmap);


        
        ComTypeOutConverter<IDisplaySourceBitmap> TmpDisplaySourceBitmap(aDisplaySourceBitmap);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_QUERYSOURCEBITMAP_ENTER(this, aScreenId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = querySourceBitmap(aScreenId,
                                    TmpDisplaySourceBitmap.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_QUERYSOURCEBITMAP_RETURN(this, hrc, 0 /*normal*/, aScreenId, (void *)TmpDisplaySourceBitmap.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_QUERYSOURCEBITMAP_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_QUERYSOURCEBITMAP_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDisplaySourceBitmap=%p hrc=%Rhrc\n", this, "Display::querySourceBitmap", *aDisplaySourceBitmap, hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::NotifyScaleFactorChange(ULONG aScreenId,
                                                  ULONG aU32ScaleFactorWMultiplied,
                                                  ULONG aU32ScaleFactorHMultiplied)
{
    LogRelFlow(("{%p} %s:enter aScreenId=%RU32 aU32ScaleFactorWMultiplied=%RU32 aU32ScaleFactorHMultiplied=%RU32\n", this, "Display::notifyScaleFactorChange", aScreenId, aU32ScaleFactorWMultiplied, aU32ScaleFactorHMultiplied));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_NOTIFYSCALEFACTORCHANGE_ENTER(this, aScreenId, aU32ScaleFactorWMultiplied, aU32ScaleFactorHMultiplied);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = notifyScaleFactorChange(aScreenId,
                                          aU32ScaleFactorWMultiplied,
                                          aU32ScaleFactorHMultiplied);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_NOTIFYSCALEFACTORCHANGE_RETURN(this, hrc, 0 /*normal*/, aScreenId, aU32ScaleFactorWMultiplied, aU32ScaleFactorHMultiplied);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_NOTIFYSCALEFACTORCHANGE_RETURN(this, hrc, 1 /*hrc exception*/, aScreenId, aU32ScaleFactorWMultiplied, aU32ScaleFactorHMultiplied);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_NOTIFYSCALEFACTORCHANGE_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenId, aU32ScaleFactorWMultiplied, aU32ScaleFactorHMultiplied);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::notifyScaleFactorChange", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::NotifyHiDPIOutputPolicyChange(BOOL aFUnscaledHiDPI)
{
    LogRelFlow(("{%p} %s:enter aFUnscaledHiDPI=%RTbool\n", this, "Display::notifyHiDPIOutputPolicyChange", aFUnscaledHiDPI));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_NOTIFYHIDPIOUTPUTPOLICYCHANGE_ENTER(this, aFUnscaledHiDPI != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = notifyHiDPIOutputPolicyChange(aFUnscaledHiDPI != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_NOTIFYHIDPIOUTPUTPOLICYCHANGE_RETURN(this, hrc, 0 /*normal*/, aFUnscaledHiDPI != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_NOTIFYHIDPIOUTPUTPOLICYCHANGE_RETURN(this, hrc, 1 /*hrc exception*/, aFUnscaledHiDPI != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_NOTIFYHIDPIOUTPUTPOLICYCHANGE_RETURN(this, hrc, 9 /*unhandled exception*/, aFUnscaledHiDPI != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::notifyHiDPIOutputPolicyChange", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::SetScreenLayout(ScreenLayoutMode_T aScreenLayoutMode,
                                          ComSafeArrayIn(IGuestScreenInfo *, aGuestScreenInfo))
{
    LogRelFlow(("{%p} %s:enter aScreenLayoutMode=%RU32 aGuestScreenInfo=%zu\n", this, "Display::setScreenLayout", aScreenLayoutMode, aGuestScreenInfo));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        ArrayComTypeInConverter<IGuestScreenInfo> TmpGuestScreenInfo(ComSafeArrayInArg(aGuestScreenInfo));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETSCREENLAYOUT_ENTER(this, aScreenLayoutMode, (uint32_t)TmpGuestScreenInfo.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setScreenLayout(aScreenLayoutMode,
                                  TmpGuestScreenInfo.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETSCREENLAYOUT_RETURN(this, hrc, 0 /*normal*/, aScreenLayoutMode, (uint32_t)TmpGuestScreenInfo.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETSCREENLAYOUT_RETURN(this, hrc, 1 /*hrc exception*/, aScreenLayoutMode, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_SETSCREENLAYOUT_RETURN(this, hrc, 9 /*unhandled exception*/, aScreenLayoutMode, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::setScreenLayout", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::DetachScreens(ComSafeArrayIn(LONG, aScreenIds))
{
    LogRelFlow(("{%p} %s:enter aScreenIds=%zu\n", this, "Display::detachScreens", aScreenIds));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ArrayInConverter<LONG> TmpScreenIds(ComSafeArrayInArg(aScreenIds));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DETACHSCREENS_ENTER(this, (uint32_t)TmpScreenIds.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = detachScreens(TmpScreenIds.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DETACHSCREENS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpScreenIds.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DETACHSCREENS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_DETACHSCREENS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::detachScreens", hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::CreateGuestScreenInfo(ULONG aDisplay,
                                                GuestMonitorStatus_T aStatus,
                                                BOOL aPrimary,
                                                BOOL aChangeOrigin,
                                                LONG aOriginX,
                                                LONG aOriginY,
                                                ULONG aWidth,
                                                ULONG aHeight,
                                                ULONG aBitsPerPixel,
                                                IGuestScreenInfo **aGuestScreenInfo)
{
    LogRelFlow(("{%p} %s:enter aDisplay=%RU32 aStatus=%RU32 aPrimary=%RTbool aChangeOrigin=%RTbool aOriginX=%RI32 aOriginY=%RI32 aWidth=%RU32 aHeight=%RU32 aBitsPerPixel=%RU32 aGuestScreenInfo=%p\n", this, "Display::createGuestScreenInfo", aDisplay, aStatus, aPrimary, aChangeOrigin, aOriginX, aOriginY, aWidth, aHeight, aBitsPerPixel, aGuestScreenInfo));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGuestScreenInfo);


        
        
        
        
        
        
        
        
        
        ComTypeOutConverter<IGuestScreenInfo> TmpGuestScreenInfo(aGuestScreenInfo);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_CREATEGUESTSCREENINFO_ENTER(this, aDisplay, aStatus, aPrimary != FALSE, aChangeOrigin != FALSE, aOriginX, aOriginY, aWidth, aHeight, aBitsPerPixel);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createGuestScreenInfo(aDisplay,
                                        aStatus,
                                        aPrimary != FALSE,
                                        aChangeOrigin != FALSE,
                                        aOriginX,
                                        aOriginY,
                                        aWidth,
                                        aHeight,
                                        aBitsPerPixel,
                                        TmpGuestScreenInfo.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_CREATEGUESTSCREENINFO_RETURN(this, hrc, 0 /*normal*/, aDisplay, aStatus, aPrimary != FALSE, aChangeOrigin != FALSE, aOriginX, aOriginY, aWidth, aHeight, aBitsPerPixel, (void *)TmpGuestScreenInfo.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_CREATEGUESTSCREENINFO_RETURN(this, hrc, 1 /*hrc exception*/, aDisplay, aStatus, aPrimary != FALSE, aChangeOrigin != FALSE, aOriginX, aOriginY, aWidth, aHeight, aBitsPerPixel, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_CREATEGUESTSCREENINFO_RETURN(this, hrc, 9 /*unhandled exception*/, aDisplay, aStatus, aPrimary != FALSE, aChangeOrigin != FALSE, aOriginX, aOriginY, aWidth, aHeight, aBitsPerPixel, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aGuestScreenInfo=%p hrc=%Rhrc\n", this, "Display::createGuestScreenInfo", *aGuestScreenInfo, hrc));
    return hrc;
}

STDMETHODIMP DisplayWrap::InternalAndReservedMethod1IDisplay()
{
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::InternalAndReservedMethod2IDisplay()
{
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::InternalAndReservedMethod3IDisplay()
{
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::InternalAndReservedMethod4IDisplay()
{
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::InternalAndReservedMethod5IDisplay()
{
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::InternalAndReservedMethod6IDisplay()
{
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::InternalAndReservedMethod7IDisplay()
{
    return E_NOTIMPL;
}

STDMETHODIMP DisplayWrap::InternalAndReservedMethod8IDisplay()
{
    return E_NOTIMPL;
}

//
// IEventListener methods
//

STDMETHODIMP DisplayWrap::HandleEvent(IEvent *aEvent)
{
    LogRelFlow(("{%p} %s:enter aEvent=%p\n", this, "Display::handleEvent", aEvent));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ComTypeInConverter<IEvent> TmpEvent(aEvent);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_HANDLEEVENT_ENTER(this, (void *)TmpEvent.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = handleEvent(TmpEvent.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_HANDLEEVENT_RETURN(this, hrc, 0 /*normal*/, (void *)TmpEvent.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_HANDLEEVENT_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_DISPLAY_HANDLEEVENT_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Display::handleEvent", hrc));
    return hrc;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(DisplayWrap)
NS_IMPL_THREADSAFE_ISUPPORTS2_CI(DisplayWrap, IDisplay, IEventListener)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "DisplayWrap.cpp"


// ##### BEGINFILE "NetworkAdapterWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for INetworkAdapter.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_NETWORKADAPTER

#include "NetworkAdapterWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(NetworkAdapterWrap)

//
// INetworkAdapter properties
//

STDMETHODIMP NetworkAdapterWrap::COMGETTER(AdapterType)(NetworkAdapterType_T *aAdapterType)
{
    LogRelFlow(("{%p} %s: enter aAdapterType=%p\n", this, "NetworkAdapter::getAdapterType", aAdapterType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAdapterType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ADAPTERTYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAdapterType(aAdapterType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ADAPTERTYPE_RETURN(this, hrc, 0 /*normal*/,*aAdapterType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ADAPTERTYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aAdapterType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ADAPTERTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aAdapterType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAdapterType=%RU32 hrc=%Rhrc\n", this, "NetworkAdapter::getAdapterType", *aAdapterType, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(AdapterType)(NetworkAdapterType_T aAdapterType)
{
    LogRelFlow(("{%p} %s: enter aAdapterType=%RU32\n", this, "NetworkAdapter::setAdapterType", aAdapterType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ADAPTERTYPE_ENTER(this, aAdapterType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAdapterType(aAdapterType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ADAPTERTYPE_RETURN(this, hrc, 0 /*normal*/,aAdapterType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ADAPTERTYPE_RETURN(this, hrc, 1 /*hrc exception*/,aAdapterType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ADAPTERTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,aAdapterType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setAdapterType", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(Slot)(ULONG *aSlot)
{
    LogRelFlow(("{%p} %s: enter aSlot=%p\n", this, "NetworkAdapter::getSlot", aSlot));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSlot);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_SLOT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSlot(aSlot);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_SLOT_RETURN(this, hrc, 0 /*normal*/,*aSlot);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_SLOT_RETURN(this, hrc, 1 /*hrc exception*/,*aSlot);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_SLOT_RETURN(this, hrc, 9 /*unhandled exception*/,*aSlot);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSlot=%RU32 hrc=%Rhrc\n", this, "NetworkAdapter::getSlot", *aSlot, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(Enabled)(BOOL *aEnabled)
{
    LogRelFlow(("{%p} %s: enter aEnabled=%p\n", this, "NetworkAdapter::getEnabled", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEnabled(aEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ENABLED_RETURN(this, hrc, 0 /*normal*/,*aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEnabled=%RTbool hrc=%Rhrc\n", this, "NetworkAdapter::getEnabled", *aEnabled, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(Enabled)(BOOL aEnabled)
{
    LogRelFlow(("{%p} %s: enter aEnabled=%RTbool\n", this, "NetworkAdapter::setEnabled", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ENABLED_ENTER(this, aEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setEnabled(aEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ENABLED_RETURN(this, hrc, 0 /*normal*/,aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setEnabled", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(MACAddress)(BSTR *aMACAddress)
{
    LogRelFlow(("{%p} %s: enter aMACAddress=%p\n", this, "NetworkAdapter::getMACAddress", aMACAddress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMACAddress);
        BSTROutConverter TmpMACAddress(aMACAddress);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_MACADDRESS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMACAddress(TmpMACAddress.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_MACADDRESS_RETURN(this, hrc, 0 /*normal*/,TmpMACAddress.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_MACADDRESS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_MACADDRESS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMACAddress=%ls hrc=%Rhrc\n", this, "NetworkAdapter::getMACAddress", *aMACAddress, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(MACAddress)(IN_BSTR aMACAddress)
{
    LogRelFlow(("{%p} %s: enter aMACAddress=%ls\n", this, "NetworkAdapter::setMACAddress", aMACAddress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpMACAddress(aMACAddress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_MACADDRESS_ENTER(this, TmpMACAddress.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMACAddress(TmpMACAddress.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_MACADDRESS_RETURN(this, hrc, 0 /*normal*/,TmpMACAddress.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_MACADDRESS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_MACADDRESS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setMACAddress", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(AttachmentType)(NetworkAttachmentType_T *aAttachmentType)
{
    LogRelFlow(("{%p} %s: enter aAttachmentType=%p\n", this, "NetworkAdapter::getAttachmentType", aAttachmentType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAttachmentType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ATTACHMENTTYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAttachmentType(aAttachmentType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ATTACHMENTTYPE_RETURN(this, hrc, 0 /*normal*/,*aAttachmentType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ATTACHMENTTYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aAttachmentType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_ATTACHMENTTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aAttachmentType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAttachmentType=%RU32 hrc=%Rhrc\n", this, "NetworkAdapter::getAttachmentType", *aAttachmentType, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(AttachmentType)(NetworkAttachmentType_T aAttachmentType)
{
    LogRelFlow(("{%p} %s: enter aAttachmentType=%RU32\n", this, "NetworkAdapter::setAttachmentType", aAttachmentType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ATTACHMENTTYPE_ENTER(this, aAttachmentType);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAttachmentType(aAttachmentType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ATTACHMENTTYPE_RETURN(this, hrc, 0 /*normal*/,aAttachmentType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ATTACHMENTTYPE_RETURN(this, hrc, 1 /*hrc exception*/,aAttachmentType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_ATTACHMENTTYPE_RETURN(this, hrc, 9 /*unhandled exception*/,aAttachmentType);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setAttachmentType", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(BridgedInterface)(BSTR *aBridgedInterface)
{
    LogRelFlow(("{%p} %s: enter aBridgedInterface=%p\n", this, "NetworkAdapter::getBridgedInterface", aBridgedInterface));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBridgedInterface);
        BSTROutConverter TmpBridgedInterface(aBridgedInterface);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BRIDGEDINTERFACE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBridgedInterface(TmpBridgedInterface.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BRIDGEDINTERFACE_RETURN(this, hrc, 0 /*normal*/,TmpBridgedInterface.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BRIDGEDINTERFACE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BRIDGEDINTERFACE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBridgedInterface=%ls hrc=%Rhrc\n", this, "NetworkAdapter::getBridgedInterface", *aBridgedInterface, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(BridgedInterface)(IN_BSTR aBridgedInterface)
{
    LogRelFlow(("{%p} %s: enter aBridgedInterface=%ls\n", this, "NetworkAdapter::setBridgedInterface", aBridgedInterface));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpBridgedInterface(aBridgedInterface);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BRIDGEDINTERFACE_ENTER(this, TmpBridgedInterface.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setBridgedInterface(TmpBridgedInterface.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BRIDGEDINTERFACE_RETURN(this, hrc, 0 /*normal*/,TmpBridgedInterface.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BRIDGEDINTERFACE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BRIDGEDINTERFACE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setBridgedInterface", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(HostOnlyInterface)(BSTR *aHostOnlyInterface)
{
    LogRelFlow(("{%p} %s: enter aHostOnlyInterface=%p\n", this, "NetworkAdapter::getHostOnlyInterface", aHostOnlyInterface));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHostOnlyInterface);
        BSTROutConverter TmpHostOnlyInterface(aHostOnlyInterface);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_HOSTONLYINTERFACE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHostOnlyInterface(TmpHostOnlyInterface.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_HOSTONLYINTERFACE_RETURN(this, hrc, 0 /*normal*/,TmpHostOnlyInterface.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_HOSTONLYINTERFACE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_HOSTONLYINTERFACE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHostOnlyInterface=%ls hrc=%Rhrc\n", this, "NetworkAdapter::getHostOnlyInterface", *aHostOnlyInterface, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(HostOnlyInterface)(IN_BSTR aHostOnlyInterface)
{
    LogRelFlow(("{%p} %s: enter aHostOnlyInterface=%ls\n", this, "NetworkAdapter::setHostOnlyInterface", aHostOnlyInterface));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpHostOnlyInterface(aHostOnlyInterface);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_HOSTONLYINTERFACE_ENTER(this, TmpHostOnlyInterface.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setHostOnlyInterface(TmpHostOnlyInterface.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_HOSTONLYINTERFACE_RETURN(this, hrc, 0 /*normal*/,TmpHostOnlyInterface.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_HOSTONLYINTERFACE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_HOSTONLYINTERFACE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setHostOnlyInterface", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(InternalNetwork)(BSTR *aInternalNetwork)
{
    LogRelFlow(("{%p} %s: enter aInternalNetwork=%p\n", this, "NetworkAdapter::getInternalNetwork", aInternalNetwork));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aInternalNetwork);
        BSTROutConverter TmpInternalNetwork(aInternalNetwork);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_INTERNALNETWORK_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getInternalNetwork(TmpInternalNetwork.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_INTERNALNETWORK_RETURN(this, hrc, 0 /*normal*/,TmpInternalNetwork.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_INTERNALNETWORK_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_INTERNALNETWORK_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aInternalNetwork=%ls hrc=%Rhrc\n", this, "NetworkAdapter::getInternalNetwork", *aInternalNetwork, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(InternalNetwork)(IN_BSTR aInternalNetwork)
{
    LogRelFlow(("{%p} %s: enter aInternalNetwork=%ls\n", this, "NetworkAdapter::setInternalNetwork", aInternalNetwork));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpInternalNetwork(aInternalNetwork);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_INTERNALNETWORK_ENTER(this, TmpInternalNetwork.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setInternalNetwork(TmpInternalNetwork.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_INTERNALNETWORK_RETURN(this, hrc, 0 /*normal*/,TmpInternalNetwork.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_INTERNALNETWORK_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_INTERNALNETWORK_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setInternalNetwork", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(NATNetwork)(BSTR *aNATNetwork)
{
    LogRelFlow(("{%p} %s: enter aNATNetwork=%p\n", this, "NetworkAdapter::getNATNetwork", aNATNetwork));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNATNetwork);
        BSTROutConverter TmpNATNetwork(aNATNetwork);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_NATNETWORK_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getNATNetwork(TmpNATNetwork.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_NATNETWORK_RETURN(this, hrc, 0 /*normal*/,TmpNATNetwork.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_NATNETWORK_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_NATNETWORK_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNATNetwork=%ls hrc=%Rhrc\n", this, "NetworkAdapter::getNATNetwork", *aNATNetwork, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(NATNetwork)(IN_BSTR aNATNetwork)
{
    LogRelFlow(("{%p} %s: enter aNATNetwork=%ls\n", this, "NetworkAdapter::setNATNetwork", aNATNetwork));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpNATNetwork(aNATNetwork);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_NATNETWORK_ENTER(this, TmpNATNetwork.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setNATNetwork(TmpNATNetwork.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_NATNETWORK_RETURN(this, hrc, 0 /*normal*/,TmpNATNetwork.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_NATNETWORK_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_NATNETWORK_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setNATNetwork", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(GenericDriver)(BSTR *aGenericDriver)
{
    LogRelFlow(("{%p} %s: enter aGenericDriver=%p\n", this, "NetworkAdapter::getGenericDriver", aGenericDriver));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGenericDriver);
        BSTROutConverter TmpGenericDriver(aGenericDriver);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_GENERICDRIVER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGenericDriver(TmpGenericDriver.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_GENERICDRIVER_RETURN(this, hrc, 0 /*normal*/,TmpGenericDriver.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_GENERICDRIVER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_GENERICDRIVER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aGenericDriver=%ls hrc=%Rhrc\n", this, "NetworkAdapter::getGenericDriver", *aGenericDriver, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(GenericDriver)(IN_BSTR aGenericDriver)
{
    LogRelFlow(("{%p} %s: enter aGenericDriver=%ls\n", this, "NetworkAdapter::setGenericDriver", aGenericDriver));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpGenericDriver(aGenericDriver);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_GENERICDRIVER_ENTER(this, TmpGenericDriver.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setGenericDriver(TmpGenericDriver.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_GENERICDRIVER_RETURN(this, hrc, 0 /*normal*/,TmpGenericDriver.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_GENERICDRIVER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_GENERICDRIVER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setGenericDriver", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(CloudNetwork)(BSTR *aCloudNetwork)
{
    LogRelFlow(("{%p} %s: enter aCloudNetwork=%p\n", this, "NetworkAdapter::getCloudNetwork", aCloudNetwork));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCloudNetwork);
        BSTROutConverter TmpCloudNetwork(aCloudNetwork);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_CLOUDNETWORK_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCloudNetwork(TmpCloudNetwork.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_CLOUDNETWORK_RETURN(this, hrc, 0 /*normal*/,TmpCloudNetwork.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_CLOUDNETWORK_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_CLOUDNETWORK_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCloudNetwork=%ls hrc=%Rhrc\n", this, "NetworkAdapter::getCloudNetwork", *aCloudNetwork, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(CloudNetwork)(IN_BSTR aCloudNetwork)
{
    LogRelFlow(("{%p} %s: enter aCloudNetwork=%ls\n", this, "NetworkAdapter::setCloudNetwork", aCloudNetwork));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpCloudNetwork(aCloudNetwork);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_CLOUDNETWORK_ENTER(this, TmpCloudNetwork.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCloudNetwork(TmpCloudNetwork.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_CLOUDNETWORK_RETURN(this, hrc, 0 /*normal*/,TmpCloudNetwork.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_CLOUDNETWORK_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_CLOUDNETWORK_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setCloudNetwork", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(CableConnected)(BOOL *aCableConnected)
{
    LogRelFlow(("{%p} %s: enter aCableConnected=%p\n", this, "NetworkAdapter::getCableConnected", aCableConnected));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCableConnected);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_CABLECONNECTED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCableConnected(aCableConnected);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_CABLECONNECTED_RETURN(this, hrc, 0 /*normal*/,*aCableConnected != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_CABLECONNECTED_RETURN(this, hrc, 1 /*hrc exception*/,*aCableConnected != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_CABLECONNECTED_RETURN(this, hrc, 9 /*unhandled exception*/,*aCableConnected != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCableConnected=%RTbool hrc=%Rhrc\n", this, "NetworkAdapter::getCableConnected", *aCableConnected, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(CableConnected)(BOOL aCableConnected)
{
    LogRelFlow(("{%p} %s: enter aCableConnected=%RTbool\n", this, "NetworkAdapter::setCableConnected", aCableConnected));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_CABLECONNECTED_ENTER(this, aCableConnected != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCableConnected(aCableConnected != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_CABLECONNECTED_RETURN(this, hrc, 0 /*normal*/,aCableConnected != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_CABLECONNECTED_RETURN(this, hrc, 1 /*hrc exception*/,aCableConnected != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_CABLECONNECTED_RETURN(this, hrc, 9 /*unhandled exception*/,aCableConnected != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setCableConnected", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(LineSpeed)(ULONG *aLineSpeed)
{
    LogRelFlow(("{%p} %s: enter aLineSpeed=%p\n", this, "NetworkAdapter::getLineSpeed", aLineSpeed));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLineSpeed);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_LINESPEED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLineSpeed(aLineSpeed);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_LINESPEED_RETURN(this, hrc, 0 /*normal*/,*aLineSpeed);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_LINESPEED_RETURN(this, hrc, 1 /*hrc exception*/,*aLineSpeed);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_LINESPEED_RETURN(this, hrc, 9 /*unhandled exception*/,*aLineSpeed);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLineSpeed=%RU32 hrc=%Rhrc\n", this, "NetworkAdapter::getLineSpeed", *aLineSpeed, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(LineSpeed)(ULONG aLineSpeed)
{
    LogRelFlow(("{%p} %s: enter aLineSpeed=%RU32\n", this, "NetworkAdapter::setLineSpeed", aLineSpeed));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_LINESPEED_ENTER(this, aLineSpeed);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setLineSpeed(aLineSpeed);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_LINESPEED_RETURN(this, hrc, 0 /*normal*/,aLineSpeed);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_LINESPEED_RETURN(this, hrc, 1 /*hrc exception*/,aLineSpeed);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_LINESPEED_RETURN(this, hrc, 9 /*unhandled exception*/,aLineSpeed);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setLineSpeed", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(PromiscModePolicy)(NetworkAdapterPromiscModePolicy_T *aPromiscModePolicy)
{
    LogRelFlow(("{%p} %s: enter aPromiscModePolicy=%p\n", this, "NetworkAdapter::getPromiscModePolicy", aPromiscModePolicy));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPromiscModePolicy);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_PROMISCMODEPOLICY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPromiscModePolicy(aPromiscModePolicy);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_PROMISCMODEPOLICY_RETURN(this, hrc, 0 /*normal*/,*aPromiscModePolicy);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_PROMISCMODEPOLICY_RETURN(this, hrc, 1 /*hrc exception*/,*aPromiscModePolicy);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_PROMISCMODEPOLICY_RETURN(this, hrc, 9 /*unhandled exception*/,*aPromiscModePolicy);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPromiscModePolicy=%RU32 hrc=%Rhrc\n", this, "NetworkAdapter::getPromiscModePolicy", *aPromiscModePolicy, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(PromiscModePolicy)(NetworkAdapterPromiscModePolicy_T aPromiscModePolicy)
{
    LogRelFlow(("{%p} %s: enter aPromiscModePolicy=%RU32\n", this, "NetworkAdapter::setPromiscModePolicy", aPromiscModePolicy));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_PROMISCMODEPOLICY_ENTER(this, aPromiscModePolicy);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setPromiscModePolicy(aPromiscModePolicy);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_PROMISCMODEPOLICY_RETURN(this, hrc, 0 /*normal*/,aPromiscModePolicy);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_PROMISCMODEPOLICY_RETURN(this, hrc, 1 /*hrc exception*/,aPromiscModePolicy);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_PROMISCMODEPOLICY_RETURN(this, hrc, 9 /*unhandled exception*/,aPromiscModePolicy);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setPromiscModePolicy", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(TraceEnabled)(BOOL *aTraceEnabled)
{
    LogRelFlow(("{%p} %s: enter aTraceEnabled=%p\n", this, "NetworkAdapter::getTraceEnabled", aTraceEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aTraceEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_TRACEENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getTraceEnabled(aTraceEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_TRACEENABLED_RETURN(this, hrc, 0 /*normal*/,*aTraceEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_TRACEENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aTraceEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_TRACEENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aTraceEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aTraceEnabled=%RTbool hrc=%Rhrc\n", this, "NetworkAdapter::getTraceEnabled", *aTraceEnabled, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(TraceEnabled)(BOOL aTraceEnabled)
{
    LogRelFlow(("{%p} %s: enter aTraceEnabled=%RTbool\n", this, "NetworkAdapter::setTraceEnabled", aTraceEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_TRACEENABLED_ENTER(this, aTraceEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setTraceEnabled(aTraceEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_TRACEENABLED_RETURN(this, hrc, 0 /*normal*/,aTraceEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_TRACEENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aTraceEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_TRACEENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aTraceEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setTraceEnabled", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(TraceFile)(BSTR *aTraceFile)
{
    LogRelFlow(("{%p} %s: enter aTraceFile=%p\n", this, "NetworkAdapter::getTraceFile", aTraceFile));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aTraceFile);
        BSTROutConverter TmpTraceFile(aTraceFile);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_TRACEFILE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getTraceFile(TmpTraceFile.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_TRACEFILE_RETURN(this, hrc, 0 /*normal*/,TmpTraceFile.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_TRACEFILE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_TRACEFILE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aTraceFile=%ls hrc=%Rhrc\n", this, "NetworkAdapter::getTraceFile", *aTraceFile, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(TraceFile)(IN_BSTR aTraceFile)
{
    LogRelFlow(("{%p} %s: enter aTraceFile=%ls\n", this, "NetworkAdapter::setTraceFile", aTraceFile));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpTraceFile(aTraceFile);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_TRACEFILE_ENTER(this, TmpTraceFile.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setTraceFile(TmpTraceFile.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_TRACEFILE_RETURN(this, hrc, 0 /*normal*/,TmpTraceFile.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_TRACEFILE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_TRACEFILE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setTraceFile", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(NATEngine)(INATEngine **aNATEngine)
{
    LogRelFlow(("{%p} %s: enter aNATEngine=%p\n", this, "NetworkAdapter::getNATEngine", aNATEngine));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNATEngine);
        ComTypeOutConverter<INATEngine> TmpNATEngine(aNATEngine);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_NATENGINE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getNATEngine(TmpNATEngine.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_NATENGINE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpNATEngine.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_NATENGINE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_NATENGINE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNATEngine=%p hrc=%Rhrc\n", this, "NetworkAdapter::getNATEngine", *aNATEngine, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(BootPriority)(ULONG *aBootPriority)
{
    LogRelFlow(("{%p} %s: enter aBootPriority=%p\n", this, "NetworkAdapter::getBootPriority", aBootPriority));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBootPriority);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BOOTPRIORITY_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBootPriority(aBootPriority);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BOOTPRIORITY_RETURN(this, hrc, 0 /*normal*/,*aBootPriority);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BOOTPRIORITY_RETURN(this, hrc, 1 /*hrc exception*/,*aBootPriority);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BOOTPRIORITY_RETURN(this, hrc, 9 /*unhandled exception*/,*aBootPriority);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBootPriority=%RU32 hrc=%Rhrc\n", this, "NetworkAdapter::getBootPriority", *aBootPriority, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(BootPriority)(ULONG aBootPriority)
{
    LogRelFlow(("{%p} %s: enter aBootPriority=%RU32\n", this, "NetworkAdapter::setBootPriority", aBootPriority));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BOOTPRIORITY_ENTER(this, aBootPriority);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setBootPriority(aBootPriority);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BOOTPRIORITY_RETURN(this, hrc, 0 /*normal*/,aBootPriority);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BOOTPRIORITY_RETURN(this, hrc, 1 /*hrc exception*/,aBootPriority);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BOOTPRIORITY_RETURN(this, hrc, 9 /*unhandled exception*/,aBootPriority);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setBootPriority", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(BandwidthGroup)(IBandwidthGroup **aBandwidthGroup)
{
    LogRelFlow(("{%p} %s: enter aBandwidthGroup=%p\n", this, "NetworkAdapter::getBandwidthGroup", aBandwidthGroup));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBandwidthGroup);
        ComTypeOutConverter<IBandwidthGroup> TmpBandwidthGroup(aBandwidthGroup);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BANDWIDTHGROUP_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBandwidthGroup(TmpBandwidthGroup.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BANDWIDTHGROUP_RETURN(this, hrc, 0 /*normal*/,(void *)TmpBandwidthGroup.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BANDWIDTHGROUP_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GET_BANDWIDTHGROUP_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBandwidthGroup=%p hrc=%Rhrc\n", this, "NetworkAdapter::getBandwidthGroup", *aBandwidthGroup, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMSETTER(BandwidthGroup)(IBandwidthGroup *aBandwidthGroup)
{
    LogRelFlow(("{%p} %s: enter aBandwidthGroup=%p\n", this, "NetworkAdapter::setBandwidthGroup", aBandwidthGroup));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        ComTypeInConverter<IBandwidthGroup> TmpBandwidthGroup(aBandwidthGroup);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BANDWIDTHGROUP_ENTER(this, (void *)TmpBandwidthGroup.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setBandwidthGroup(TmpBandwidthGroup.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BANDWIDTHGROUP_RETURN(this, hrc, 0 /*normal*/,(void *)TmpBandwidthGroup.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BANDWIDTHGROUP_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SET_BANDWIDTHGROUP_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setBandwidthGroup", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(InternalAndReservedAttribute1INetworkAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(InternalAndReservedAttribute2INetworkAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(InternalAndReservedAttribute3INetworkAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(InternalAndReservedAttribute4INetworkAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(InternalAndReservedAttribute5INetworkAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(InternalAndReservedAttribute6INetworkAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(InternalAndReservedAttribute7INetworkAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP NetworkAdapterWrap::COMGETTER(InternalAndReservedAttribute8INetworkAdapter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// INetworkAdapter methods
//

STDMETHODIMP NetworkAdapterWrap::GetProperty(IN_BSTR aKey,
                                             BSTR *aValue)
{
    LogRelFlow(("{%p} %s:enter aKey=%ls aValue=%p\n", this, "NetworkAdapter::getProperty", aKey, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);


        BSTRInConverter TmpKey(aKey);
        BSTROutConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GETPROPERTY_ENTER(this, TmpKey.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProperty(TmpKey.str(),
                              TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GETPROPERTY_RETURN(this, hrc, 0 /*normal*/, TmpKey.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GETPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GETPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aValue=%ls hrc=%Rhrc\n", this, "NetworkAdapter::getProperty", *aValue, hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::SetProperty(IN_BSTR aKey,
                                             IN_BSTR aValue)
{
    LogRelFlow(("{%p} %s:enter aKey=%ls aValue=%ls\n", this, "NetworkAdapter::setProperty", aKey, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpKey(aKey);
        BSTRInConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SETPROPERTY_ENTER(this, TmpKey.str().c_str(), TmpValue.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProperty(TmpKey.str(),
                              TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SETPROPERTY_RETURN(this, hrc, 0 /*normal*/, TmpKey.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SETPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_SETPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "NetworkAdapter::setProperty", hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::GetProperties(IN_BSTR aNames,
                                               ComSafeArrayOut(BSTR, aReturnNames),
                                               ComSafeArrayOut(BSTR, aReturnValues))
{
    LogRelFlow(("{%p} %s:enter aNames=%ls aReturnNames=%p aReturnValues=%p\n", this, "NetworkAdapter::getProperties", aNames, aReturnNames, aReturnValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aReturnNames);
        CheckComArgOutPointerValidThrow(aReturnValues);


        BSTRInConverter TmpNames(aNames);
        ArrayBSTROutConverter TmpReturnNames(ComSafeArrayOutArg(aReturnNames));
        ArrayBSTROutConverter TmpReturnValues(ComSafeArrayOutArg(aReturnValues));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GETPROPERTIES_ENTER(this, TmpNames.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProperties(TmpNames.str(),
                                TmpReturnNames.array(),
                                TmpReturnValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GETPROPERTIES_RETURN(this, hrc, 0 /*normal*/, TmpNames.str().c_str(), (uint32_t)TmpReturnNames.array().size(), NULL /*for now*/, (uint32_t)TmpReturnValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GETPROPERTIES_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_NETWORKADAPTER_GETPROPERTIES_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aReturnNames=%zu aReturnValues=%zu hrc=%Rhrc\n", this, "NetworkAdapter::getProperties", ComSafeArraySize(*aReturnNames), ComSafeArraySize(*aReturnValues), hrc));
    return hrc;
}

STDMETHODIMP NetworkAdapterWrap::InternalAndReservedMethod1INetworkAdapter()
{
    return E_NOTIMPL;
}

STDMETHODIMP NetworkAdapterWrap::InternalAndReservedMethod2INetworkAdapter()
{
    return E_NOTIMPL;
}

STDMETHODIMP NetworkAdapterWrap::InternalAndReservedMethod3INetworkAdapter()
{
    return E_NOTIMPL;
}

STDMETHODIMP NetworkAdapterWrap::InternalAndReservedMethod4INetworkAdapter()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(NetworkAdapterWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(NetworkAdapterWrap, INetworkAdapter)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "NetworkAdapterWrap.cpp"


// ##### BEGINFILE "ParallelPortWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IParallelPort.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_PARALLELPORT

#include "ParallelPortWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(ParallelPortWrap)

//
// IParallelPort properties
//

STDMETHODIMP ParallelPortWrap::COMGETTER(Slot)(ULONG *aSlot)
{
    LogRelFlow(("{%p} %s: enter aSlot=%p\n", this, "ParallelPort::getSlot", aSlot));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSlot);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_SLOT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSlot(aSlot);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_SLOT_RETURN(this, hrc, 0 /*normal*/,*aSlot);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_SLOT_RETURN(this, hrc, 1 /*hrc exception*/,*aSlot);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_SLOT_RETURN(this, hrc, 9 /*unhandled exception*/,*aSlot);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSlot=%RU32 hrc=%Rhrc\n", this, "ParallelPort::getSlot", *aSlot, hrc));
    return hrc;
}

STDMETHODIMP ParallelPortWrap::COMGETTER(Enabled)(BOOL *aEnabled)
{
    LogRelFlow(("{%p} %s: enter aEnabled=%p\n", this, "ParallelPort::getEnabled", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_ENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEnabled(aEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_ENABLED_RETURN(this, hrc, 0 /*normal*/,*aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_ENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_ENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEnabled=%RTbool hrc=%Rhrc\n", this, "ParallelPort::getEnabled", *aEnabled, hrc));
    return hrc;
}

STDMETHODIMP ParallelPortWrap::COMSETTER(Enabled)(BOOL aEnabled)
{
    LogRelFlow(("{%p} %s: enter aEnabled=%RTbool\n", this, "ParallelPort::setEnabled", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_ENABLED_ENTER(this, aEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setEnabled(aEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_ENABLED_RETURN(this, hrc, 0 /*normal*/,aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_ENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_ENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "ParallelPort::setEnabled", hrc));
    return hrc;
}

STDMETHODIMP ParallelPortWrap::COMGETTER(IOBase)(ULONG *aIOBase)
{
    LogRelFlow(("{%p} %s: enter aIOBase=%p\n", this, "ParallelPort::getIOBase", aIOBase));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aIOBase);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_IOBASE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getIOBase(aIOBase);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_IOBASE_RETURN(this, hrc, 0 /*normal*/,*aIOBase);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_IOBASE_RETURN(this, hrc, 1 /*hrc exception*/,*aIOBase);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_IOBASE_RETURN(this, hrc, 9 /*unhandled exception*/,*aIOBase);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aIOBase=%RU32 hrc=%Rhrc\n", this, "ParallelPort::getIOBase", *aIOBase, hrc));
    return hrc;
}

STDMETHODIMP ParallelPortWrap::COMSETTER(IOBase)(ULONG aIOBase)
{
    LogRelFlow(("{%p} %s: enter aIOBase=%RU32\n", this, "ParallelPort::setIOBase", aIOBase));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_IOBASE_ENTER(this, aIOBase);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setIOBase(aIOBase);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_IOBASE_RETURN(this, hrc, 0 /*normal*/,aIOBase);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_IOBASE_RETURN(this, hrc, 1 /*hrc exception*/,aIOBase);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_IOBASE_RETURN(this, hrc, 9 /*unhandled exception*/,aIOBase);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "ParallelPort::setIOBase", hrc));
    return hrc;
}

STDMETHODIMP ParallelPortWrap::COMGETTER(IRQ)(ULONG *aIRQ)
{
    LogRelFlow(("{%p} %s: enter aIRQ=%p\n", this, "ParallelPort::getIRQ", aIRQ));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aIRQ);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_IRQ_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getIRQ(aIRQ);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_IRQ_RETURN(this, hrc, 0 /*normal*/,*aIRQ);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_IRQ_RETURN(this, hrc, 1 /*hrc exception*/,*aIRQ);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_IRQ_RETURN(this, hrc, 9 /*unhandled exception*/,*aIRQ);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aIRQ=%RU32 hrc=%Rhrc\n", this, "ParallelPort::getIRQ", *aIRQ, hrc));
    return hrc;
}

STDMETHODIMP ParallelPortWrap::COMSETTER(IRQ)(ULONG aIRQ)
{
    LogRelFlow(("{%p} %s: enter aIRQ=%RU32\n", this, "ParallelPort::setIRQ", aIRQ));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_IRQ_ENTER(this, aIRQ);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setIRQ(aIRQ);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_IRQ_RETURN(this, hrc, 0 /*normal*/,aIRQ);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_IRQ_RETURN(this, hrc, 1 /*hrc exception*/,aIRQ);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_IRQ_RETURN(this, hrc, 9 /*unhandled exception*/,aIRQ);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "ParallelPort::setIRQ", hrc));
    return hrc;
}

STDMETHODIMP ParallelPortWrap::COMGETTER(Path)(BSTR *aPath)
{
    LogRelFlow(("{%p} %s: enter aPath=%p\n", this, "ParallelPort::getPath", aPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPath);
        BSTROutConverter TmpPath(aPath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_PATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPath(TmpPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_PATH_RETURN(this, hrc, 0 /*normal*/,TmpPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_PATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_GET_PATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPath=%ls hrc=%Rhrc\n", this, "ParallelPort::getPath", *aPath, hrc));
    return hrc;
}

STDMETHODIMP ParallelPortWrap::COMSETTER(Path)(IN_BSTR aPath)
{
    LogRelFlow(("{%p} %s: enter aPath=%ls\n", this, "ParallelPort::setPath", aPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpPath(aPath);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_PATH_ENTER(this, TmpPath.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setPath(TmpPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_PATH_RETURN(this, hrc, 0 /*normal*/,TmpPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_PATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PARALLELPORT_SET_PATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "ParallelPort::setPath", hrc));
    return hrc;
}

STDMETHODIMP ParallelPortWrap::COMGETTER(InternalAndReservedAttribute1IParallelPort)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ParallelPortWrap::COMGETTER(InternalAndReservedAttribute2IParallelPort)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ParallelPortWrap::COMGETTER(InternalAndReservedAttribute3IParallelPort)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ParallelPortWrap::COMGETTER(InternalAndReservedAttribute4IParallelPort)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IParallelPort methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(ParallelPortWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ParallelPortWrap, IParallelPort)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "ParallelPortWrap.cpp"


// ##### BEGINFILE "MachineDebuggerWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IMachineDebugger.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_MACHINEDEBUGGER

#include "MachineDebuggerWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(MachineDebuggerWrap)

//
// IMachineDebugger properties
//

STDMETHODIMP MachineDebuggerWrap::COMGETTER(SingleStep)(BOOL *aSingleStep)
{
    LogRelFlow(("{%p} %s: enter aSingleStep=%p\n", this, "MachineDebugger::getSingleStep", aSingleStep));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSingleStep);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_SINGLESTEP_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSingleStep(aSingleStep);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_SINGLESTEP_RETURN(this, hrc, 0 /*normal*/,*aSingleStep != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_SINGLESTEP_RETURN(this, hrc, 1 /*hrc exception*/,*aSingleStep != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_SINGLESTEP_RETURN(this, hrc, 9 /*unhandled exception*/,*aSingleStep != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSingleStep=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getSingleStep", *aSingleStep, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMSETTER(SingleStep)(BOOL aSingleStep)
{
    LogRelFlow(("{%p} %s: enter aSingleStep=%RTbool\n", this, "MachineDebugger::setSingleStep", aSingleStep));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_SINGLESTEP_ENTER(this, aSingleStep != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setSingleStep(aSingleStep != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_SINGLESTEP_RETURN(this, hrc, 0 /*normal*/,aSingleStep != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_SINGLESTEP_RETURN(this, hrc, 1 /*hrc exception*/,aSingleStep != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_SINGLESTEP_RETURN(this, hrc, 9 /*unhandled exception*/,aSingleStep != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::setSingleStep", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(RecompileUser)(BOOL *aRecompileUser)
{
    LogRelFlow(("{%p} %s: enter aRecompileUser=%p\n", this, "MachineDebugger::getRecompileUser", aRecompileUser));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRecompileUser);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_RECOMPILEUSER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRecompileUser(aRecompileUser);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_RECOMPILEUSER_RETURN(this, hrc, 0 /*normal*/,*aRecompileUser != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_RECOMPILEUSER_RETURN(this, hrc, 1 /*hrc exception*/,*aRecompileUser != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_RECOMPILEUSER_RETURN(this, hrc, 9 /*unhandled exception*/,*aRecompileUser != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRecompileUser=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getRecompileUser", *aRecompileUser, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMSETTER(RecompileUser)(BOOL aRecompileUser)
{
    LogRelFlow(("{%p} %s: enter aRecompileUser=%RTbool\n", this, "MachineDebugger::setRecompileUser", aRecompileUser));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_RECOMPILEUSER_ENTER(this, aRecompileUser != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setRecompileUser(aRecompileUser != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_RECOMPILEUSER_RETURN(this, hrc, 0 /*normal*/,aRecompileUser != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_RECOMPILEUSER_RETURN(this, hrc, 1 /*hrc exception*/,aRecompileUser != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_RECOMPILEUSER_RETURN(this, hrc, 9 /*unhandled exception*/,aRecompileUser != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::setRecompileUser", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(RecompileSupervisor)(BOOL *aRecompileSupervisor)
{
    LogRelFlow(("{%p} %s: enter aRecompileSupervisor=%p\n", this, "MachineDebugger::getRecompileSupervisor", aRecompileSupervisor));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRecompileSupervisor);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_RECOMPILESUPERVISOR_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRecompileSupervisor(aRecompileSupervisor);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_RECOMPILESUPERVISOR_RETURN(this, hrc, 0 /*normal*/,*aRecompileSupervisor != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_RECOMPILESUPERVISOR_RETURN(this, hrc, 1 /*hrc exception*/,*aRecompileSupervisor != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_RECOMPILESUPERVISOR_RETURN(this, hrc, 9 /*unhandled exception*/,*aRecompileSupervisor != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRecompileSupervisor=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getRecompileSupervisor", *aRecompileSupervisor, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMSETTER(RecompileSupervisor)(BOOL aRecompileSupervisor)
{
    LogRelFlow(("{%p} %s: enter aRecompileSupervisor=%RTbool\n", this, "MachineDebugger::setRecompileSupervisor", aRecompileSupervisor));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_RECOMPILESUPERVISOR_ENTER(this, aRecompileSupervisor != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setRecompileSupervisor(aRecompileSupervisor != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_RECOMPILESUPERVISOR_RETURN(this, hrc, 0 /*normal*/,aRecompileSupervisor != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_RECOMPILESUPERVISOR_RETURN(this, hrc, 1 /*hrc exception*/,aRecompileSupervisor != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_RECOMPILESUPERVISOR_RETURN(this, hrc, 9 /*unhandled exception*/,aRecompileSupervisor != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::setRecompileSupervisor", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(ExecuteAllInIEM)(BOOL *aExecuteAllInIEM)
{
    LogRelFlow(("{%p} %s: enter aExecuteAllInIEM=%p\n", this, "MachineDebugger::getExecuteAllInIEM", aExecuteAllInIEM));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aExecuteAllInIEM);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_EXECUTEALLINIEM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getExecuteAllInIEM(aExecuteAllInIEM);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_EXECUTEALLINIEM_RETURN(this, hrc, 0 /*normal*/,*aExecuteAllInIEM != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_EXECUTEALLINIEM_RETURN(this, hrc, 1 /*hrc exception*/,*aExecuteAllInIEM != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_EXECUTEALLINIEM_RETURN(this, hrc, 9 /*unhandled exception*/,*aExecuteAllInIEM != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aExecuteAllInIEM=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getExecuteAllInIEM", *aExecuteAllInIEM, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMSETTER(ExecuteAllInIEM)(BOOL aExecuteAllInIEM)
{
    LogRelFlow(("{%p} %s: enter aExecuteAllInIEM=%RTbool\n", this, "MachineDebugger::setExecuteAllInIEM", aExecuteAllInIEM));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_EXECUTEALLINIEM_ENTER(this, aExecuteAllInIEM != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setExecuteAllInIEM(aExecuteAllInIEM != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_EXECUTEALLINIEM_RETURN(this, hrc, 0 /*normal*/,aExecuteAllInIEM != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_EXECUTEALLINIEM_RETURN(this, hrc, 1 /*hrc exception*/,aExecuteAllInIEM != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_EXECUTEALLINIEM_RETURN(this, hrc, 9 /*unhandled exception*/,aExecuteAllInIEM != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::setExecuteAllInIEM", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(PATMEnabled)(BOOL *aPATMEnabled)
{
    LogRelFlow(("{%p} %s: enter aPATMEnabled=%p\n", this, "MachineDebugger::getPATMEnabled", aPATMEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPATMEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_PATMENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPATMEnabled(aPATMEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_PATMENABLED_RETURN(this, hrc, 0 /*normal*/,*aPATMEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_PATMENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aPATMEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_PATMENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aPATMEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPATMEnabled=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getPATMEnabled", *aPATMEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMSETTER(PATMEnabled)(BOOL aPATMEnabled)
{
    LogRelFlow(("{%p} %s: enter aPATMEnabled=%RTbool\n", this, "MachineDebugger::setPATMEnabled", aPATMEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_PATMENABLED_ENTER(this, aPATMEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setPATMEnabled(aPATMEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_PATMENABLED_RETURN(this, hrc, 0 /*normal*/,aPATMEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_PATMENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aPATMEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_PATMENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aPATMEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::setPATMEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(CSAMEnabled)(BOOL *aCSAMEnabled)
{
    LogRelFlow(("{%p} %s: enter aCSAMEnabled=%p\n", this, "MachineDebugger::getCSAMEnabled", aCSAMEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCSAMEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_CSAMENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCSAMEnabled(aCSAMEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_CSAMENABLED_RETURN(this, hrc, 0 /*normal*/,*aCSAMEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_CSAMENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aCSAMEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_CSAMENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aCSAMEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aCSAMEnabled=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getCSAMEnabled", *aCSAMEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMSETTER(CSAMEnabled)(BOOL aCSAMEnabled)
{
    LogRelFlow(("{%p} %s: enter aCSAMEnabled=%RTbool\n", this, "MachineDebugger::setCSAMEnabled", aCSAMEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_CSAMENABLED_ENTER(this, aCSAMEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setCSAMEnabled(aCSAMEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_CSAMENABLED_RETURN(this, hrc, 0 /*normal*/,aCSAMEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_CSAMENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aCSAMEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_CSAMENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aCSAMEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::setCSAMEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(LogEnabled)(BOOL *aLogEnabled)
{
    LogRelFlow(("{%p} %s: enter aLogEnabled=%p\n", this, "MachineDebugger::getLogEnabled", aLogEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLogEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLogEnabled(aLogEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGENABLED_RETURN(this, hrc, 0 /*normal*/,*aLogEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aLogEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aLogEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLogEnabled=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getLogEnabled", *aLogEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMSETTER(LogEnabled)(BOOL aLogEnabled)
{
    LogRelFlow(("{%p} %s: enter aLogEnabled=%RTbool\n", this, "MachineDebugger::setLogEnabled", aLogEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_LOGENABLED_ENTER(this, aLogEnabled != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setLogEnabled(aLogEnabled != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_LOGENABLED_RETURN(this, hrc, 0 /*normal*/,aLogEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_LOGENABLED_RETURN(this, hrc, 1 /*hrc exception*/,aLogEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_LOGENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,aLogEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::setLogEnabled", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(LogDbgFlags)(BSTR *aLogDbgFlags)
{
    LogRelFlow(("{%p} %s: enter aLogDbgFlags=%p\n", this, "MachineDebugger::getLogDbgFlags", aLogDbgFlags));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLogDbgFlags);
        BSTROutConverter TmpLogDbgFlags(aLogDbgFlags);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGFLAGS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLogDbgFlags(TmpLogDbgFlags.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGFLAGS_RETURN(this, hrc, 0 /*normal*/,TmpLogDbgFlags.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGFLAGS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGFLAGS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLogDbgFlags=%ls hrc=%Rhrc\n", this, "MachineDebugger::getLogDbgFlags", *aLogDbgFlags, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(LogDbgGroups)(BSTR *aLogDbgGroups)
{
    LogRelFlow(("{%p} %s: enter aLogDbgGroups=%p\n", this, "MachineDebugger::getLogDbgGroups", aLogDbgGroups));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLogDbgGroups);
        BSTROutConverter TmpLogDbgGroups(aLogDbgGroups);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGGROUPS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLogDbgGroups(TmpLogDbgGroups.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGGROUPS_RETURN(this, hrc, 0 /*normal*/,TmpLogDbgGroups.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGGROUPS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGGROUPS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLogDbgGroups=%ls hrc=%Rhrc\n", this, "MachineDebugger::getLogDbgGroups", *aLogDbgGroups, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(LogDbgDestinations)(BSTR *aLogDbgDestinations)
{
    LogRelFlow(("{%p} %s: enter aLogDbgDestinations=%p\n", this, "MachineDebugger::getLogDbgDestinations", aLogDbgDestinations));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLogDbgDestinations);
        BSTROutConverter TmpLogDbgDestinations(aLogDbgDestinations);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGDESTINATIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLogDbgDestinations(TmpLogDbgDestinations.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGDESTINATIONS_RETURN(this, hrc, 0 /*normal*/,TmpLogDbgDestinations.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGDESTINATIONS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGDBGDESTINATIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLogDbgDestinations=%ls hrc=%Rhrc\n", this, "MachineDebugger::getLogDbgDestinations", *aLogDbgDestinations, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(LogRelFlags)(BSTR *aLogRelFlags)
{
    LogRelFlow(("{%p} %s: enter aLogRelFlags=%p\n", this, "MachineDebugger::getLogRelFlags", aLogRelFlags));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLogRelFlags);
        BSTROutConverter TmpLogRelFlags(aLogRelFlags);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELFLAGS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLogRelFlags(TmpLogRelFlags.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELFLAGS_RETURN(this, hrc, 0 /*normal*/,TmpLogRelFlags.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELFLAGS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELFLAGS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLogRelFlags=%ls hrc=%Rhrc\n", this, "MachineDebugger::getLogRelFlags", *aLogRelFlags, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(LogRelGroups)(BSTR *aLogRelGroups)
{
    LogRelFlow(("{%p} %s: enter aLogRelGroups=%p\n", this, "MachineDebugger::getLogRelGroups", aLogRelGroups));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLogRelGroups);
        BSTROutConverter TmpLogRelGroups(aLogRelGroups);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELGROUPS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLogRelGroups(TmpLogRelGroups.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELGROUPS_RETURN(this, hrc, 0 /*normal*/,TmpLogRelGroups.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELGROUPS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELGROUPS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLogRelGroups=%ls hrc=%Rhrc\n", this, "MachineDebugger::getLogRelGroups", *aLogRelGroups, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(LogRelDestinations)(BSTR *aLogRelDestinations)
{
    LogRelFlow(("{%p} %s: enter aLogRelDestinations=%p\n", this, "MachineDebugger::getLogRelDestinations", aLogRelDestinations));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLogRelDestinations);
        BSTROutConverter TmpLogRelDestinations(aLogRelDestinations);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELDESTINATIONS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLogRelDestinations(TmpLogRelDestinations.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELDESTINATIONS_RETURN(this, hrc, 0 /*normal*/,TmpLogRelDestinations.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELDESTINATIONS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_LOGRELDESTINATIONS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLogRelDestinations=%ls hrc=%Rhrc\n", this, "MachineDebugger::getLogRelDestinations", *aLogRelDestinations, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(ExecutionEngine)(VMExecutionEngine_T *aExecutionEngine)
{
    LogRelFlow(("{%p} %s: enter aExecutionEngine=%p\n", this, "MachineDebugger::getExecutionEngine", aExecutionEngine));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aExecutionEngine);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_EXECUTIONENGINE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getExecutionEngine(aExecutionEngine);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_EXECUTIONENGINE_RETURN(this, hrc, 0 /*normal*/,*aExecutionEngine);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_EXECUTIONENGINE_RETURN(this, hrc, 1 /*hrc exception*/,*aExecutionEngine);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_EXECUTIONENGINE_RETURN(this, hrc, 9 /*unhandled exception*/,*aExecutionEngine);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aExecutionEngine=%RU32 hrc=%Rhrc\n", this, "MachineDebugger::getExecutionEngine", *aExecutionEngine, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(HWVirtExEnabled)(BOOL *aHWVirtExEnabled)
{
    LogRelFlow(("{%p} %s: enter aHWVirtExEnabled=%p\n", this, "MachineDebugger::getHWVirtExEnabled", aHWVirtExEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHWVirtExEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHWVirtExEnabled(aHWVirtExEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXENABLED_RETURN(this, hrc, 0 /*normal*/,*aHWVirtExEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aHWVirtExEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aHWVirtExEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHWVirtExEnabled=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getHWVirtExEnabled", *aHWVirtExEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(HWVirtExNestedPagingEnabled)(BOOL *aHWVirtExNestedPagingEnabled)
{
    LogRelFlow(("{%p} %s: enter aHWVirtExNestedPagingEnabled=%p\n", this, "MachineDebugger::getHWVirtExNestedPagingEnabled", aHWVirtExNestedPagingEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHWVirtExNestedPagingEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXNESTEDPAGINGENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHWVirtExNestedPagingEnabled(aHWVirtExNestedPagingEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXNESTEDPAGINGENABLED_RETURN(this, hrc, 0 /*normal*/,*aHWVirtExNestedPagingEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXNESTEDPAGINGENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aHWVirtExNestedPagingEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXNESTEDPAGINGENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aHWVirtExNestedPagingEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHWVirtExNestedPagingEnabled=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getHWVirtExNestedPagingEnabled", *aHWVirtExNestedPagingEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(HWVirtExVPIDEnabled)(BOOL *aHWVirtExVPIDEnabled)
{
    LogRelFlow(("{%p} %s: enter aHWVirtExVPIDEnabled=%p\n", this, "MachineDebugger::getHWVirtExVPIDEnabled", aHWVirtExVPIDEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHWVirtExVPIDEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXVPIDENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHWVirtExVPIDEnabled(aHWVirtExVPIDEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXVPIDENABLED_RETURN(this, hrc, 0 /*normal*/,*aHWVirtExVPIDEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXVPIDENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aHWVirtExVPIDEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXVPIDENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aHWVirtExVPIDEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHWVirtExVPIDEnabled=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getHWVirtExVPIDEnabled", *aHWVirtExVPIDEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(HWVirtExUXEnabled)(BOOL *aHWVirtExUXEnabled)
{
    LogRelFlow(("{%p} %s: enter aHWVirtExUXEnabled=%p\n", this, "MachineDebugger::getHWVirtExUXEnabled", aHWVirtExUXEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHWVirtExUXEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXUXENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHWVirtExUXEnabled(aHWVirtExUXEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXUXENABLED_RETURN(this, hrc, 0 /*normal*/,*aHWVirtExUXEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXUXENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aHWVirtExUXEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_HWVIRTEXUXENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aHWVirtExUXEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHWVirtExUXEnabled=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getHWVirtExUXEnabled", *aHWVirtExUXEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(OSName)(BSTR *aOSName)
{
    LogRelFlow(("{%p} %s: enter aOSName=%p\n", this, "MachineDebugger::getOSName", aOSName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOSName);
        BSTROutConverter TmpOSName(aOSName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_OSNAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOSName(TmpOSName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_OSNAME_RETURN(this, hrc, 0 /*normal*/,TmpOSName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_OSNAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_OSNAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOSName=%ls hrc=%Rhrc\n", this, "MachineDebugger::getOSName", *aOSName, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(OSVersion)(BSTR *aOSVersion)
{
    LogRelFlow(("{%p} %s: enter aOSVersion=%p\n", this, "MachineDebugger::getOSVersion", aOSVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOSVersion);
        BSTROutConverter TmpOSVersion(aOSVersion);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_OSVERSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getOSVersion(TmpOSVersion.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_OSVERSION_RETURN(this, hrc, 0 /*normal*/,TmpOSVersion.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_OSVERSION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_OSVERSION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aOSVersion=%ls hrc=%Rhrc\n", this, "MachineDebugger::getOSVersion", *aOSVersion, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(PAEEnabled)(BOOL *aPAEEnabled)
{
    LogRelFlow(("{%p} %s: enter aPAEEnabled=%p\n", this, "MachineDebugger::getPAEEnabled", aPAEEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPAEEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_PAEENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPAEEnabled(aPAEEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_PAEENABLED_RETURN(this, hrc, 0 /*normal*/,*aPAEEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_PAEENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aPAEEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_PAEENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aPAEEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPAEEnabled=%RTbool hrc=%Rhrc\n", this, "MachineDebugger::getPAEEnabled", *aPAEEnabled, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(VirtualTimeRate)(ULONG *aVirtualTimeRate)
{
    LogRelFlow(("{%p} %s: enter aVirtualTimeRate=%p\n", this, "MachineDebugger::getVirtualTimeRate", aVirtualTimeRate));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVirtualTimeRate);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_VIRTUALTIMERATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVirtualTimeRate(aVirtualTimeRate);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_VIRTUALTIMERATE_RETURN(this, hrc, 0 /*normal*/,*aVirtualTimeRate);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_VIRTUALTIMERATE_RETURN(this, hrc, 1 /*hrc exception*/,*aVirtualTimeRate);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_VIRTUALTIMERATE_RETURN(this, hrc, 9 /*unhandled exception*/,*aVirtualTimeRate);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVirtualTimeRate=%RU32 hrc=%Rhrc\n", this, "MachineDebugger::getVirtualTimeRate", *aVirtualTimeRate, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMSETTER(VirtualTimeRate)(ULONG aVirtualTimeRate)
{
    LogRelFlow(("{%p} %s: enter aVirtualTimeRate=%RU32\n", this, "MachineDebugger::setVirtualTimeRate", aVirtualTimeRate));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_VIRTUALTIMERATE_ENTER(this, aVirtualTimeRate);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVirtualTimeRate(aVirtualTimeRate);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_VIRTUALTIMERATE_RETURN(this, hrc, 0 /*normal*/,aVirtualTimeRate);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_VIRTUALTIMERATE_RETURN(this, hrc, 1 /*hrc exception*/,aVirtualTimeRate);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SET_VIRTUALTIMERATE_RETURN(this, hrc, 9 /*unhandled exception*/,aVirtualTimeRate);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::setVirtualTimeRate", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(VM)(LONG64 *aVM)
{
    LogRelFlow(("{%p} %s: enter aVM=%p\n", this, "MachineDebugger::getVM", aVM));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVM);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_VM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVM(aVM);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_VM_RETURN(this, hrc, 0 /*normal*/,*aVM);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_VM_RETURN(this, hrc, 1 /*hrc exception*/,*aVM);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_VM_RETURN(this, hrc, 9 /*unhandled exception*/,*aVM);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVM=%RI64 hrc=%Rhrc\n", this, "MachineDebugger::getVM", *aVM, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(Uptime)(LONG64 *aUptime)
{
    LogRelFlow(("{%p} %s: enter aUptime=%p\n", this, "MachineDebugger::getUptime", aUptime));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUptime);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_UPTIME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUptime(aUptime);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_UPTIME_RETURN(this, hrc, 0 /*normal*/,*aUptime);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_UPTIME_RETURN(this, hrc, 1 /*hrc exception*/,*aUptime);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GET_UPTIME_RETURN(this, hrc, 9 /*unhandled exception*/,*aUptime);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUptime=%RI64 hrc=%Rhrc\n", this, "MachineDebugger::getUptime", *aUptime, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute1IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute2IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute3IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute4IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute5IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute6IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute7IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute8IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute9IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute10IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute11IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute12IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute13IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute14IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute15IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::COMGETTER(InternalAndReservedAttribute16IMachineDebugger)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IMachineDebugger methods
//

STDMETHODIMP MachineDebuggerWrap::DumpGuestCore(IN_BSTR aFilename,
                                                IN_BSTR aCompression)
{
    LogRelFlow(("{%p} %s:enter aFilename=%ls aCompression=%ls\n", this, "MachineDebugger::dumpGuestCore", aFilename, aCompression));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpFilename(aFilename);
        BSTRInConverter TmpCompression(aCompression);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPGUESTCORE_ENTER(this, TmpFilename.str().c_str(), TmpCompression.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = dumpGuestCore(TmpFilename.str(),
                                TmpCompression.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPGUESTCORE_RETURN(this, hrc, 0 /*normal*/, TmpFilename.str().c_str(), TmpCompression.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPGUESTCORE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPGUESTCORE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::dumpGuestCore", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::DumpHostProcessCore(IN_BSTR aFilename,
                                                      IN_BSTR aCompression)
{
    LogRelFlow(("{%p} %s:enter aFilename=%ls aCompression=%ls\n", this, "MachineDebugger::dumpHostProcessCore", aFilename, aCompression));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpFilename(aFilename);
        BSTRInConverter TmpCompression(aCompression);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPHOSTPROCESSCORE_ENTER(this, TmpFilename.str().c_str(), TmpCompression.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = dumpHostProcessCore(TmpFilename.str(),
                                      TmpCompression.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPHOSTPROCESSCORE_RETURN(this, hrc, 0 /*normal*/, TmpFilename.str().c_str(), TmpCompression.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPHOSTPROCESSCORE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPHOSTPROCESSCORE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::dumpHostProcessCore", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::Info(IN_BSTR aName,
                                       IN_BSTR aArgs,
                                       BSTR *aInfo)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aArgs=%ls aInfo=%p\n", this, "MachineDebugger::info", aName, aArgs, aInfo));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aInfo);


        BSTRInConverter TmpName(aName);
        BSTRInConverter TmpArgs(aArgs);
        BSTROutConverter TmpInfo(aInfo);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_INFO_ENTER(this, TmpName.str().c_str(), TmpArgs.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = info(TmpName.str(),
                       TmpArgs.str(),
                       TmpInfo.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_INFO_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), TmpArgs.str().c_str(), TmpInfo.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_INFO_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_INFO_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aInfo=%ls hrc=%Rhrc\n", this, "MachineDebugger::info", *aInfo, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::InjectNMI()
{
    LogRelFlow(("{%p} %s:enter\n", this, "MachineDebugger::injectNMI"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_INJECTNMI_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = injectNMI();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_INJECTNMI_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_INJECTNMI_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_INJECTNMI_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::injectNMI", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::ModifyLogGroups(IN_BSTR aSettings)
{
    LogRelFlow(("{%p} %s:enter aSettings=%ls\n", this, "MachineDebugger::modifyLogGroups", aSettings));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpSettings(aSettings);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGGROUPS_ENTER(this, TmpSettings.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = modifyLogGroups(TmpSettings.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGGROUPS_RETURN(this, hrc, 0 /*normal*/, TmpSettings.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGGROUPS_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGGROUPS_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::modifyLogGroups", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::ModifyLogFlags(IN_BSTR aSettings)
{
    LogRelFlow(("{%p} %s:enter aSettings=%ls\n", this, "MachineDebugger::modifyLogFlags", aSettings));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpSettings(aSettings);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGFLAGS_ENTER(this, TmpSettings.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = modifyLogFlags(TmpSettings.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGFLAGS_RETURN(this, hrc, 0 /*normal*/, TmpSettings.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGFLAGS_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGFLAGS_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::modifyLogFlags", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::ModifyLogDestinations(IN_BSTR aSettings)
{
    LogRelFlow(("{%p} %s:enter aSettings=%ls\n", this, "MachineDebugger::modifyLogDestinations", aSettings));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpSettings(aSettings);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGDESTINATIONS_ENTER(this, TmpSettings.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = modifyLogDestinations(TmpSettings.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGDESTINATIONS_RETURN(this, hrc, 0 /*normal*/, TmpSettings.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGDESTINATIONS_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_MODIFYLOGDESTINATIONS_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::modifyLogDestinations", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::ReadPhysicalMemory(LONG64 aAddress,
                                                     ULONG aSize,
                                                     ComSafeArrayOut(BYTE, aBytes))
{
    LogRelFlow(("{%p} %s:enter aAddress=%RI64 aSize=%RU32 aBytes=%p\n", this, "MachineDebugger::readPhysicalMemory", aAddress, aSize, aBytes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBytes);


        
        
        ArrayOutConverter<BYTE> TmpBytes(ComSafeArrayOutArg(aBytes));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_READPHYSICALMEMORY_ENTER(this, aAddress, aSize);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = readPhysicalMemory(aAddress,
                                     aSize,
                                     TmpBytes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_READPHYSICALMEMORY_RETURN(this, hrc, 0 /*normal*/, aAddress, aSize, (uint32_t)TmpBytes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_READPHYSICALMEMORY_RETURN(this, hrc, 1 /*hrc exception*/, aAddress, aSize, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_READPHYSICALMEMORY_RETURN(this, hrc, 9 /*unhandled exception*/, aAddress, aSize, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aBytes=%zu hrc=%Rhrc\n", this, "MachineDebugger::readPhysicalMemory", ComSafeArraySize(*aBytes), hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::WritePhysicalMemory(LONG64 aAddress,
                                                      ULONG aSize,
                                                      ComSafeArrayIn(BYTE, aBytes))
{
    LogRelFlow(("{%p} %s:enter aAddress=%RI64 aSize=%RU32 aBytes=%zu\n", this, "MachineDebugger::writePhysicalMemory", aAddress, aSize, aBytes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        ArrayInConverter<BYTE> TmpBytes(ComSafeArrayInArg(aBytes));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_WRITEPHYSICALMEMORY_ENTER(this, aAddress, aSize, (uint32_t)TmpBytes.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = writePhysicalMemory(aAddress,
                                      aSize,
                                      TmpBytes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_WRITEPHYSICALMEMORY_RETURN(this, hrc, 0 /*normal*/, aAddress, aSize, (uint32_t)TmpBytes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_WRITEPHYSICALMEMORY_RETURN(this, hrc, 1 /*hrc exception*/, aAddress, aSize, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_WRITEPHYSICALMEMORY_RETURN(this, hrc, 9 /*unhandled exception*/, aAddress, aSize, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::writePhysicalMemory", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::ReadVirtualMemory(ULONG aCpuId,
                                                    LONG64 aAddress,
                                                    ULONG aSize,
                                                    ComSafeArrayOut(BYTE, aBytes))
{
    LogRelFlow(("{%p} %s:enter aCpuId=%RU32 aAddress=%RI64 aSize=%RU32 aBytes=%p\n", this, "MachineDebugger::readVirtualMemory", aCpuId, aAddress, aSize, aBytes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBytes);


        
        
        
        ArrayOutConverter<BYTE> TmpBytes(ComSafeArrayOutArg(aBytes));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_READVIRTUALMEMORY_ENTER(this, aCpuId, aAddress, aSize);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = readVirtualMemory(aCpuId,
                                    aAddress,
                                    aSize,
                                    TmpBytes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_READVIRTUALMEMORY_RETURN(this, hrc, 0 /*normal*/, aCpuId, aAddress, aSize, (uint32_t)TmpBytes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_READVIRTUALMEMORY_RETURN(this, hrc, 1 /*hrc exception*/, aCpuId, aAddress, aSize, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_READVIRTUALMEMORY_RETURN(this, hrc, 9 /*unhandled exception*/, aCpuId, aAddress, aSize, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aBytes=%zu hrc=%Rhrc\n", this, "MachineDebugger::readVirtualMemory", ComSafeArraySize(*aBytes), hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::WriteVirtualMemory(ULONG aCpuId,
                                                     LONG64 aAddress,
                                                     ULONG aSize,
                                                     ComSafeArrayIn(BYTE, aBytes))
{
    LogRelFlow(("{%p} %s:enter aCpuId=%RU32 aAddress=%RI64 aSize=%RU32 aBytes=%zu\n", this, "MachineDebugger::writeVirtualMemory", aCpuId, aAddress, aSize, aBytes));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        
        
        ArrayInConverter<BYTE> TmpBytes(ComSafeArrayInArg(aBytes));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_WRITEVIRTUALMEMORY_ENTER(this, aCpuId, aAddress, aSize, (uint32_t)TmpBytes.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = writeVirtualMemory(aCpuId,
                                     aAddress,
                                     aSize,
                                     TmpBytes.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_WRITEVIRTUALMEMORY_RETURN(this, hrc, 0 /*normal*/, aCpuId, aAddress, aSize, (uint32_t)TmpBytes.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_WRITEVIRTUALMEMORY_RETURN(this, hrc, 1 /*hrc exception*/, aCpuId, aAddress, aSize, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_WRITEVIRTUALMEMORY_RETURN(this, hrc, 9 /*unhandled exception*/, aCpuId, aAddress, aSize, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::writeVirtualMemory", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::LoadPlugIn(IN_BSTR aName,
                                             BSTR *aPlugInName)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aPlugInName=%p\n", this, "MachineDebugger::loadPlugIn", aName, aPlugInName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPlugInName);


        BSTRInConverter TmpName(aName);
        BSTROutConverter TmpPlugInName(aPlugInName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_LOADPLUGIN_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = loadPlugIn(TmpName.str(),
                             TmpPlugInName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_LOADPLUGIN_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), TmpPlugInName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_LOADPLUGIN_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_LOADPLUGIN_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aPlugInName=%ls hrc=%Rhrc\n", this, "MachineDebugger::loadPlugIn", *aPlugInName, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::UnloadPlugIn(IN_BSTR aName)
{
    LogRelFlow(("{%p} %s:enter aName=%ls\n", this, "MachineDebugger::unloadPlugIn", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_UNLOADPLUGIN_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = unloadPlugIn(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_UNLOADPLUGIN_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_UNLOADPLUGIN_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_UNLOADPLUGIN_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::unloadPlugIn", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::DetectOS(BSTR *aOs)
{
    LogRelFlow(("{%p} %s:enter aOs=%p\n", this, "MachineDebugger::detectOS", aOs));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aOs);


        BSTROutConverter TmpOs(aOs);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DETECTOS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = detectOS(TmpOs.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DETECTOS_RETURN(this, hrc, 0 /*normal*/, TmpOs.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DETECTOS_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DETECTOS_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aOs=%ls hrc=%Rhrc\n", this, "MachineDebugger::detectOS", *aOs, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::QueryOSKernelLog(ULONG aMaxMessages,
                                                   BSTR *aDmesg)
{
    LogRelFlow(("{%p} %s:enter aMaxMessages=%RU32 aDmesg=%p\n", this, "MachineDebugger::queryOSKernelLog", aMaxMessages, aDmesg));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDmesg);


        
        BSTROutConverter TmpDmesg(aDmesg);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_QUERYOSKERNELLOG_ENTER(this, aMaxMessages);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = queryOSKernelLog(aMaxMessages,
                                   TmpDmesg.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_QUERYOSKERNELLOG_RETURN(this, hrc, 0 /*normal*/, aMaxMessages, TmpDmesg.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_QUERYOSKERNELLOG_RETURN(this, hrc, 1 /*hrc exception*/, aMaxMessages, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_QUERYOSKERNELLOG_RETURN(this, hrc, 9 /*unhandled exception*/, aMaxMessages, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aDmesg=%ls hrc=%Rhrc\n", this, "MachineDebugger::queryOSKernelLog", *aDmesg, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::GetRegister(ULONG aCpuId,
                                              IN_BSTR aName,
                                              BSTR *aValue)
{
    LogRelFlow(("{%p} %s:enter aCpuId=%RU32 aName=%ls aValue=%p\n", this, "MachineDebugger::getRegister", aCpuId, aName, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);


        
        BSTRInConverter TmpName(aName);
        BSTROutConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETREGISTER_ENTER(this, aCpuId, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRegister(aCpuId,
                              TmpName.str(),
                              TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETREGISTER_RETURN(this, hrc, 0 /*normal*/, aCpuId, TmpName.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETREGISTER_RETURN(this, hrc, 1 /*hrc exception*/, aCpuId, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETREGISTER_RETURN(this, hrc, 9 /*unhandled exception*/, aCpuId, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aValue=%ls hrc=%Rhrc\n", this, "MachineDebugger::getRegister", *aValue, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::GetRegisters(ULONG aCpuId,
                                               ComSafeArrayOut(BSTR, aNames),
                                               ComSafeArrayOut(BSTR, aValues))
{
    LogRelFlow(("{%p} %s:enter aCpuId=%RU32 aNames=%p aValues=%p\n", this, "MachineDebugger::getRegisters", aCpuId, aNames, aValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNames);
        CheckComArgOutPointerValidThrow(aValues);


        
        ArrayBSTROutConverter TmpNames(ComSafeArrayOutArg(aNames));
        ArrayBSTROutConverter TmpValues(ComSafeArrayOutArg(aValues));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETREGISTERS_ENTER(this, aCpuId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRegisters(aCpuId,
                               TmpNames.array(),
                               TmpValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETREGISTERS_RETURN(this, hrc, 0 /*normal*/, aCpuId, (uint32_t)TmpNames.array().size(), NULL /*for now*/, (uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETREGISTERS_RETURN(this, hrc, 1 /*hrc exception*/, aCpuId, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETREGISTERS_RETURN(this, hrc, 9 /*unhandled exception*/, aCpuId, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aNames=%zu *aValues=%zu hrc=%Rhrc\n", this, "MachineDebugger::getRegisters", ComSafeArraySize(*aNames), ComSafeArraySize(*aValues), hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::SetRegister(ULONG aCpuId,
                                              IN_BSTR aName,
                                              IN_BSTR aValue)
{
    LogRelFlow(("{%p} %s:enter aCpuId=%RU32 aName=%ls aValue=%ls\n", this, "MachineDebugger::setRegister", aCpuId, aName, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        BSTRInConverter TmpName(aName);
        BSTRInConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SETREGISTER_ENTER(this, aCpuId, TmpName.str().c_str(), TmpValue.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setRegister(aCpuId,
                              TmpName.str(),
                              TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SETREGISTER_RETURN(this, hrc, 0 /*normal*/, aCpuId, TmpName.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SETREGISTER_RETURN(this, hrc, 1 /*hrc exception*/, aCpuId, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SETREGISTER_RETURN(this, hrc, 9 /*unhandled exception*/, aCpuId, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::setRegister", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::SetRegisters(ULONG aCpuId,
                                               ComSafeArrayIn(IN_BSTR, aNames),
                                               ComSafeArrayIn(IN_BSTR, aValues))
{
    LogRelFlow(("{%p} %s:enter aCpuId=%RU32 aNames=%zu aValues=%zu\n", this, "MachineDebugger::setRegisters", aCpuId, aNames, aValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        
        ArrayBSTRInConverter TmpNames(ComSafeArrayInArg(aNames));
        ArrayBSTRInConverter TmpValues(ComSafeArrayInArg(aValues));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SETREGISTERS_ENTER(this, aCpuId, (uint32_t)TmpNames.array().size(), NULL /*for now*/, (uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setRegisters(aCpuId,
                               TmpNames.array(),
                               TmpValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SETREGISTERS_RETURN(this, hrc, 0 /*normal*/, aCpuId, (uint32_t)TmpNames.array().size(), NULL /*for now*/, (uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SETREGISTERS_RETURN(this, hrc, 1 /*hrc exception*/, aCpuId, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_SETREGISTERS_RETURN(this, hrc, 9 /*unhandled exception*/, aCpuId, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::setRegisters", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::DumpGuestStack(ULONG aCpuId,
                                                 BSTR *aStack)
{
    LogRelFlow(("{%p} %s:enter aCpuId=%RU32 aStack=%p\n", this, "MachineDebugger::dumpGuestStack", aCpuId, aStack));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aStack);


        
        BSTROutConverter TmpStack(aStack);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPGUESTSTACK_ENTER(this, aCpuId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = dumpGuestStack(aCpuId,
                                 TmpStack.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPGUESTSTACK_RETURN(this, hrc, 0 /*normal*/, aCpuId, TmpStack.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPGUESTSTACK_RETURN(this, hrc, 1 /*hrc exception*/, aCpuId, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPGUESTSTACK_RETURN(this, hrc, 9 /*unhandled exception*/, aCpuId, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aStack=%ls hrc=%Rhrc\n", this, "MachineDebugger::dumpGuestStack", *aStack, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::ResetStats(IN_BSTR aPattern)
{
    LogRelFlow(("{%p} %s:enter aPattern=%ls\n", this, "MachineDebugger::resetStats", aPattern));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpPattern(aPattern);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_RESETSTATS_ENTER(this, TmpPattern.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = resetStats(TmpPattern.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_RESETSTATS_RETURN(this, hrc, 0 /*normal*/, TmpPattern.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_RESETSTATS_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_RESETSTATS_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::resetStats", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::DumpStats(IN_BSTR aPattern)
{
    LogRelFlow(("{%p} %s:enter aPattern=%ls\n", this, "MachineDebugger::dumpStats", aPattern));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpPattern(aPattern);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPSTATS_ENTER(this, TmpPattern.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = dumpStats(TmpPattern.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPSTATS_RETURN(this, hrc, 0 /*normal*/, TmpPattern.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPSTATS_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_DUMPSTATS_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineDebugger::dumpStats", hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::GetStats(IN_BSTR aPattern,
                                           BOOL aWithDescriptions,
                                           BSTR *aStats)
{
    LogRelFlow(("{%p} %s:enter aPattern=%ls aWithDescriptions=%RTbool aStats=%p\n", this, "MachineDebugger::getStats", aPattern, aWithDescriptions, aStats));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aStats);


        BSTRInConverter TmpPattern(aPattern);
        
        BSTROutConverter TmpStats(aStats);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETSTATS_ENTER(this, TmpPattern.str().c_str(), aWithDescriptions != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getStats(TmpPattern.str(),
                           aWithDescriptions != FALSE,
                           TmpStats.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETSTATS_RETURN(this, hrc, 0 /*normal*/, TmpPattern.str().c_str(), aWithDescriptions != FALSE, TmpStats.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETSTATS_RETURN(this, hrc, 1 /*hrc exception*/, 0, aWithDescriptions != FALSE, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETSTATS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aWithDescriptions != FALSE, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aStats=%ls hrc=%Rhrc\n", this, "MachineDebugger::getStats", *aStats, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::GetCPULoad(ULONG aCpuId,
                                             ULONG *aPctExecuting,
                                             ULONG *aPctHalted,
                                             ULONG *aPctOther,
                                             LONG64 *aMsInterval)
{
    LogRelFlow(("{%p} %s:enter aCpuId=%RU32 aPctExecuting=%p aPctHalted=%p aPctOther=%p aMsInterval=%p\n", this, "MachineDebugger::getCPULoad", aCpuId, aPctExecuting, aPctHalted, aPctOther, aMsInterval));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPctExecuting);
        CheckComArgOutPointerValidThrow(aPctHalted);
        CheckComArgOutPointerValidThrow(aPctOther);
        CheckComArgOutPointerValidThrow(aMsInterval);


        
        
        
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETCPULOAD_ENTER(this, aCpuId);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getCPULoad(aCpuId,
                             aPctExecuting,
                             aPctHalted,
                             aPctOther,
                             aMsInterval);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETCPULOAD_RETURN(this, hrc, 0 /*normal*/, aCpuId, *aPctExecuting, *aPctHalted, *aPctOther, *aMsInterval);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETCPULOAD_RETURN(this, hrc, 1 /*hrc exception*/, aCpuId, *aPctExecuting, *aPctHalted, *aPctOther, *aMsInterval);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEDEBUGGER_GETCPULOAD_RETURN(this, hrc, 9 /*unhandled exception*/, aCpuId, *aPctExecuting, *aPctHalted, *aPctOther, *aMsInterval);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPctExecuting=%RU32 *aPctHalted=%RU32 *aPctOther=%RU32 aMsInterval=%RI64 hrc=%Rhrc\n", this, "MachineDebugger::getCPULoad", *aPctExecuting, *aPctHalted, *aPctOther, *aMsInterval, hrc));
    return hrc;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod1IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod2IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod3IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod4IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod5IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod6IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod7IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod8IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod9IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod10IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod11IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod12IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod13IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod14IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod15IMachineDebugger()
{
    return E_NOTIMPL;
}

STDMETHODIMP MachineDebuggerWrap::InternalAndReservedMethod16IMachineDebugger()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(MachineDebuggerWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(MachineDebuggerWrap, IMachineDebugger)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "MachineDebuggerWrap.cpp"


// ##### BEGINFILE "USBDeviceFilterWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IUSBDeviceFilter.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_USBDEVICEFILTER

#include "USBDeviceFilterWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(USBDeviceFilterWrap)

//
// IUSBDeviceFilter properties
//

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "USBDeviceFilter::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "USBDeviceFilter::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMSETTER(Name)(IN_BSTR aName)
{
    LogRelFlow(("{%p} %s: enter aName=%ls\n", this, "USBDeviceFilter::setName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpName(aName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_NAME_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "USBDeviceFilter::setName", hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(Active)(BOOL *aActive)
{
    LogRelFlow(("{%p} %s: enter aActive=%p\n", this, "USBDeviceFilter::getActive", aActive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aActive);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_ACTIVE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getActive(aActive);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_ACTIVE_RETURN(this, hrc, 0 /*normal*/,*aActive != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_ACTIVE_RETURN(this, hrc, 1 /*hrc exception*/,*aActive != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_ACTIVE_RETURN(this, hrc, 9 /*unhandled exception*/,*aActive != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aActive=%RTbool hrc=%Rhrc\n", this, "USBDeviceFilter::getActive", *aActive, hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMSETTER(Active)(BOOL aActive)
{
    LogRelFlow(("{%p} %s: enter aActive=%RTbool\n", this, "USBDeviceFilter::setActive", aActive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_ACTIVE_ENTER(this, aActive != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setActive(aActive != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_ACTIVE_RETURN(this, hrc, 0 /*normal*/,aActive != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_ACTIVE_RETURN(this, hrc, 1 /*hrc exception*/,aActive != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_ACTIVE_RETURN(this, hrc, 9 /*unhandled exception*/,aActive != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "USBDeviceFilter::setActive", hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(VendorId)(BSTR *aVendorId)
{
    LogRelFlow(("{%p} %s: enter aVendorId=%p\n", this, "USBDeviceFilter::getVendorId", aVendorId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVendorId);
        BSTROutConverter TmpVendorId(aVendorId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_VENDORID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVendorId(TmpVendorId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_VENDORID_RETURN(this, hrc, 0 /*normal*/,TmpVendorId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_VENDORID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_VENDORID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVendorId=%ls hrc=%Rhrc\n", this, "USBDeviceFilter::getVendorId", *aVendorId, hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMSETTER(VendorId)(IN_BSTR aVendorId)
{
    LogRelFlow(("{%p} %s: enter aVendorId=%ls\n", this, "USBDeviceFilter::setVendorId", aVendorId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpVendorId(aVendorId);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_VENDORID_ENTER(this, TmpVendorId.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVendorId(TmpVendorId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_VENDORID_RETURN(this, hrc, 0 /*normal*/,TmpVendorId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_VENDORID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_VENDORID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "USBDeviceFilter::setVendorId", hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(ProductId)(BSTR *aProductId)
{
    LogRelFlow(("{%p} %s: enter aProductId=%p\n", this, "USBDeviceFilter::getProductId", aProductId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProductId);
        BSTROutConverter TmpProductId(aProductId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PRODUCTID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProductId(TmpProductId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PRODUCTID_RETURN(this, hrc, 0 /*normal*/,TmpProductId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PRODUCTID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PRODUCTID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProductId=%ls hrc=%Rhrc\n", this, "USBDeviceFilter::getProductId", *aProductId, hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMSETTER(ProductId)(IN_BSTR aProductId)
{
    LogRelFlow(("{%p} %s: enter aProductId=%ls\n", this, "USBDeviceFilter::setProductId", aProductId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpProductId(aProductId);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PRODUCTID_ENTER(this, TmpProductId.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProductId(TmpProductId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PRODUCTID_RETURN(this, hrc, 0 /*normal*/,TmpProductId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PRODUCTID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PRODUCTID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "USBDeviceFilter::setProductId", hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(Revision)(BSTR *aRevision)
{
    LogRelFlow(("{%p} %s: enter aRevision=%p\n", this, "USBDeviceFilter::getRevision", aRevision));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRevision);
        BSTROutConverter TmpRevision(aRevision);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_REVISION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRevision(TmpRevision.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_REVISION_RETURN(this, hrc, 0 /*normal*/,TmpRevision.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_REVISION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_REVISION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRevision=%ls hrc=%Rhrc\n", this, "USBDeviceFilter::getRevision", *aRevision, hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMSETTER(Revision)(IN_BSTR aRevision)
{
    LogRelFlow(("{%p} %s: enter aRevision=%ls\n", this, "USBDeviceFilter::setRevision", aRevision));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpRevision(aRevision);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_REVISION_ENTER(this, TmpRevision.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setRevision(TmpRevision.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_REVISION_RETURN(this, hrc, 0 /*normal*/,TmpRevision.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_REVISION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_REVISION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "USBDeviceFilter::setRevision", hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(Manufacturer)(BSTR *aManufacturer)
{
    LogRelFlow(("{%p} %s: enter aManufacturer=%p\n", this, "USBDeviceFilter::getManufacturer", aManufacturer));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aManufacturer);
        BSTROutConverter TmpManufacturer(aManufacturer);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_MANUFACTURER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getManufacturer(TmpManufacturer.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_MANUFACTURER_RETURN(this, hrc, 0 /*normal*/,TmpManufacturer.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_MANUFACTURER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_MANUFACTURER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aManufacturer=%ls hrc=%Rhrc\n", this, "USBDeviceFilter::getManufacturer", *aManufacturer, hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMSETTER(Manufacturer)(IN_BSTR aManufacturer)
{
    LogRelFlow(("{%p} %s: enter aManufacturer=%ls\n", this, "USBDeviceFilter::setManufacturer", aManufacturer));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpManufacturer(aManufacturer);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_MANUFACTURER_ENTER(this, TmpManufacturer.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setManufacturer(TmpManufacturer.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_MANUFACTURER_RETURN(this, hrc, 0 /*normal*/,TmpManufacturer.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_MANUFACTURER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_MANUFACTURER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "USBDeviceFilter::setManufacturer", hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(Product)(BSTR *aProduct)
{
    LogRelFlow(("{%p} %s: enter aProduct=%p\n", this, "USBDeviceFilter::getProduct", aProduct));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProduct);
        BSTROutConverter TmpProduct(aProduct);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PRODUCT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProduct(TmpProduct.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PRODUCT_RETURN(this, hrc, 0 /*normal*/,TmpProduct.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PRODUCT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PRODUCT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProduct=%ls hrc=%Rhrc\n", this, "USBDeviceFilter::getProduct", *aProduct, hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMSETTER(Product)(IN_BSTR aProduct)
{
    LogRelFlow(("{%p} %s: enter aProduct=%ls\n", this, "USBDeviceFilter::setProduct", aProduct));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpProduct(aProduct);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PRODUCT_ENTER(this, TmpProduct.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProduct(TmpProduct.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PRODUCT_RETURN(this, hrc, 0 /*normal*/,TmpProduct.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PRODUCT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PRODUCT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "USBDeviceFilter::setProduct", hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(SerialNumber)(BSTR *aSerialNumber)
{
    LogRelFlow(("{%p} %s: enter aSerialNumber=%p\n", this, "USBDeviceFilter::getSerialNumber", aSerialNumber));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSerialNumber);
        BSTROutConverter TmpSerialNumber(aSerialNumber);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_SERIALNUMBER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSerialNumber(TmpSerialNumber.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_SERIALNUMBER_RETURN(this, hrc, 0 /*normal*/,TmpSerialNumber.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_SERIALNUMBER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_SERIALNUMBER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSerialNumber=%ls hrc=%Rhrc\n", this, "USBDeviceFilter::getSerialNumber", *aSerialNumber, hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMSETTER(SerialNumber)(IN_BSTR aSerialNumber)
{
    LogRelFlow(("{%p} %s: enter aSerialNumber=%ls\n", this, "USBDeviceFilter::setSerialNumber", aSerialNumber));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpSerialNumber(aSerialNumber);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_SERIALNUMBER_ENTER(this, TmpSerialNumber.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setSerialNumber(TmpSerialNumber.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_SERIALNUMBER_RETURN(this, hrc, 0 /*normal*/,TmpSerialNumber.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_SERIALNUMBER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_SERIALNUMBER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "USBDeviceFilter::setSerialNumber", hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(Port)(BSTR *aPort)
{
    LogRelFlow(("{%p} %s: enter aPort=%p\n", this, "USBDeviceFilter::getPort", aPort));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPort);
        BSTROutConverter TmpPort(aPort);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PORT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPort(TmpPort.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PORT_RETURN(this, hrc, 0 /*normal*/,TmpPort.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PORT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_PORT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPort=%ls hrc=%Rhrc\n", this, "USBDeviceFilter::getPort", *aPort, hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMSETTER(Port)(IN_BSTR aPort)
{
    LogRelFlow(("{%p} %s: enter aPort=%ls\n", this, "USBDeviceFilter::setPort", aPort));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpPort(aPort);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PORT_ENTER(this, TmpPort.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setPort(TmpPort.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PORT_RETURN(this, hrc, 0 /*normal*/,TmpPort.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PORT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_PORT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "USBDeviceFilter::setPort", hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(Remote)(BSTR *aRemote)
{
    LogRelFlow(("{%p} %s: enter aRemote=%p\n", this, "USBDeviceFilter::getRemote", aRemote));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRemote);
        BSTROutConverter TmpRemote(aRemote);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_REMOTE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRemote(TmpRemote.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_REMOTE_RETURN(this, hrc, 0 /*normal*/,TmpRemote.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_REMOTE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_REMOTE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRemote=%ls hrc=%Rhrc\n", this, "USBDeviceFilter::getRemote", *aRemote, hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMSETTER(Remote)(IN_BSTR aRemote)
{
    LogRelFlow(("{%p} %s: enter aRemote=%ls\n", this, "USBDeviceFilter::setRemote", aRemote));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpRemote(aRemote);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_REMOTE_ENTER(this, TmpRemote.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setRemote(TmpRemote.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_REMOTE_RETURN(this, hrc, 0 /*normal*/,TmpRemote.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_REMOTE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_REMOTE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "USBDeviceFilter::setRemote", hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(MaskedInterfaces)(ULONG *aMaskedInterfaces)
{
    LogRelFlow(("{%p} %s: enter aMaskedInterfaces=%p\n", this, "USBDeviceFilter::getMaskedInterfaces", aMaskedInterfaces));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaskedInterfaces);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_MASKEDINTERFACES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaskedInterfaces(aMaskedInterfaces);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_MASKEDINTERFACES_RETURN(this, hrc, 0 /*normal*/,*aMaskedInterfaces);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_MASKEDINTERFACES_RETURN(this, hrc, 1 /*hrc exception*/,*aMaskedInterfaces);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_GET_MASKEDINTERFACES_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaskedInterfaces);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaskedInterfaces=%RU32 hrc=%Rhrc\n", this, "USBDeviceFilter::getMaskedInterfaces", *aMaskedInterfaces, hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMSETTER(MaskedInterfaces)(ULONG aMaskedInterfaces)
{
    LogRelFlow(("{%p} %s: enter aMaskedInterfaces=%RU32\n", this, "USBDeviceFilter::setMaskedInterfaces", aMaskedInterfaces));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_MASKEDINTERFACES_ENTER(this, aMaskedInterfaces);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMaskedInterfaces(aMaskedInterfaces);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_MASKEDINTERFACES_RETURN(this, hrc, 0 /*normal*/,aMaskedInterfaces);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_MASKEDINTERFACES_RETURN(this, hrc, 1 /*hrc exception*/,aMaskedInterfaces);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_USBDEVICEFILTER_SET_MASKEDINTERFACES_RETURN(this, hrc, 9 /*unhandled exception*/,aMaskedInterfaces);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "USBDeviceFilter::setMaskedInterfaces", hrc));
    return hrc;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute1IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute2IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute3IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute4IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute5IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute6IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute7IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP USBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute8IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IUSBDeviceFilter methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(USBDeviceFilterWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(USBDeviceFilterWrap, IUSBDeviceFilter)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "USBDeviceFilterWrap.cpp"


// ##### BEGINFILE "HostUSBDeviceWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IHostUSBDevice.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_HOSTUSBDEVICE

#include "HostUSBDeviceWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(HostUSBDeviceWrap)

//
// IUSBDevice properties
//

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(Id)(BSTR *aId)
{
    LogRelFlow(("{%p} %s: enter aId=%p\n", this, "HostUSBDevice::getId", aId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aId);
        UuidOutConverter TmpId(aId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_ID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getId(TmpId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_ID_RETURN(this, hrc, 0 /*normal*/,TmpId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_ID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_ID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aId=%ls hrc=%Rhrc\n", this, "HostUSBDevice::getId", *aId, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(VendorId)(USHORT *aVendorId)
{
    LogRelFlow(("{%p} %s: enter aVendorId=%p\n", this, "HostUSBDevice::getVendorId", aVendorId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVendorId);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_VENDORID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVendorId(aVendorId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_VENDORID_RETURN(this, hrc, 0 /*normal*/,*aVendorId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_VENDORID_RETURN(this, hrc, 1 /*hrc exception*/,*aVendorId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_VENDORID_RETURN(this, hrc, 9 /*unhandled exception*/,*aVendorId);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVendorId=%RU16 hrc=%Rhrc\n", this, "HostUSBDevice::getVendorId", *aVendorId, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(ProductId)(USHORT *aProductId)
{
    LogRelFlow(("{%p} %s: enter aProductId=%p\n", this, "HostUSBDevice::getProductId", aProductId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProductId);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PRODUCTID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProductId(aProductId);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PRODUCTID_RETURN(this, hrc, 0 /*normal*/,*aProductId);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PRODUCTID_RETURN(this, hrc, 1 /*hrc exception*/,*aProductId);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PRODUCTID_RETURN(this, hrc, 9 /*unhandled exception*/,*aProductId);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProductId=%RU16 hrc=%Rhrc\n", this, "HostUSBDevice::getProductId", *aProductId, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(Revision)(USHORT *aRevision)
{
    LogRelFlow(("{%p} %s: enter aRevision=%p\n", this, "HostUSBDevice::getRevision", aRevision));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRevision);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_REVISION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRevision(aRevision);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_REVISION_RETURN(this, hrc, 0 /*normal*/,*aRevision);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_REVISION_RETURN(this, hrc, 1 /*hrc exception*/,*aRevision);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_REVISION_RETURN(this, hrc, 9 /*unhandled exception*/,*aRevision);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRevision=%RU16 hrc=%Rhrc\n", this, "HostUSBDevice::getRevision", *aRevision, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(Manufacturer)(BSTR *aManufacturer)
{
    LogRelFlow(("{%p} %s: enter aManufacturer=%p\n", this, "HostUSBDevice::getManufacturer", aManufacturer));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aManufacturer);
        BSTROutConverter TmpManufacturer(aManufacturer);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_MANUFACTURER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getManufacturer(TmpManufacturer.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_MANUFACTURER_RETURN(this, hrc, 0 /*normal*/,TmpManufacturer.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_MANUFACTURER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_MANUFACTURER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aManufacturer=%ls hrc=%Rhrc\n", this, "HostUSBDevice::getManufacturer", *aManufacturer, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(Product)(BSTR *aProduct)
{
    LogRelFlow(("{%p} %s: enter aProduct=%p\n", this, "HostUSBDevice::getProduct", aProduct));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProduct);
        BSTROutConverter TmpProduct(aProduct);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PRODUCT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProduct(TmpProduct.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PRODUCT_RETURN(this, hrc, 0 /*normal*/,TmpProduct.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PRODUCT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PRODUCT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProduct=%ls hrc=%Rhrc\n", this, "HostUSBDevice::getProduct", *aProduct, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(SerialNumber)(BSTR *aSerialNumber)
{
    LogRelFlow(("{%p} %s: enter aSerialNumber=%p\n", this, "HostUSBDevice::getSerialNumber", aSerialNumber));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSerialNumber);
        BSTROutConverter TmpSerialNumber(aSerialNumber);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_SERIALNUMBER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSerialNumber(TmpSerialNumber.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_SERIALNUMBER_RETURN(this, hrc, 0 /*normal*/,TmpSerialNumber.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_SERIALNUMBER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_SERIALNUMBER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSerialNumber=%ls hrc=%Rhrc\n", this, "HostUSBDevice::getSerialNumber", *aSerialNumber, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(Address)(BSTR *aAddress)
{
    LogRelFlow(("{%p} %s: enter aAddress=%p\n", this, "HostUSBDevice::getAddress", aAddress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAddress);
        BSTROutConverter TmpAddress(aAddress);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_ADDRESS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAddress(TmpAddress.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_ADDRESS_RETURN(this, hrc, 0 /*normal*/,TmpAddress.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_ADDRESS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_ADDRESS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAddress=%ls hrc=%Rhrc\n", this, "HostUSBDevice::getAddress", *aAddress, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(Port)(USHORT *aPort)
{
    LogRelFlow(("{%p} %s: enter aPort=%p\n", this, "HostUSBDevice::getPort", aPort));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPort);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PORT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPort(aPort);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PORT_RETURN(this, hrc, 0 /*normal*/,*aPort);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PORT_RETURN(this, hrc, 1 /*hrc exception*/,*aPort);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PORT_RETURN(this, hrc, 9 /*unhandled exception*/,*aPort);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPort=%RU16 hrc=%Rhrc\n", this, "HostUSBDevice::getPort", *aPort, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(PortPath)(BSTR *aPortPath)
{
    LogRelFlow(("{%p} %s: enter aPortPath=%p\n", this, "HostUSBDevice::getPortPath", aPortPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPortPath);
        BSTROutConverter TmpPortPath(aPortPath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PORTPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPortPath(TmpPortPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PORTPATH_RETURN(this, hrc, 0 /*normal*/,TmpPortPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PORTPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_PORTPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPortPath=%ls hrc=%Rhrc\n", this, "HostUSBDevice::getPortPath", *aPortPath, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(Version)(USHORT *aVersion)
{
    LogRelFlow(("{%p} %s: enter aVersion=%p\n", this, "HostUSBDevice::getVersion", aVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVersion);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_VERSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVersion(aVersion);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_VERSION_RETURN(this, hrc, 0 /*normal*/,*aVersion);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_VERSION_RETURN(this, hrc, 1 /*hrc exception*/,*aVersion);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_VERSION_RETURN(this, hrc, 9 /*unhandled exception*/,*aVersion);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVersion=%RU16 hrc=%Rhrc\n", this, "HostUSBDevice::getVersion", *aVersion, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(Speed)(USBConnectionSpeed_T *aSpeed)
{
    LogRelFlow(("{%p} %s: enter aSpeed=%p\n", this, "HostUSBDevice::getSpeed", aSpeed));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSpeed);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_SPEED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSpeed(aSpeed);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_SPEED_RETURN(this, hrc, 0 /*normal*/,*aSpeed);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_SPEED_RETURN(this, hrc, 1 /*hrc exception*/,*aSpeed);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_SPEED_RETURN(this, hrc, 9 /*unhandled exception*/,*aSpeed);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSpeed=%RU32 hrc=%Rhrc\n", this, "HostUSBDevice::getSpeed", *aSpeed, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(Remote)(BOOL *aRemote)
{
    LogRelFlow(("{%p} %s: enter aRemote=%p\n", this, "HostUSBDevice::getRemote", aRemote));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRemote);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_REMOTE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRemote(aRemote);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_REMOTE_RETURN(this, hrc, 0 /*normal*/,*aRemote != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_REMOTE_RETURN(this, hrc, 1 /*hrc exception*/,*aRemote != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_REMOTE_RETURN(this, hrc, 9 /*unhandled exception*/,*aRemote != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRemote=%RTbool hrc=%Rhrc\n", this, "HostUSBDevice::getRemote", *aRemote, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(DeviceInfo)(ComSafeArrayOut(BSTR, aDeviceInfo))
{
    LogRelFlow(("{%p} %s: enter aDeviceInfo=%p\n", this, "HostUSBDevice::getDeviceInfo", aDeviceInfo));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDeviceInfo);
        ArrayBSTROutConverter TmpDeviceInfo(ComSafeArrayOutArg(aDeviceInfo));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_DEVICEINFO_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDeviceInfo(TmpDeviceInfo.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_DEVICEINFO_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpDeviceInfo.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_DEVICEINFO_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_DEVICEINFO_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDeviceInfo=%zu hrc=%Rhrc\n", this, "HostUSBDevice::getDeviceInfo", ComSafeArraySize(*aDeviceInfo), hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(Backend)(BSTR *aBackend)
{
    LogRelFlow(("{%p} %s: enter aBackend=%p\n", this, "HostUSBDevice::getBackend", aBackend));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aBackend);
        BSTROutConverter TmpBackend(aBackend);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_BACKEND_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getBackend(TmpBackend.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_BACKEND_RETURN(this, hrc, 0 /*normal*/,TmpBackend.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_BACKEND_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_BACKEND_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aBackend=%ls hrc=%Rhrc\n", this, "HostUSBDevice::getBackend", *aBackend, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(InternalAndReservedAttribute1IUSBDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(InternalAndReservedAttribute2IUSBDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(InternalAndReservedAttribute3IUSBDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(InternalAndReservedAttribute4IUSBDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IHostUSBDevice properties
//

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(State)(USBDeviceState_T *aState)
{
    LogRelFlow(("{%p} %s: enter aState=%p\n", this, "HostUSBDevice::getState", aState));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aState);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_STATE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getState(aState);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_STATE_RETURN(this, hrc, 0 /*normal*/,*aState);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_STATE_RETURN(this, hrc, 1 /*hrc exception*/,*aState);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICE_GET_STATE_RETURN(this, hrc, 9 /*unhandled exception*/,*aState);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aState=%RU32 hrc=%Rhrc\n", this, "HostUSBDevice::getState", *aState, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(InternalAndReservedAttribute1IHostUSBDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(InternalAndReservedAttribute2IHostUSBDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(InternalAndReservedAttribute3IHostUSBDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceWrap::COMGETTER(InternalAndReservedAttribute4IHostUSBDevice)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IUSBDevice methods
//

//
// IHostUSBDevice methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(HostUSBDeviceWrap)
NS_IMPL_THREADSAFE_ISUPPORTS2_CI(HostUSBDeviceWrap, IHostUSBDevice, IUSBDevice)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "HostUSBDeviceWrap.cpp"


// ##### BEGINFILE "HostUSBDeviceFilterWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IHostUSBDeviceFilter.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_HOSTUSBDEVICEFILTER

#include "HostUSBDeviceFilterWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(HostUSBDeviceFilterWrap)

//
// IUSBDeviceFilter properties
//

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "HostUSBDeviceFilter::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(Name)(IN_BSTR aName)
{
    LogRelFlow(("{%p} %s: enter aName=%ls\n", this, "HostUSBDeviceFilter::setName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpName(aName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_NAME_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setName", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(Active)(BOOL *aActive)
{
    LogRelFlow(("{%p} %s: enter aActive=%p\n", this, "HostUSBDeviceFilter::getActive", aActive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aActive);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_ACTIVE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getActive(aActive);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_ACTIVE_RETURN(this, hrc, 0 /*normal*/,*aActive != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_ACTIVE_RETURN(this, hrc, 1 /*hrc exception*/,*aActive != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_ACTIVE_RETURN(this, hrc, 9 /*unhandled exception*/,*aActive != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aActive=%RTbool hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getActive", *aActive, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(Active)(BOOL aActive)
{
    LogRelFlow(("{%p} %s: enter aActive=%RTbool\n", this, "HostUSBDeviceFilter::setActive", aActive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_ACTIVE_ENTER(this, aActive != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setActive(aActive != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_ACTIVE_RETURN(this, hrc, 0 /*normal*/,aActive != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_ACTIVE_RETURN(this, hrc, 1 /*hrc exception*/,aActive != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_ACTIVE_RETURN(this, hrc, 9 /*unhandled exception*/,aActive != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setActive", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(VendorId)(BSTR *aVendorId)
{
    LogRelFlow(("{%p} %s: enter aVendorId=%p\n", this, "HostUSBDeviceFilter::getVendorId", aVendorId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVendorId);
        BSTROutConverter TmpVendorId(aVendorId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_VENDORID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVendorId(TmpVendorId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_VENDORID_RETURN(this, hrc, 0 /*normal*/,TmpVendorId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_VENDORID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_VENDORID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVendorId=%ls hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getVendorId", *aVendorId, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(VendorId)(IN_BSTR aVendorId)
{
    LogRelFlow(("{%p} %s: enter aVendorId=%ls\n", this, "HostUSBDeviceFilter::setVendorId", aVendorId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpVendorId(aVendorId);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_VENDORID_ENTER(this, TmpVendorId.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setVendorId(TmpVendorId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_VENDORID_RETURN(this, hrc, 0 /*normal*/,TmpVendorId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_VENDORID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_VENDORID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setVendorId", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(ProductId)(BSTR *aProductId)
{
    LogRelFlow(("{%p} %s: enter aProductId=%p\n", this, "HostUSBDeviceFilter::getProductId", aProductId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProductId);
        BSTROutConverter TmpProductId(aProductId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PRODUCTID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProductId(TmpProductId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PRODUCTID_RETURN(this, hrc, 0 /*normal*/,TmpProductId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PRODUCTID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PRODUCTID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProductId=%ls hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getProductId", *aProductId, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(ProductId)(IN_BSTR aProductId)
{
    LogRelFlow(("{%p} %s: enter aProductId=%ls\n", this, "HostUSBDeviceFilter::setProductId", aProductId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpProductId(aProductId);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PRODUCTID_ENTER(this, TmpProductId.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProductId(TmpProductId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PRODUCTID_RETURN(this, hrc, 0 /*normal*/,TmpProductId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PRODUCTID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PRODUCTID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setProductId", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(Revision)(BSTR *aRevision)
{
    LogRelFlow(("{%p} %s: enter aRevision=%p\n", this, "HostUSBDeviceFilter::getRevision", aRevision));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRevision);
        BSTROutConverter TmpRevision(aRevision);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_REVISION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRevision(TmpRevision.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_REVISION_RETURN(this, hrc, 0 /*normal*/,TmpRevision.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_REVISION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_REVISION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRevision=%ls hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getRevision", *aRevision, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(Revision)(IN_BSTR aRevision)
{
    LogRelFlow(("{%p} %s: enter aRevision=%ls\n", this, "HostUSBDeviceFilter::setRevision", aRevision));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpRevision(aRevision);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_REVISION_ENTER(this, TmpRevision.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setRevision(TmpRevision.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_REVISION_RETURN(this, hrc, 0 /*normal*/,TmpRevision.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_REVISION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_REVISION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setRevision", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(Manufacturer)(BSTR *aManufacturer)
{
    LogRelFlow(("{%p} %s: enter aManufacturer=%p\n", this, "HostUSBDeviceFilter::getManufacturer", aManufacturer));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aManufacturer);
        BSTROutConverter TmpManufacturer(aManufacturer);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_MANUFACTURER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getManufacturer(TmpManufacturer.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_MANUFACTURER_RETURN(this, hrc, 0 /*normal*/,TmpManufacturer.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_MANUFACTURER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_MANUFACTURER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aManufacturer=%ls hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getManufacturer", *aManufacturer, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(Manufacturer)(IN_BSTR aManufacturer)
{
    LogRelFlow(("{%p} %s: enter aManufacturer=%ls\n", this, "HostUSBDeviceFilter::setManufacturer", aManufacturer));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpManufacturer(aManufacturer);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_MANUFACTURER_ENTER(this, TmpManufacturer.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setManufacturer(TmpManufacturer.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_MANUFACTURER_RETURN(this, hrc, 0 /*normal*/,TmpManufacturer.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_MANUFACTURER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_MANUFACTURER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setManufacturer", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(Product)(BSTR *aProduct)
{
    LogRelFlow(("{%p} %s: enter aProduct=%p\n", this, "HostUSBDeviceFilter::getProduct", aProduct));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProduct);
        BSTROutConverter TmpProduct(aProduct);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PRODUCT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProduct(TmpProduct.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PRODUCT_RETURN(this, hrc, 0 /*normal*/,TmpProduct.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PRODUCT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PRODUCT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProduct=%ls hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getProduct", *aProduct, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(Product)(IN_BSTR aProduct)
{
    LogRelFlow(("{%p} %s: enter aProduct=%ls\n", this, "HostUSBDeviceFilter::setProduct", aProduct));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpProduct(aProduct);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PRODUCT_ENTER(this, TmpProduct.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProduct(TmpProduct.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PRODUCT_RETURN(this, hrc, 0 /*normal*/,TmpProduct.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PRODUCT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PRODUCT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setProduct", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(SerialNumber)(BSTR *aSerialNumber)
{
    LogRelFlow(("{%p} %s: enter aSerialNumber=%p\n", this, "HostUSBDeviceFilter::getSerialNumber", aSerialNumber));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSerialNumber);
        BSTROutConverter TmpSerialNumber(aSerialNumber);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_SERIALNUMBER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSerialNumber(TmpSerialNumber.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_SERIALNUMBER_RETURN(this, hrc, 0 /*normal*/,TmpSerialNumber.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_SERIALNUMBER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_SERIALNUMBER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSerialNumber=%ls hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getSerialNumber", *aSerialNumber, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(SerialNumber)(IN_BSTR aSerialNumber)
{
    LogRelFlow(("{%p} %s: enter aSerialNumber=%ls\n", this, "HostUSBDeviceFilter::setSerialNumber", aSerialNumber));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpSerialNumber(aSerialNumber);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_SERIALNUMBER_ENTER(this, TmpSerialNumber.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setSerialNumber(TmpSerialNumber.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_SERIALNUMBER_RETURN(this, hrc, 0 /*normal*/,TmpSerialNumber.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_SERIALNUMBER_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_SERIALNUMBER_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setSerialNumber", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(Port)(BSTR *aPort)
{
    LogRelFlow(("{%p} %s: enter aPort=%p\n", this, "HostUSBDeviceFilter::getPort", aPort));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPort);
        BSTROutConverter TmpPort(aPort);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PORT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPort(TmpPort.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PORT_RETURN(this, hrc, 0 /*normal*/,TmpPort.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PORT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_PORT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPort=%ls hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getPort", *aPort, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(Port)(IN_BSTR aPort)
{
    LogRelFlow(("{%p} %s: enter aPort=%ls\n", this, "HostUSBDeviceFilter::setPort", aPort));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpPort(aPort);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PORT_ENTER(this, TmpPort.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setPort(TmpPort.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PORT_RETURN(this, hrc, 0 /*normal*/,TmpPort.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PORT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_PORT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setPort", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(Remote)(BSTR *aRemote)
{
    LogRelFlow(("{%p} %s: enter aRemote=%p\n", this, "HostUSBDeviceFilter::getRemote", aRemote));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRemote);
        BSTROutConverter TmpRemote(aRemote);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_REMOTE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRemote(TmpRemote.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_REMOTE_RETURN(this, hrc, 0 /*normal*/,TmpRemote.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_REMOTE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_REMOTE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRemote=%ls hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getRemote", *aRemote, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(Remote)(IN_BSTR aRemote)
{
    LogRelFlow(("{%p} %s: enter aRemote=%ls\n", this, "HostUSBDeviceFilter::setRemote", aRemote));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpRemote(aRemote);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_REMOTE_ENTER(this, TmpRemote.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setRemote(TmpRemote.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_REMOTE_RETURN(this, hrc, 0 /*normal*/,TmpRemote.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_REMOTE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_REMOTE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setRemote", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(MaskedInterfaces)(ULONG *aMaskedInterfaces)
{
    LogRelFlow(("{%p} %s: enter aMaskedInterfaces=%p\n", this, "HostUSBDeviceFilter::getMaskedInterfaces", aMaskedInterfaces));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaskedInterfaces);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_MASKEDINTERFACES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaskedInterfaces(aMaskedInterfaces);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_MASKEDINTERFACES_RETURN(this, hrc, 0 /*normal*/,*aMaskedInterfaces);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_MASKEDINTERFACES_RETURN(this, hrc, 1 /*hrc exception*/,*aMaskedInterfaces);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_MASKEDINTERFACES_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaskedInterfaces);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaskedInterfaces=%RU32 hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getMaskedInterfaces", *aMaskedInterfaces, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(MaskedInterfaces)(ULONG aMaskedInterfaces)
{
    LogRelFlow(("{%p} %s: enter aMaskedInterfaces=%RU32\n", this, "HostUSBDeviceFilter::setMaskedInterfaces", aMaskedInterfaces));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_MASKEDINTERFACES_ENTER(this, aMaskedInterfaces);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMaskedInterfaces(aMaskedInterfaces);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_MASKEDINTERFACES_RETURN(this, hrc, 0 /*normal*/,aMaskedInterfaces);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_MASKEDINTERFACES_RETURN(this, hrc, 1 /*hrc exception*/,aMaskedInterfaces);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_MASKEDINTERFACES_RETURN(this, hrc, 9 /*unhandled exception*/,aMaskedInterfaces);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setMaskedInterfaces", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute1IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute2IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute3IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute4IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute5IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute6IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute7IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute8IUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IHostUSBDeviceFilter properties
//

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(Action)(USBDeviceFilterAction_T *aAction)
{
    LogRelFlow(("{%p} %s: enter aAction=%p\n", this, "HostUSBDeviceFilter::getAction", aAction));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAction);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_ACTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAction(aAction);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_ACTION_RETURN(this, hrc, 0 /*normal*/,*aAction);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_ACTION_RETURN(this, hrc, 1 /*hrc exception*/,*aAction);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_GET_ACTION_RETURN(this, hrc, 9 /*unhandled exception*/,*aAction);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAction=%RU32 hrc=%Rhrc\n", this, "HostUSBDeviceFilter::getAction", *aAction, hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMSETTER(Action)(USBDeviceFilterAction_T aAction)
{
    LogRelFlow(("{%p} %s: enter aAction=%RU32\n", this, "HostUSBDeviceFilter::setAction", aAction));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_ACTION_ENTER(this, aAction);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAction(aAction);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_ACTION_RETURN(this, hrc, 0 /*normal*/,aAction);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_ACTION_RETURN(this, hrc, 1 /*hrc exception*/,aAction);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_HOSTUSBDEVICEFILTER_SET_ACTION_RETURN(this, hrc, 9 /*unhandled exception*/,aAction);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "HostUSBDeviceFilter::setAction", hrc));
    return hrc;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute1IHostUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute2IHostUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute3IHostUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute4IHostUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute5IHostUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute6IHostUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute7IHostUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP HostUSBDeviceFilterWrap::COMGETTER(InternalAndReservedAttribute8IHostUSBDeviceFilter)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IUSBDeviceFilter methods
//

//
// IHostUSBDeviceFilter methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(HostUSBDeviceFilterWrap)
NS_IMPL_THREADSAFE_ISUPPORTS2_CI(HostUSBDeviceFilterWrap, IHostUSBDeviceFilter, IUSBDeviceFilter)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "HostUSBDeviceFilterWrap.cpp"


// ##### BEGINFILE "SharedFolderWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for ISharedFolder.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_SHAREDFOLDER

#include "SharedFolderWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(SharedFolderWrap)

//
// ISharedFolder properties
//

STDMETHODIMP SharedFolderWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "SharedFolder::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "SharedFolder::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(HostPath)(BSTR *aHostPath)
{
    LogRelFlow(("{%p} %s: enter aHostPath=%p\n", this, "SharedFolder::getHostPath", aHostPath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHostPath);
        BSTROutConverter TmpHostPath(aHostPath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_HOSTPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHostPath(TmpHostPath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_HOSTPATH_RETURN(this, hrc, 0 /*normal*/,TmpHostPath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_HOSTPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_HOSTPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHostPath=%ls hrc=%Rhrc\n", this, "SharedFolder::getHostPath", *aHostPath, hrc));
    return hrc;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(Accessible)(BOOL *aAccessible)
{
    LogRelFlow(("{%p} %s: enter aAccessible=%p\n", this, "SharedFolder::getAccessible", aAccessible));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAccessible);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_ACCESSIBLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAccessible(aAccessible);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_ACCESSIBLE_RETURN(this, hrc, 0 /*normal*/,*aAccessible != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_ACCESSIBLE_RETURN(this, hrc, 1 /*hrc exception*/,*aAccessible != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_ACCESSIBLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aAccessible != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAccessible=%RTbool hrc=%Rhrc\n", this, "SharedFolder::getAccessible", *aAccessible, hrc));
    return hrc;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(Writable)(BOOL *aWritable)
{
    LogRelFlow(("{%p} %s: enter aWritable=%p\n", this, "SharedFolder::getWritable", aWritable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWritable);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_WRITABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWritable(aWritable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_WRITABLE_RETURN(this, hrc, 0 /*normal*/,*aWritable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_WRITABLE_RETURN(this, hrc, 1 /*hrc exception*/,*aWritable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_WRITABLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aWritable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWritable=%RTbool hrc=%Rhrc\n", this, "SharedFolder::getWritable", *aWritable, hrc));
    return hrc;
}

STDMETHODIMP SharedFolderWrap::COMSETTER(Writable)(BOOL aWritable)
{
    LogRelFlow(("{%p} %s: enter aWritable=%RTbool\n", this, "SharedFolder::setWritable", aWritable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_WRITABLE_ENTER(this, aWritable != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setWritable(aWritable != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_WRITABLE_RETURN(this, hrc, 0 /*normal*/,aWritable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_WRITABLE_RETURN(this, hrc, 1 /*hrc exception*/,aWritable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_WRITABLE_RETURN(this, hrc, 9 /*unhandled exception*/,aWritable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SharedFolder::setWritable", hrc));
    return hrc;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(AutoMount)(BOOL *aAutoMount)
{
    LogRelFlow(("{%p} %s: enter aAutoMount=%p\n", this, "SharedFolder::getAutoMount", aAutoMount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAutoMount);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_AUTOMOUNT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAutoMount(aAutoMount);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_AUTOMOUNT_RETURN(this, hrc, 0 /*normal*/,*aAutoMount != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_AUTOMOUNT_RETURN(this, hrc, 1 /*hrc exception*/,*aAutoMount != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_AUTOMOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,*aAutoMount != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAutoMount=%RTbool hrc=%Rhrc\n", this, "SharedFolder::getAutoMount", *aAutoMount, hrc));
    return hrc;
}

STDMETHODIMP SharedFolderWrap::COMSETTER(AutoMount)(BOOL aAutoMount)
{
    LogRelFlow(("{%p} %s: enter aAutoMount=%RTbool\n", this, "SharedFolder::setAutoMount", aAutoMount));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_AUTOMOUNT_ENTER(this, aAutoMount != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAutoMount(aAutoMount != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_AUTOMOUNT_RETURN(this, hrc, 0 /*normal*/,aAutoMount != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_AUTOMOUNT_RETURN(this, hrc, 1 /*hrc exception*/,aAutoMount != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_AUTOMOUNT_RETURN(this, hrc, 9 /*unhandled exception*/,aAutoMount != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SharedFolder::setAutoMount", hrc));
    return hrc;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(AutoMountPoint)(BSTR *aAutoMountPoint)
{
    LogRelFlow(("{%p} %s: enter aAutoMountPoint=%p\n", this, "SharedFolder::getAutoMountPoint", aAutoMountPoint));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAutoMountPoint);
        BSTROutConverter TmpAutoMountPoint(aAutoMountPoint);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_AUTOMOUNTPOINT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getAutoMountPoint(TmpAutoMountPoint.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_AUTOMOUNTPOINT_RETURN(this, hrc, 0 /*normal*/,TmpAutoMountPoint.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_AUTOMOUNTPOINT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_AUTOMOUNTPOINT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aAutoMountPoint=%ls hrc=%Rhrc\n", this, "SharedFolder::getAutoMountPoint", *aAutoMountPoint, hrc));
    return hrc;
}

STDMETHODIMP SharedFolderWrap::COMSETTER(AutoMountPoint)(IN_BSTR aAutoMountPoint)
{
    LogRelFlow(("{%p} %s: enter aAutoMountPoint=%ls\n", this, "SharedFolder::setAutoMountPoint", aAutoMountPoint));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpAutoMountPoint(aAutoMountPoint);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_AUTOMOUNTPOINT_ENTER(this, TmpAutoMountPoint.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setAutoMountPoint(TmpAutoMountPoint.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_AUTOMOUNTPOINT_RETURN(this, hrc, 0 /*normal*/,TmpAutoMountPoint.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_AUTOMOUNTPOINT_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_SET_AUTOMOUNTPOINT_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SharedFolder::setAutoMountPoint", hrc));
    return hrc;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(LastAccessError)(BSTR *aLastAccessError)
{
    LogRelFlow(("{%p} %s: enter aLastAccessError=%p\n", this, "SharedFolder::getLastAccessError", aLastAccessError));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLastAccessError);
        BSTROutConverter TmpLastAccessError(aLastAccessError);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_LASTACCESSERROR_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLastAccessError(TmpLastAccessError.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_LASTACCESSERROR_RETURN(this, hrc, 0 /*normal*/,TmpLastAccessError.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_LASTACCESSERROR_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SHAREDFOLDER_GET_LASTACCESSERROR_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLastAccessError=%ls hrc=%Rhrc\n", this, "SharedFolder::getLastAccessError", *aLastAccessError, hrc));
    return hrc;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(InternalAndReservedAttribute1ISharedFolder)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(InternalAndReservedAttribute2ISharedFolder)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(InternalAndReservedAttribute3ISharedFolder)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(InternalAndReservedAttribute4ISharedFolder)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(InternalAndReservedAttribute5ISharedFolder)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(InternalAndReservedAttribute6ISharedFolder)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(InternalAndReservedAttribute7ISharedFolder)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP SharedFolderWrap::COMGETTER(InternalAndReservedAttribute8ISharedFolder)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// ISharedFolder methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(SharedFolderWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(SharedFolderWrap, ISharedFolder)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "SharedFolderWrap.cpp"


// ##### BEGINFILE "PerformanceCollectorWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IPerformanceCollector.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_PERFORMANCECOLLECTOR

#include "PerformanceCollectorWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(PerformanceCollectorWrap)

//
// IPerformanceCollector properties
//

STDMETHODIMP PerformanceCollectorWrap::COMGETTER(MetricNames)(ComSafeArrayOut(BSTR, aMetricNames))
{
    LogRelFlow(("{%p} %s: enter aMetricNames=%p\n", this, "PerformanceCollector::getMetricNames", aMetricNames));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMetricNames);
        ArrayBSTROutConverter TmpMetricNames(ComSafeArrayOutArg(aMetricNames));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_GET_METRICNAMES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMetricNames(TmpMetricNames.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_GET_METRICNAMES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpMetricNames.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_GET_METRICNAMES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_GET_METRICNAMES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMetricNames=%zu hrc=%Rhrc\n", this, "PerformanceCollector::getMetricNames", ComSafeArraySize(*aMetricNames), hrc));
    return hrc;
}

STDMETHODIMP PerformanceCollectorWrap::COMGETTER(InternalAndReservedAttribute1IPerformanceCollector)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP PerformanceCollectorWrap::COMGETTER(InternalAndReservedAttribute2IPerformanceCollector)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP PerformanceCollectorWrap::COMGETTER(InternalAndReservedAttribute3IPerformanceCollector)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP PerformanceCollectorWrap::COMGETTER(InternalAndReservedAttribute4IPerformanceCollector)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP PerformanceCollectorWrap::COMGETTER(InternalAndReservedAttribute5IPerformanceCollector)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP PerformanceCollectorWrap::COMGETTER(InternalAndReservedAttribute6IPerformanceCollector)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP PerformanceCollectorWrap::COMGETTER(InternalAndReservedAttribute7IPerformanceCollector)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP PerformanceCollectorWrap::COMGETTER(InternalAndReservedAttribute8IPerformanceCollector)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IPerformanceCollector methods
//

STDMETHODIMP PerformanceCollectorWrap::GetMetrics(ComSafeArrayIn(IN_BSTR, aMetricNames),
                                                  ComSafeArrayIn(IUnknown *, aObjects),
                                                  ComSafeArrayOut(IPerformanceMetric *, aMetrics))
{
    LogRelFlow(("{%p} %s:enter aMetricNames=%zu aObjects=%zu aMetrics=%p\n", this, "PerformanceCollector::getMetrics", aMetricNames, aObjects, aMetrics));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMetrics);


        ArrayBSTRInConverter TmpMetricNames(ComSafeArrayInArg(aMetricNames));
        ArrayComTypeInConverter<IUnknown> TmpObjects(ComSafeArrayInArg(aObjects));
        ArrayComTypeOutConverter<IPerformanceMetric> TmpMetrics(ComSafeArrayOutArg(aMetrics));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_GETMETRICS_ENTER(this, (uint32_t)TmpMetricNames.array().size(), NULL /*for now*/, (uint32_t)TmpObjects.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMetrics(TmpMetricNames.array(),
                             TmpObjects.array(),
                             TmpMetrics.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_GETMETRICS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpMetricNames.array().size(), NULL /*for now*/, (uint32_t)TmpObjects.array().size(), NULL /*for now*/, (uint32_t)TmpMetrics.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_GETMETRICS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_GETMETRICS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aMetrics=%zu hrc=%Rhrc\n", this, "PerformanceCollector::getMetrics", ComSafeArraySize(*aMetrics), hrc));
    return hrc;
}

STDMETHODIMP PerformanceCollectorWrap::SetupMetrics(ComSafeArrayIn(IN_BSTR, aMetricNames),
                                                    ComSafeArrayIn(IUnknown *, aObjects),
                                                    ULONG aPeriod,
                                                    ULONG aCount,
                                                    ComSafeArrayOut(IPerformanceMetric *, aAffectedMetrics))
{
    LogRelFlow(("{%p} %s:enter aMetricNames=%zu aObjects=%zu aPeriod=%RU32 aCount=%RU32 aAffectedMetrics=%p\n", this, "PerformanceCollector::setupMetrics", aMetricNames, aObjects, aPeriod, aCount, aAffectedMetrics));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAffectedMetrics);


        ArrayBSTRInConverter TmpMetricNames(ComSafeArrayInArg(aMetricNames));
        ArrayComTypeInConverter<IUnknown> TmpObjects(ComSafeArrayInArg(aObjects));
        
        
        ArrayComTypeOutConverter<IPerformanceMetric> TmpAffectedMetrics(ComSafeArrayOutArg(aAffectedMetrics));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_SETUPMETRICS_ENTER(this, (uint32_t)TmpMetricNames.array().size(), NULL /*for now*/, (uint32_t)TmpObjects.array().size(), NULL /*for now*/, aPeriod, aCount);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setupMetrics(TmpMetricNames.array(),
                               TmpObjects.array(),
                               aPeriod,
                               aCount,
                               TmpAffectedMetrics.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_SETUPMETRICS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpMetricNames.array().size(), NULL /*for now*/, (uint32_t)TmpObjects.array().size(), NULL /*for now*/, aPeriod, aCount, (uint32_t)TmpAffectedMetrics.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_SETUPMETRICS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, aPeriod, aCount, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_SETUPMETRICS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, aPeriod, aCount, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aAffectedMetrics=%zu hrc=%Rhrc\n", this, "PerformanceCollector::setupMetrics", ComSafeArraySize(*aAffectedMetrics), hrc));
    return hrc;
}

STDMETHODIMP PerformanceCollectorWrap::EnableMetrics(ComSafeArrayIn(IN_BSTR, aMetricNames),
                                                     ComSafeArrayIn(IUnknown *, aObjects),
                                                     ComSafeArrayOut(IPerformanceMetric *, aAffectedMetrics))
{
    LogRelFlow(("{%p} %s:enter aMetricNames=%zu aObjects=%zu aAffectedMetrics=%p\n", this, "PerformanceCollector::enableMetrics", aMetricNames, aObjects, aAffectedMetrics));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAffectedMetrics);


        ArrayBSTRInConverter TmpMetricNames(ComSafeArrayInArg(aMetricNames));
        ArrayComTypeInConverter<IUnknown> TmpObjects(ComSafeArrayInArg(aObjects));
        ArrayComTypeOutConverter<IPerformanceMetric> TmpAffectedMetrics(ComSafeArrayOutArg(aAffectedMetrics));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_ENABLEMETRICS_ENTER(this, (uint32_t)TmpMetricNames.array().size(), NULL /*for now*/, (uint32_t)TmpObjects.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = enableMetrics(TmpMetricNames.array(),
                                TmpObjects.array(),
                                TmpAffectedMetrics.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_ENABLEMETRICS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpMetricNames.array().size(), NULL /*for now*/, (uint32_t)TmpObjects.array().size(), NULL /*for now*/, (uint32_t)TmpAffectedMetrics.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_ENABLEMETRICS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_ENABLEMETRICS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aAffectedMetrics=%zu hrc=%Rhrc\n", this, "PerformanceCollector::enableMetrics", ComSafeArraySize(*aAffectedMetrics), hrc));
    return hrc;
}

STDMETHODIMP PerformanceCollectorWrap::DisableMetrics(ComSafeArrayIn(IN_BSTR, aMetricNames),
                                                      ComSafeArrayIn(IUnknown *, aObjects),
                                                      ComSafeArrayOut(IPerformanceMetric *, aAffectedMetrics))
{
    LogRelFlow(("{%p} %s:enter aMetricNames=%zu aObjects=%zu aAffectedMetrics=%p\n", this, "PerformanceCollector::disableMetrics", aMetricNames, aObjects, aAffectedMetrics));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aAffectedMetrics);


        ArrayBSTRInConverter TmpMetricNames(ComSafeArrayInArg(aMetricNames));
        ArrayComTypeInConverter<IUnknown> TmpObjects(ComSafeArrayInArg(aObjects));
        ArrayComTypeOutConverter<IPerformanceMetric> TmpAffectedMetrics(ComSafeArrayOutArg(aAffectedMetrics));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_DISABLEMETRICS_ENTER(this, (uint32_t)TmpMetricNames.array().size(), NULL /*for now*/, (uint32_t)TmpObjects.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = disableMetrics(TmpMetricNames.array(),
                                 TmpObjects.array(),
                                 TmpAffectedMetrics.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_DISABLEMETRICS_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpMetricNames.array().size(), NULL /*for now*/, (uint32_t)TmpObjects.array().size(), NULL /*for now*/, (uint32_t)TmpAffectedMetrics.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_DISABLEMETRICS_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_DISABLEMETRICS_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aAffectedMetrics=%zu hrc=%Rhrc\n", this, "PerformanceCollector::disableMetrics", ComSafeArraySize(*aAffectedMetrics), hrc));
    return hrc;
}

STDMETHODIMP PerformanceCollectorWrap::QueryMetricsData(ComSafeArrayIn(IN_BSTR, aMetricNames),
                                                        ComSafeArrayIn(IUnknown *, aObjects),
                                                        ComSafeArrayOut(BSTR, aReturnMetricNames),
                                                        ComSafeArrayOut(IUnknown *, aReturnObjects),
                                                        ComSafeArrayOut(BSTR, aReturnUnits),
                                                        ComSafeArrayOut(ULONG, aReturnScales),
                                                        ComSafeArrayOut(ULONG, aReturnSequenceNumbers),
                                                        ComSafeArrayOut(ULONG, aReturnDataIndices),
                                                        ComSafeArrayOut(ULONG, aReturnDataLengths),
                                                        ComSafeArrayOut(LONG, aReturnData))
{
    LogRelFlow(("{%p} %s:enter aMetricNames=%zu aObjects=%zu aReturnMetricNames=%p aReturnObjects=%p aReturnUnits=%p aReturnScales=%p aReturnSequenceNumbers=%p aReturnDataIndices=%p aReturnDataLengths=%p aReturnData=%p\n", this, "PerformanceCollector::queryMetricsData", aMetricNames, aObjects, aReturnMetricNames, aReturnObjects, aReturnUnits, aReturnScales, aReturnSequenceNumbers, aReturnDataIndices, aReturnDataLengths, aReturnData));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aReturnMetricNames);
        CheckComArgOutPointerValidThrow(aReturnObjects);
        CheckComArgOutPointerValidThrow(aReturnUnits);
        CheckComArgOutPointerValidThrow(aReturnScales);
        CheckComArgOutPointerValidThrow(aReturnSequenceNumbers);
        CheckComArgOutPointerValidThrow(aReturnDataIndices);
        CheckComArgOutPointerValidThrow(aReturnDataLengths);
        CheckComArgOutPointerValidThrow(aReturnData);


        ArrayBSTRInConverter TmpMetricNames(ComSafeArrayInArg(aMetricNames));
        ArrayComTypeInConverter<IUnknown> TmpObjects(ComSafeArrayInArg(aObjects));
        ArrayBSTROutConverter TmpReturnMetricNames(ComSafeArrayOutArg(aReturnMetricNames));
        ArrayComTypeOutConverter<IUnknown> TmpReturnObjects(ComSafeArrayOutArg(aReturnObjects));
        ArrayBSTROutConverter TmpReturnUnits(ComSafeArrayOutArg(aReturnUnits));
        ArrayOutConverter<ULONG> TmpReturnScales(ComSafeArrayOutArg(aReturnScales));
        ArrayOutConverter<ULONG> TmpReturnSequenceNumbers(ComSafeArrayOutArg(aReturnSequenceNumbers));
        ArrayOutConverter<ULONG> TmpReturnDataIndices(ComSafeArrayOutArg(aReturnDataIndices));
        ArrayOutConverter<ULONG> TmpReturnDataLengths(ComSafeArrayOutArg(aReturnDataLengths));
        ArrayOutConverter<LONG> TmpReturnData(ComSafeArrayOutArg(aReturnData));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_QUERYMETRICSDATA_ENTER(this, (uint32_t)TmpMetricNames.array().size(), NULL /*for now*/, (uint32_t)TmpObjects.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = queryMetricsData(TmpMetricNames.array(),
                                   TmpObjects.array(),
                                   TmpReturnMetricNames.array(),
                                   TmpReturnObjects.array(),
                                   TmpReturnUnits.array(),
                                   TmpReturnScales.array(),
                                   TmpReturnSequenceNumbers.array(),
                                   TmpReturnDataIndices.array(),
                                   TmpReturnDataLengths.array(),
                                   TmpReturnData.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_QUERYMETRICSDATA_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpMetricNames.array().size(), NULL /*for now*/, (uint32_t)TmpObjects.array().size(), NULL /*for now*/, (uint32_t)TmpReturnMetricNames.array().size(), NULL /*for now*/, (uint32_t)TmpReturnObjects.array().size(), NULL /*for now*/, (uint32_t)TmpReturnUnits.array().size(), NULL /*for now*/, (uint32_t)TmpReturnScales.array().size(), NULL /*for now*/, (uint32_t)TmpReturnSequenceNumbers.array().size(), NULL /*for now*/, (uint32_t)TmpReturnDataIndices.array().size(), NULL /*for now*/, (uint32_t)TmpReturnDataLengths.array().size(), NULL /*for now*/, (uint32_t)TmpReturnData.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_QUERYMETRICSDATA_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PERFORMANCECOLLECTOR_QUERYMETRICSDATA_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aReturnMetricNames=%zu *aReturnObjects=%zu *aReturnUnits=%zu *aReturnScales=%zu *aReturnSequenceNumbers=%zu *aReturnDataIndices=%zu *aReturnDataLengths=%zu aReturnData=%zu hrc=%Rhrc\n", this, "PerformanceCollector::queryMetricsData", ComSafeArraySize(*aReturnMetricNames), ComSafeArraySize(*aReturnObjects), ComSafeArraySize(*aReturnUnits), ComSafeArraySize(*aReturnScales), ComSafeArraySize(*aReturnSequenceNumbers), ComSafeArraySize(*aReturnDataIndices), ComSafeArraySize(*aReturnDataLengths), ComSafeArraySize(*aReturnData), hrc));
    return hrc;
}

STDMETHODIMP PerformanceCollectorWrap::InternalAndReservedMethod1IPerformanceCollector()
{
    return E_NOTIMPL;
}

STDMETHODIMP PerformanceCollectorWrap::InternalAndReservedMethod2IPerformanceCollector()
{
    return E_NOTIMPL;
}

STDMETHODIMP PerformanceCollectorWrap::InternalAndReservedMethod3IPerformanceCollector()
{
    return E_NOTIMPL;
}

STDMETHODIMP PerformanceCollectorWrap::InternalAndReservedMethod4IPerformanceCollector()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(PerformanceCollectorWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(PerformanceCollectorWrap, IPerformanceCollector)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "PerformanceCollectorWrap.cpp"


// ##### BEGINFILE "ExtPackPlugInWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IExtPackPlugIn.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_EXTPACKPLUGIN

#include "ExtPackPlugInWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(ExtPackPlugInWrap)

//
// IExtPackPlugIn properties
//

STDMETHODIMP ExtPackPlugInWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "ExtPackPlugIn::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "ExtPackPlugIn::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP ExtPackPlugInWrap::COMGETTER(Description)(BSTR *aDescription)
{
    LogRelFlow(("{%p} %s: enter aDescription=%p\n", this, "ExtPackPlugIn::getDescription", aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDescription);
        BSTROutConverter TmpDescription(aDescription);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_DESCRIPTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDescription(TmpDescription.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_DESCRIPTION_RETURN(this, hrc, 0 /*normal*/,TmpDescription.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_DESCRIPTION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_DESCRIPTION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDescription=%ls hrc=%Rhrc\n", this, "ExtPackPlugIn::getDescription", *aDescription, hrc));
    return hrc;
}

STDMETHODIMP ExtPackPlugInWrap::COMGETTER(Frontend)(BSTR *aFrontend)
{
    LogRelFlow(("{%p} %s: enter aFrontend=%p\n", this, "ExtPackPlugIn::getFrontend", aFrontend));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFrontend);
        BSTROutConverter TmpFrontend(aFrontend);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_FRONTEND_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFrontend(TmpFrontend.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_FRONTEND_RETURN(this, hrc, 0 /*normal*/,TmpFrontend.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_FRONTEND_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_FRONTEND_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFrontend=%ls hrc=%Rhrc\n", this, "ExtPackPlugIn::getFrontend", *aFrontend, hrc));
    return hrc;
}

STDMETHODIMP ExtPackPlugInWrap::COMGETTER(ModulePath)(BSTR *aModulePath)
{
    LogRelFlow(("{%p} %s: enter aModulePath=%p\n", this, "ExtPackPlugIn::getModulePath", aModulePath));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aModulePath);
        BSTROutConverter TmpModulePath(aModulePath);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_MODULEPATH_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getModulePath(TmpModulePath.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_MODULEPATH_RETURN(this, hrc, 0 /*normal*/,TmpModulePath.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_MODULEPATH_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKPLUGIN_GET_MODULEPATH_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aModulePath=%ls hrc=%Rhrc\n", this, "ExtPackPlugIn::getModulePath", *aModulePath, hrc));
    return hrc;
}

STDMETHODIMP ExtPackPlugInWrap::COMGETTER(InternalAndReservedAttribute1IExtPackPlugIn)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackPlugInWrap::COMGETTER(InternalAndReservedAttribute2IExtPackPlugIn)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackPlugInWrap::COMGETTER(InternalAndReservedAttribute3IExtPackPlugIn)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackPlugInWrap::COMGETTER(InternalAndReservedAttribute4IExtPackPlugIn)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IExtPackPlugIn methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(ExtPackPlugInWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ExtPackPlugInWrap, IExtPackPlugIn)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "ExtPackPlugInWrap.cpp"


// ##### BEGINFILE "ExtPackWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IExtPack.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_EXTPACK

#include "ExtPackWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(ExtPackWrap)

//
// IExtPackBase properties
//

STDMETHODIMP ExtPackWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "ExtPack::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "ExtPack::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::COMGETTER(Description)(BSTR *aDescription)
{
    LogRelFlow(("{%p} %s: enter aDescription=%p\n", this, "ExtPack::getDescription", aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDescription);
        BSTROutConverter TmpDescription(aDescription);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_DESCRIPTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDescription(TmpDescription.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_DESCRIPTION_RETURN(this, hrc, 0 /*normal*/,TmpDescription.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_DESCRIPTION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_DESCRIPTION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDescription=%ls hrc=%Rhrc\n", this, "ExtPack::getDescription", *aDescription, hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::COMGETTER(Version)(BSTR *aVersion)
{
    LogRelFlow(("{%p} %s: enter aVersion=%p\n", this, "ExtPack::getVersion", aVersion));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVersion);
        BSTROutConverter TmpVersion(aVersion);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_VERSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVersion(TmpVersion.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_VERSION_RETURN(this, hrc, 0 /*normal*/,TmpVersion.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_VERSION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_VERSION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVersion=%ls hrc=%Rhrc\n", this, "ExtPack::getVersion", *aVersion, hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::COMGETTER(Revision)(ULONG *aRevision)
{
    LogRelFlow(("{%p} %s: enter aRevision=%p\n", this, "ExtPack::getRevision", aRevision));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aRevision);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_REVISION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getRevision(aRevision);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_REVISION_RETURN(this, hrc, 0 /*normal*/,*aRevision);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_REVISION_RETURN(this, hrc, 1 /*hrc exception*/,*aRevision);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_REVISION_RETURN(this, hrc, 9 /*unhandled exception*/,*aRevision);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aRevision=%RU32 hrc=%Rhrc\n", this, "ExtPack::getRevision", *aRevision, hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::COMGETTER(Edition)(BSTR *aEdition)
{
    LogRelFlow(("{%p} %s: enter aEdition=%p\n", this, "ExtPack::getEdition", aEdition));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEdition);
        BSTROutConverter TmpEdition(aEdition);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_EDITION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEdition(TmpEdition.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_EDITION_RETURN(this, hrc, 0 /*normal*/,TmpEdition.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_EDITION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_EDITION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEdition=%ls hrc=%Rhrc\n", this, "ExtPack::getEdition", *aEdition, hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::COMGETTER(VRDEModule)(BSTR *aVRDEModule)
{
    LogRelFlow(("{%p} %s: enter aVRDEModule=%p\n", this, "ExtPack::getVRDEModule", aVRDEModule));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVRDEModule);
        BSTROutConverter TmpVRDEModule(aVRDEModule);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_VRDEMODULE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVRDEModule(TmpVRDEModule.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_VRDEMODULE_RETURN(this, hrc, 0 /*normal*/,TmpVRDEModule.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_VRDEMODULE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_VRDEMODULE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVRDEModule=%ls hrc=%Rhrc\n", this, "ExtPack::getVRDEModule", *aVRDEModule, hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::COMGETTER(PlugIns)(ComSafeArrayOut(IExtPackPlugIn *, aPlugIns))
{
    LogRelFlow(("{%p} %s: enter aPlugIns=%p\n", this, "ExtPack::getPlugIns", aPlugIns));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPlugIns);
        ArrayComTypeOutConverter<IExtPackPlugIn> TmpPlugIns(ComSafeArrayOutArg(aPlugIns));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_PLUGINS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPlugIns(TmpPlugIns.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_PLUGINS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpPlugIns.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_PLUGINS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_PLUGINS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPlugIns=%zu hrc=%Rhrc\n", this, "ExtPack::getPlugIns", ComSafeArraySize(*aPlugIns), hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::COMGETTER(Usable)(BOOL *aUsable)
{
    LogRelFlow(("{%p} %s: enter aUsable=%p\n", this, "ExtPack::getUsable", aUsable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUsable);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_USABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getUsable(aUsable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_USABLE_RETURN(this, hrc, 0 /*normal*/,*aUsable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_USABLE_RETURN(this, hrc, 1 /*hrc exception*/,*aUsable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_USABLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aUsable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aUsable=%RTbool hrc=%Rhrc\n", this, "ExtPack::getUsable", *aUsable, hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::COMGETTER(WhyUnusable)(BSTR *aWhyUnusable)
{
    LogRelFlow(("{%p} %s: enter aWhyUnusable=%p\n", this, "ExtPack::getWhyUnusable", aWhyUnusable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWhyUnusable);
        BSTROutConverter TmpWhyUnusable(aWhyUnusable);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_WHYUNUSABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWhyUnusable(TmpWhyUnusable.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_WHYUNUSABLE_RETURN(this, hrc, 0 /*normal*/,TmpWhyUnusable.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_WHYUNUSABLE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_WHYUNUSABLE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWhyUnusable=%ls hrc=%Rhrc\n", this, "ExtPack::getWhyUnusable", *aWhyUnusable, hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::COMGETTER(ShowLicense)(BOOL *aShowLicense)
{
    LogRelFlow(("{%p} %s: enter aShowLicense=%p\n", this, "ExtPack::getShowLicense", aShowLicense));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aShowLicense);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_SHOWLICENSE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getShowLicense(aShowLicense);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_SHOWLICENSE_RETURN(this, hrc, 0 /*normal*/,*aShowLicense != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_SHOWLICENSE_RETURN(this, hrc, 1 /*hrc exception*/,*aShowLicense != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_SHOWLICENSE_RETURN(this, hrc, 9 /*unhandled exception*/,*aShowLicense != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aShowLicense=%RTbool hrc=%Rhrc\n", this, "ExtPack::getShowLicense", *aShowLicense, hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::COMGETTER(License)(BSTR *aLicense)
{
    LogRelFlow(("{%p} %s: enter aLicense=%p\n", this, "ExtPack::getLicense", aLicense));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLicense);
        BSTROutConverter TmpLicense(aLicense);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_LICENSE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLicense(TmpLicense.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_LICENSE_RETURN(this, hrc, 0 /*normal*/,TmpLicense.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_LICENSE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_GET_LICENSE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLicense=%ls hrc=%Rhrc\n", this, "ExtPack::getLicense", *aLicense, hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::COMGETTER(InternalAndReservedAttribute1IExtPackBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackWrap::COMGETTER(InternalAndReservedAttribute2IExtPackBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackWrap::COMGETTER(InternalAndReservedAttribute3IExtPackBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackWrap::COMGETTER(InternalAndReservedAttribute4IExtPackBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackWrap::COMGETTER(InternalAndReservedAttribute5IExtPackBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackWrap::COMGETTER(InternalAndReservedAttribute6IExtPackBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackWrap::COMGETTER(InternalAndReservedAttribute7IExtPackBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackWrap::COMGETTER(InternalAndReservedAttribute8IExtPackBase)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IExtPack properties
//


//
// IExtPackBase methods
//

STDMETHODIMP ExtPackWrap::QueryLicense(IN_BSTR aPreferredLocale,
                                       IN_BSTR aPreferredLanguage,
                                       IN_BSTR aFormat,
                                       BSTR *aLicenseText)
{
    LogRelFlow(("{%p} %s:enter aPreferredLocale=%ls aPreferredLanguage=%ls aFormat=%ls aLicenseText=%p\n", this, "ExtPack::queryLicense", aPreferredLocale, aPreferredLanguage, aFormat, aLicenseText));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLicenseText);


        BSTRInConverter TmpPreferredLocale(aPreferredLocale);
        BSTRInConverter TmpPreferredLanguage(aPreferredLanguage);
        BSTRInConverter TmpFormat(aFormat);
        BSTROutConverter TmpLicenseText(aLicenseText);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_QUERYLICENSE_ENTER(this, TmpPreferredLocale.str().c_str(), TmpPreferredLanguage.str().c_str(), TmpFormat.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = queryLicense(TmpPreferredLocale.str(),
                               TmpPreferredLanguage.str(),
                               TmpFormat.str(),
                               TmpLicenseText.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_QUERYLICENSE_RETURN(this, hrc, 0 /*normal*/, TmpPreferredLocale.str().c_str(), TmpPreferredLanguage.str().c_str(), TmpFormat.str().c_str(), TmpLicenseText.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_QUERYLICENSE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_QUERYLICENSE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aLicenseText=%ls hrc=%Rhrc\n", this, "ExtPack::queryLicense", *aLicenseText, hrc));
    return hrc;
}

STDMETHODIMP ExtPackWrap::InternalAndReservedMethod1IExtPackBase()
{
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackWrap::InternalAndReservedMethod2IExtPackBase()
{
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackWrap::InternalAndReservedMethod3IExtPackBase()
{
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackWrap::InternalAndReservedMethod4IExtPackBase()
{
    return E_NOTIMPL;
}

//
// IExtPack methods
//

STDMETHODIMP ExtPackWrap::QueryObject(IN_BSTR aObjUuid,
                                      IUnknown **aReturnInterface)
{
    LogRelFlow(("{%p} %s:enter aObjUuid=%ls aReturnInterface=%p\n", this, "ExtPack::queryObject", aObjUuid, aReturnInterface));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aReturnInterface);


        BSTRInConverter TmpObjUuid(aObjUuid);
        ComTypeOutConverter<IUnknown> TmpReturnInterface(aReturnInterface);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_QUERYOBJECT_ENTER(this, TmpObjUuid.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = queryObject(TmpObjUuid.str(),
                              TmpReturnInterface.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_QUERYOBJECT_RETURN(this, hrc, 0 /*normal*/, TmpObjUuid.str().c_str(), (void *)TmpReturnInterface.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_QUERYOBJECT_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACK_QUERYOBJECT_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aReturnInterface=%p hrc=%Rhrc\n", this, "ExtPack::queryObject", *aReturnInterface, hrc));
    return hrc;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(ExtPackWrap)
NS_IMPL_THREADSAFE_ISUPPORTS2_CI(ExtPackWrap, IExtPack, IExtPackBase)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "ExtPackWrap.cpp"


// ##### BEGINFILE "ExtPackManagerWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IExtPackManager.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_EXTPACKMANAGER

#include "ExtPackManagerWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(ExtPackManagerWrap)

//
// IExtPackManager properties
//

STDMETHODIMP ExtPackManagerWrap::COMGETTER(InstalledExtPacks)(ComSafeArrayOut(IExtPack *, aInstalledExtPacks))
{
    LogRelFlow(("{%p} %s: enter aInstalledExtPacks=%p\n", this, "ExtPackManager::getInstalledExtPacks", aInstalledExtPacks));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aInstalledExtPacks);
        ArrayComTypeOutConverter<IExtPack> TmpInstalledExtPacks(ComSafeArrayOutArg(aInstalledExtPacks));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_GET_INSTALLEDEXTPACKS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getInstalledExtPacks(TmpInstalledExtPacks.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_GET_INSTALLEDEXTPACKS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpInstalledExtPacks.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_GET_INSTALLEDEXTPACKS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_GET_INSTALLEDEXTPACKS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aInstalledExtPacks=%zu hrc=%Rhrc\n", this, "ExtPackManager::getInstalledExtPacks", ComSafeArraySize(*aInstalledExtPacks), hrc));
    return hrc;
}

STDMETHODIMP ExtPackManagerWrap::COMGETTER(InternalAndReservedAttribute1IExtPackManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackManagerWrap::COMGETTER(InternalAndReservedAttribute2IExtPackManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackManagerWrap::COMGETTER(InternalAndReservedAttribute3IExtPackManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackManagerWrap::COMGETTER(InternalAndReservedAttribute4IExtPackManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackManagerWrap::COMGETTER(InternalAndReservedAttribute5IExtPackManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackManagerWrap::COMGETTER(InternalAndReservedAttribute6IExtPackManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackManagerWrap::COMGETTER(InternalAndReservedAttribute7IExtPackManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackManagerWrap::COMGETTER(InternalAndReservedAttribute8IExtPackManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IExtPackManager methods
//

STDMETHODIMP ExtPackManagerWrap::Find(IN_BSTR aName,
                                      IExtPack **aReturnData)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aReturnData=%p\n", this, "ExtPackManager::find", aName, aReturnData));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aReturnData);


        BSTRInConverter TmpName(aName);
        ComTypeOutConverter<IExtPack> TmpReturnData(aReturnData);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_FIND_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = find(TmpName.str(),
                       TmpReturnData.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_FIND_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), (void *)TmpReturnData.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_FIND_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_FIND_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aReturnData=%p hrc=%Rhrc\n", this, "ExtPackManager::find", *aReturnData, hrc));
    return hrc;
}

STDMETHODIMP ExtPackManagerWrap::OpenExtPackFile(IN_BSTR aPath,
                                                 IExtPackFile **aFile)
{
    LogRelFlow(("{%p} %s:enter aPath=%ls aFile=%p\n", this, "ExtPackManager::openExtPackFile", aPath, aFile));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFile);


        BSTRInConverter TmpPath(aPath);
        ComTypeOutConverter<IExtPackFile> TmpFile(aFile);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_OPENEXTPACKFILE_ENTER(this, TmpPath.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = openExtPackFile(TmpPath.str(),
                                  TmpFile.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_OPENEXTPACKFILE_RETURN(this, hrc, 0 /*normal*/, TmpPath.str().c_str(), (void *)TmpFile.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_OPENEXTPACKFILE_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_OPENEXTPACKFILE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aFile=%p hrc=%Rhrc\n", this, "ExtPackManager::openExtPackFile", *aFile, hrc));
    return hrc;
}

STDMETHODIMP ExtPackManagerWrap::Uninstall(IN_BSTR aName,
                                           BOOL aForcedRemoval,
                                           IN_BSTR aDisplayInfo,
                                           IProgress **aProgess)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aForcedRemoval=%RTbool aDisplayInfo=%ls aProgess=%p\n", this, "ExtPackManager::uninstall", aName, aForcedRemoval, aDisplayInfo, aProgess));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgess);


        BSTRInConverter TmpName(aName);
        
        BSTRInConverter TmpDisplayInfo(aDisplayInfo);
        ComTypeOutConverter<IProgress> TmpProgess(aProgess);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_UNINSTALL_ENTER(this, TmpName.str().c_str(), aForcedRemoval != FALSE, TmpDisplayInfo.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = uninstall(TmpName.str(),
                            aForcedRemoval != FALSE,
                            TmpDisplayInfo.str(),
                            TmpProgess.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_UNINSTALL_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), aForcedRemoval != FALSE, TmpDisplayInfo.str().c_str(), (void *)TmpProgess.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_UNINSTALL_RETURN(this, hrc, 1 /*hrc exception*/, 0, aForcedRemoval != FALSE, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_UNINSTALL_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aForcedRemoval != FALSE, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgess=%p hrc=%Rhrc\n", this, "ExtPackManager::uninstall", *aProgess, hrc));
    return hrc;
}

STDMETHODIMP ExtPackManagerWrap::Cleanup()
{
    LogRelFlow(("{%p} %s:enter\n", this, "ExtPackManager::cleanup"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_CLEANUP_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = cleanup();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_CLEANUP_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_CLEANUP_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_CLEANUP_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "ExtPackManager::cleanup", hrc));
    return hrc;
}

STDMETHODIMP ExtPackManagerWrap::QueryAllPlugInsForFrontend(IN_BSTR aFrontendName,
                                                            ComSafeArrayOut(BSTR, aPlugInModules))
{
    LogRelFlow(("{%p} %s:enter aFrontendName=%ls aPlugInModules=%p\n", this, "ExtPackManager::queryAllPlugInsForFrontend", aFrontendName, aPlugInModules));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPlugInModules);


        BSTRInConverter TmpFrontendName(aFrontendName);
        ArrayBSTROutConverter TmpPlugInModules(ComSafeArrayOutArg(aPlugInModules));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_QUERYALLPLUGINSFORFRONTEND_ENTER(this, TmpFrontendName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = queryAllPlugInsForFrontend(TmpFrontendName.str(),
                                             TmpPlugInModules.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_QUERYALLPLUGINSFORFRONTEND_RETURN(this, hrc, 0 /*normal*/, TmpFrontendName.str().c_str(), (uint32_t)TmpPlugInModules.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_QUERYALLPLUGINSFORFRONTEND_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_QUERYALLPLUGINSFORFRONTEND_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aPlugInModules=%zu hrc=%Rhrc\n", this, "ExtPackManager::queryAllPlugInsForFrontend", ComSafeArraySize(*aPlugInModules), hrc));
    return hrc;
}

STDMETHODIMP ExtPackManagerWrap::IsExtPackUsable(IN_BSTR aName,
                                                 BOOL *aUsable)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aUsable=%p\n", this, "ExtPackManager::isExtPackUsable", aName, aUsable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aUsable);


        BSTRInConverter TmpName(aName);
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_ISEXTPACKUSABLE_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = isExtPackUsable(TmpName.str(),
                                  aUsable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_ISEXTPACKUSABLE_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), *aUsable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_ISEXTPACKUSABLE_RETURN(this, hrc, 1 /*hrc exception*/, 0, *aUsable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EXTPACKMANAGER_ISEXTPACKUSABLE_RETURN(this, hrc, 9 /*unhandled exception*/, 0, *aUsable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aUsable=%RTbool hrc=%Rhrc\n", this, "ExtPackManager::isExtPackUsable", *aUsable, hrc));
    return hrc;
}

STDMETHODIMP ExtPackManagerWrap::InternalAndReservedMethod1IExtPackManager()
{
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackManagerWrap::InternalAndReservedMethod2IExtPackManager()
{
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackManagerWrap::InternalAndReservedMethod3IExtPackManager()
{
    return E_NOTIMPL;
}

STDMETHODIMP ExtPackManagerWrap::InternalAndReservedMethod4IExtPackManager()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(ExtPackManagerWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ExtPackManagerWrap, IExtPackManager)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "ExtPackManagerWrap.cpp"


// ##### BEGINFILE "BandwidthGroupWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IBandwidthGroup.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_BANDWIDTHGROUP

#include "BandwidthGroupWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(BandwidthGroupWrap)

//
// IBandwidthGroup properties
//

STDMETHODIMP BandwidthGroupWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "BandwidthGroup::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "BandwidthGroup::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP BandwidthGroupWrap::COMGETTER(Type)(BandwidthGroupType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "BandwidthGroup::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "BandwidthGroup::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP BandwidthGroupWrap::COMGETTER(Reference)(ULONG *aReference)
{
    LogRelFlow(("{%p} %s: enter aReference=%p\n", this, "BandwidthGroup::getReference", aReference));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aReference);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_REFERENCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getReference(aReference);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_REFERENCE_RETURN(this, hrc, 0 /*normal*/,*aReference);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_REFERENCE_RETURN(this, hrc, 1 /*hrc exception*/,*aReference);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_REFERENCE_RETURN(this, hrc, 9 /*unhandled exception*/,*aReference);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aReference=%RU32 hrc=%Rhrc\n", this, "BandwidthGroup::getReference", *aReference, hrc));
    return hrc;
}

STDMETHODIMP BandwidthGroupWrap::COMGETTER(MaxBytesPerSec)(LONG64 *aMaxBytesPerSec)
{
    LogRelFlow(("{%p} %s: enter aMaxBytesPerSec=%p\n", this, "BandwidthGroup::getMaxBytesPerSec", aMaxBytesPerSec));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaxBytesPerSec);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_MAXBYTESPERSEC_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaxBytesPerSec(aMaxBytesPerSec);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_MAXBYTESPERSEC_RETURN(this, hrc, 0 /*normal*/,*aMaxBytesPerSec);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_MAXBYTESPERSEC_RETURN(this, hrc, 1 /*hrc exception*/,*aMaxBytesPerSec);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_GET_MAXBYTESPERSEC_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaxBytesPerSec);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaxBytesPerSec=%RI64 hrc=%Rhrc\n", this, "BandwidthGroup::getMaxBytesPerSec", *aMaxBytesPerSec, hrc));
    return hrc;
}

STDMETHODIMP BandwidthGroupWrap::COMSETTER(MaxBytesPerSec)(LONG64 aMaxBytesPerSec)
{
    LogRelFlow(("{%p} %s: enter aMaxBytesPerSec=%RI64\n", this, "BandwidthGroup::setMaxBytesPerSec", aMaxBytesPerSec));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_SET_MAXBYTESPERSEC_ENTER(this, aMaxBytesPerSec);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setMaxBytesPerSec(aMaxBytesPerSec);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_SET_MAXBYTESPERSEC_RETURN(this, hrc, 0 /*normal*/,aMaxBytesPerSec);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_SET_MAXBYTESPERSEC_RETURN(this, hrc, 1 /*hrc exception*/,aMaxBytesPerSec);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_BANDWIDTHGROUP_SET_MAXBYTESPERSEC_RETURN(this, hrc, 9 /*unhandled exception*/,aMaxBytesPerSec);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "BandwidthGroup::setMaxBytesPerSec", hrc));
    return hrc;
}

STDMETHODIMP BandwidthGroupWrap::COMGETTER(InternalAndReservedAttribute1IBandwidthGroup)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP BandwidthGroupWrap::COMGETTER(InternalAndReservedAttribute2IBandwidthGroup)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP BandwidthGroupWrap::COMGETTER(InternalAndReservedAttribute3IBandwidthGroup)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP BandwidthGroupWrap::COMGETTER(InternalAndReservedAttribute4IBandwidthGroup)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IBandwidthGroup methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(BandwidthGroupWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(BandwidthGroupWrap, IBandwidthGroup)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "BandwidthGroupWrap.cpp"


// ##### BEGINFILE "VirtualBoxClientWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IVirtualBoxClient.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_VIRTUALBOXCLIENT

#include "VirtualBoxClientWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(VirtualBoxClientWrap)

//
// IVirtualBoxClient properties
//

STDMETHODIMP VirtualBoxClientWrap::COMGETTER(VirtualBox)(IVirtualBox **aVirtualBox)
{
    LogRelFlow(("{%p} %s: enter aVirtualBox=%p\n", this, "VirtualBoxClient::getVirtualBox", aVirtualBox));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVirtualBox);
        ComTypeOutConverter<IVirtualBox> TmpVirtualBox(aVirtualBox);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_VIRTUALBOX_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVirtualBox(TmpVirtualBox.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_VIRTUALBOX_RETURN(this, hrc, 0 /*normal*/,(void *)TmpVirtualBox.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_VIRTUALBOX_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_VIRTUALBOX_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVirtualBox=%p hrc=%Rhrc\n", this, "VirtualBoxClient::getVirtualBox", *aVirtualBox, hrc));
    return hrc;
}

STDMETHODIMP VirtualBoxClientWrap::COMGETTER(Session)(ISession **aSession)
{
    LogRelFlow(("{%p} %s: enter aSession=%p\n", this, "VirtualBoxClient::getSession", aSession));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSession);
        ComTypeOutConverter<ISession> TmpSession(aSession);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_SESSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSession(TmpSession.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_SESSION_RETURN(this, hrc, 0 /*normal*/,(void *)TmpSession.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_SESSION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_SESSION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSession=%p hrc=%Rhrc\n", this, "VirtualBoxClient::getSession", *aSession, hrc));
    return hrc;
}

STDMETHODIMP VirtualBoxClientWrap::COMGETTER(EventSource)(IEventSource **aEventSource)
{
    LogRelFlow(("{%p} %s: enter aEventSource=%p\n", this, "VirtualBoxClient::getEventSource", aEventSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEventSource);
        ComTypeOutConverter<IEventSource> TmpEventSource(aEventSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_EVENTSOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEventSource(TmpEventSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_EVENTSOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpEventSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_EVENTSOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_GET_EVENTSOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEventSource=%p hrc=%Rhrc\n", this, "VirtualBoxClient::getEventSource", *aEventSource, hrc));
    return hrc;
}

STDMETHODIMP VirtualBoxClientWrap::COMGETTER(InternalAndReservedAttribute1IVirtualBoxClient)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VirtualBoxClientWrap::COMGETTER(InternalAndReservedAttribute2IVirtualBoxClient)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VirtualBoxClientWrap::COMGETTER(InternalAndReservedAttribute3IVirtualBoxClient)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VirtualBoxClientWrap::COMGETTER(InternalAndReservedAttribute4IVirtualBoxClient)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IVirtualBoxClient methods
//

STDMETHODIMP VirtualBoxClientWrap::CheckMachineError(IMachine *aMachine)
{
    LogRelFlow(("{%p} %s:enter aMachine=%p\n", this, "VirtualBoxClient::checkMachineError", aMachine));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ComTypeInConverter<IMachine> TmpMachine(aMachine);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_CHECKMACHINEERROR_ENTER(this, (void *)TmpMachine.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = checkMachineError(TmpMachine.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_CHECKMACHINEERROR_RETURN(this, hrc, 0 /*normal*/, (void *)TmpMachine.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_CHECKMACHINEERROR_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALBOXCLIENT_CHECKMACHINEERROR_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "VirtualBoxClient::checkMachineError", hrc));
    return hrc;
}

STDMETHODIMP VirtualBoxClientWrap::InternalAndReservedMethod1IVirtualBoxClient()
{
    return E_NOTIMPL;
}

STDMETHODIMP VirtualBoxClientWrap::InternalAndReservedMethod2IVirtualBoxClient()
{
    return E_NOTIMPL;
}

STDMETHODIMP VirtualBoxClientWrap::InternalAndReservedMethod3IVirtualBoxClient()
{
    return E_NOTIMPL;
}

STDMETHODIMP VirtualBoxClientWrap::InternalAndReservedMethod4IVirtualBoxClient()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(VirtualBoxClientWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(VirtualBoxClientWrap, IVirtualBoxClient)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "VirtualBoxClientWrap.cpp"


// ##### BEGINFILE "EventSourceWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IEventSource.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_EVENTSOURCE

#include "EventSourceWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(EventSourceWrap)

//
// IEventSource properties
//


//
// IEventSource methods
//

STDMETHODIMP EventSourceWrap::CreateListener(IEventListener **aListener)
{
    LogRelFlow(("{%p} %s:enter aListener=%p\n", this, "EventSource::createListener", aListener));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aListener);


        ComTypeOutConverter<IEventListener> TmpListener(aListener);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_CREATELISTENER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createListener(TmpListener.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_CREATELISTENER_RETURN(this, hrc, 0 /*normal*/, (void *)TmpListener.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_CREATELISTENER_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_CREATELISTENER_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aListener=%p hrc=%Rhrc\n", this, "EventSource::createListener", *aListener, hrc));
    return hrc;
}

STDMETHODIMP EventSourceWrap::CreateAggregator(ComSafeArrayIn(IEventSource *, aSubordinates),
                                               IEventSource **aResult)
{
    LogRelFlow(("{%p} %s:enter aSubordinates=%zu aResult=%p\n", this, "EventSource::createAggregator", aSubordinates, aResult));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResult);


        ArrayComTypeInConverter<IEventSource> TmpSubordinates(ComSafeArrayInArg(aSubordinates));
        ComTypeOutConverter<IEventSource> TmpResult(aResult);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_CREATEAGGREGATOR_ENTER(this, (uint32_t)TmpSubordinates.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createAggregator(TmpSubordinates.array(),
                                   TmpResult.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_CREATEAGGREGATOR_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpSubordinates.array().size(), NULL /*for now*/, (void *)TmpResult.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_CREATEAGGREGATOR_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_CREATEAGGREGATOR_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aResult=%p hrc=%Rhrc\n", this, "EventSource::createAggregator", *aResult, hrc));
    return hrc;
}

STDMETHODIMP EventSourceWrap::RegisterListener(IEventListener *aListener,
                                               ComSafeArrayIn(VBoxEventType_T, aInteresting),
                                               BOOL aActive)
{
    LogRelFlow(("{%p} %s:enter aListener=%p aInteresting=%zu aActive=%RTbool\n", this, "EventSource::registerListener", aListener, aInteresting, aActive));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ComTypeInConverter<IEventListener> TmpListener(aListener);
        ArrayInConverter<VBoxEventType_T> TmpInteresting(ComSafeArrayInArg(aInteresting));
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_REGISTERLISTENER_ENTER(this, (void *)TmpListener.ptr(), (uint32_t)TmpInteresting.array().size(), NULL /*for now*/, aActive != FALSE);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = registerListener(TmpListener.ptr(),
                                   TmpInteresting.array(),
                                   aActive != FALSE);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_REGISTERLISTENER_RETURN(this, hrc, 0 /*normal*/, (void *)TmpListener.ptr(), (uint32_t)TmpInteresting.array().size(), NULL /*for now*/, aActive != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_REGISTERLISTENER_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, aActive != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_REGISTERLISTENER_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, aActive != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "EventSource::registerListener", hrc));
    return hrc;
}

STDMETHODIMP EventSourceWrap::UnregisterListener(IEventListener *aListener)
{
    LogRelFlow(("{%p} %s:enter aListener=%p\n", this, "EventSource::unregisterListener", aListener));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ComTypeInConverter<IEventListener> TmpListener(aListener);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_UNREGISTERLISTENER_ENTER(this, (void *)TmpListener.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = unregisterListener(TmpListener.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_UNREGISTERLISTENER_RETURN(this, hrc, 0 /*normal*/, (void *)TmpListener.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_UNREGISTERLISTENER_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_UNREGISTERLISTENER_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "EventSource::unregisterListener", hrc));
    return hrc;
}

STDMETHODIMP EventSourceWrap::FireEvent(IEvent *aEvent,
                                        LONG aTimeout,
                                        BOOL *aResult)
{
    LogRelFlow(("{%p} %s:enter aEvent=%p aTimeout=%RI32 aResult=%p\n", this, "EventSource::fireEvent", aEvent, aTimeout, aResult));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResult);


        ComTypeInConverter<IEvent> TmpEvent(aEvent);
        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_FIREEVENT_ENTER(this, (void *)TmpEvent.ptr(), aTimeout);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = fireEvent(TmpEvent.ptr(),
                            aTimeout,
                            aResult);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_FIREEVENT_RETURN(this, hrc, 0 /*normal*/, (void *)TmpEvent.ptr(), aTimeout, *aResult != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_FIREEVENT_RETURN(this, hrc, 1 /*hrc exception*/, 0, aTimeout, *aResult != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_FIREEVENT_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aTimeout, *aResult != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aResult=%RTbool hrc=%Rhrc\n", this, "EventSource::fireEvent", *aResult, hrc));
    return hrc;
}

STDMETHODIMP EventSourceWrap::GetEvent(IEventListener *aListener,
                                       LONG aTimeout,
                                       IEvent **aEvent)
{
    LogRelFlow(("{%p} %s:enter aListener=%p aTimeout=%RI32 aEvent=%p\n", this, "EventSource::getEvent", aListener, aTimeout, aEvent));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEvent);


        ComTypeInConverter<IEventListener> TmpListener(aListener);
        
        ComTypeOutConverter<IEvent> TmpEvent(aEvent);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_GETEVENT_ENTER(this, (void *)TmpListener.ptr(), aTimeout);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEvent(TmpListener.ptr(),
                           aTimeout,
                           TmpEvent.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_GETEVENT_RETURN(this, hrc, 0 /*normal*/, (void *)TmpListener.ptr(), aTimeout, (void *)TmpEvent.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_GETEVENT_RETURN(this, hrc, 1 /*hrc exception*/, 0, aTimeout, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_GETEVENT_RETURN(this, hrc, 9 /*unhandled exception*/, 0, aTimeout, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aEvent=%p hrc=%Rhrc\n", this, "EventSource::getEvent", *aEvent, hrc));
    return hrc;
}

STDMETHODIMP EventSourceWrap::EventProcessed(IEventListener *aListener,
                                             IEvent *aEvent)
{
    LogRelFlow(("{%p} %s:enter aListener=%p aEvent=%p\n", this, "EventSource::eventProcessed", aListener, aEvent));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ComTypeInConverter<IEventListener> TmpListener(aListener);
        ComTypeInConverter<IEvent> TmpEvent(aEvent);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_EVENTPROCESSED_ENTER(this, (void *)TmpListener.ptr(), (void *)TmpEvent.ptr());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = eventProcessed(TmpListener.ptr(),
                                 TmpEvent.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_EVENTPROCESSED_RETURN(this, hrc, 0 /*normal*/, (void *)TmpListener.ptr(), (void *)TmpEvent.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_EVENTPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENTSOURCE_EVENTPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "EventSource::eventProcessed", hrc));
    return hrc;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(EventSourceWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(EventSourceWrap, IEventSource)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "EventSourceWrap.cpp"


// ##### BEGINFILE "EventWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IEvent.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_EVENT

#include "EventWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(EventWrap)

//
// IEvent properties
//

STDMETHODIMP EventWrap::COMGETTER(Type)(VBoxEventType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "Event::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "Event::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP EventWrap::COMGETTER(Source)(IEventSource **aSource)
{
    LogRelFlow(("{%p} %s: enter aSource=%p\n", this, "Event::getSource", aSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSource);
        ComTypeOutConverter<IEventSource> TmpSource(aSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_SOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSource(TmpSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_SOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_SOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_SOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSource=%p hrc=%Rhrc\n", this, "Event::getSource", *aSource, hrc));
    return hrc;
}

STDMETHODIMP EventWrap::COMGETTER(Waitable)(BOOL *aWaitable)
{
    LogRelFlow(("{%p} %s: enter aWaitable=%p\n", this, "Event::getWaitable", aWaitable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWaitable);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_WAITABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWaitable(aWaitable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_WAITABLE_RETURN(this, hrc, 0 /*normal*/,*aWaitable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_WAITABLE_RETURN(this, hrc, 1 /*hrc exception*/,*aWaitable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_GET_WAITABLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aWaitable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWaitable=%RTbool hrc=%Rhrc\n", this, "Event::getWaitable", *aWaitable, hrc));
    return hrc;
}


//
// IEvent methods
//

STDMETHODIMP EventWrap::SetProcessed()
{
    LogRelFlow(("{%p} %s:enter\n", this, "Event::setProcessed"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_SETPROCESSED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProcessed();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_SETPROCESSED_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_SETPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_SETPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "Event::setProcessed", hrc));
    return hrc;
}

STDMETHODIMP EventWrap::WaitProcessed(LONG aTimeout,
                                      BOOL *aResult)
{
    LogRelFlow(("{%p} %s:enter aTimeout=%RI32 aResult=%p\n", this, "Event::waitProcessed", aTimeout, aResult));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResult);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_WAITPROCESSED_ENTER(this, aTimeout);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = waitProcessed(aTimeout,
                                aResult);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_WAITPROCESSED_RETURN(this, hrc, 0 /*normal*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_WAITPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_EVENT_WAITPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/, aTimeout, *aResult != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aResult=%RTbool hrc=%Rhrc\n", this, "Event::waitProcessed", *aResult, hrc));
    return hrc;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(EventWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(EventWrap, IEvent)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "EventWrap.cpp"


// ##### BEGINFILE "MachineEventWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IMachineEvent.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_MACHINEEVENT

#include "MachineEventWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(MachineEventWrap)

//
// IEvent properties
//

STDMETHODIMP MachineEventWrap::COMGETTER(Type)(VBoxEventType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "MachineEvent::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "MachineEvent::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP MachineEventWrap::COMGETTER(Source)(IEventSource **aSource)
{
    LogRelFlow(("{%p} %s: enter aSource=%p\n", this, "MachineEvent::getSource", aSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSource);
        ComTypeOutConverter<IEventSource> TmpSource(aSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_SOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSource(TmpSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_SOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_SOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_SOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSource=%p hrc=%Rhrc\n", this, "MachineEvent::getSource", *aSource, hrc));
    return hrc;
}

STDMETHODIMP MachineEventWrap::COMGETTER(Waitable)(BOOL *aWaitable)
{
    LogRelFlow(("{%p} %s: enter aWaitable=%p\n", this, "MachineEvent::getWaitable", aWaitable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWaitable);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_WAITABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWaitable(aWaitable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_WAITABLE_RETURN(this, hrc, 0 /*normal*/,*aWaitable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_WAITABLE_RETURN(this, hrc, 1 /*hrc exception*/,*aWaitable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_WAITABLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aWaitable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWaitable=%RTbool hrc=%Rhrc\n", this, "MachineEvent::getWaitable", *aWaitable, hrc));
    return hrc;
}

//
// IMachineEvent properties
//

STDMETHODIMP MachineEventWrap::COMGETTER(MachineId)(BSTR *aMachineId)
{
    LogRelFlow(("{%p} %s: enter aMachineId=%p\n", this, "MachineEvent::getMachineId", aMachineId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMachineId);
        UuidOutConverter TmpMachineId(aMachineId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_MACHINEID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMachineId(TmpMachineId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_MACHINEID_RETURN(this, hrc, 0 /*normal*/,TmpMachineId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_MACHINEID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_GET_MACHINEID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMachineId=%ls hrc=%Rhrc\n", this, "MachineEvent::getMachineId", *aMachineId, hrc));
    return hrc;
}


//
// IEvent methods
//

STDMETHODIMP MachineEventWrap::SetProcessed()
{
    LogRelFlow(("{%p} %s:enter\n", this, "MachineEvent::setProcessed"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_SETPROCESSED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProcessed();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_SETPROCESSED_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_SETPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_SETPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "MachineEvent::setProcessed", hrc));
    return hrc;
}

STDMETHODIMP MachineEventWrap::WaitProcessed(LONG aTimeout,
                                             BOOL *aResult)
{
    LogRelFlow(("{%p} %s:enter aTimeout=%RI32 aResult=%p\n", this, "MachineEvent::waitProcessed", aTimeout, aResult));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResult);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_WAITPROCESSED_ENTER(this, aTimeout);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = waitProcessed(aTimeout,
                                aResult);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_WAITPROCESSED_RETURN(this, hrc, 0 /*normal*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_WAITPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_MACHINEEVENT_WAITPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/, aTimeout, *aResult != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aResult=%RTbool hrc=%Rhrc\n", this, "MachineEvent::waitProcessed", *aResult, hrc));
    return hrc;
}

//
// IMachineEvent methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(MachineEventWrap)
NS_IMPL_THREADSAFE_ISUPPORTS2_CI(MachineEventWrap, IMachineEvent, IEvent)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "MachineEventWrap.cpp"


// ##### BEGINFILE "SnapshotEventWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for ISnapshotEvent.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_SNAPSHOTEVENT

#include "SnapshotEventWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(SnapshotEventWrap)

//
// IEvent properties
//

STDMETHODIMP SnapshotEventWrap::COMGETTER(Type)(VBoxEventType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "SnapshotEvent::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "SnapshotEvent::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP SnapshotEventWrap::COMGETTER(Source)(IEventSource **aSource)
{
    LogRelFlow(("{%p} %s: enter aSource=%p\n", this, "SnapshotEvent::getSource", aSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSource);
        ComTypeOutConverter<IEventSource> TmpSource(aSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_SOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSource(TmpSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_SOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_SOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_SOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSource=%p hrc=%Rhrc\n", this, "SnapshotEvent::getSource", *aSource, hrc));
    return hrc;
}

STDMETHODIMP SnapshotEventWrap::COMGETTER(Waitable)(BOOL *aWaitable)
{
    LogRelFlow(("{%p} %s: enter aWaitable=%p\n", this, "SnapshotEvent::getWaitable", aWaitable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWaitable);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_WAITABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWaitable(aWaitable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_WAITABLE_RETURN(this, hrc, 0 /*normal*/,*aWaitable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_WAITABLE_RETURN(this, hrc, 1 /*hrc exception*/,*aWaitable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_WAITABLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aWaitable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWaitable=%RTbool hrc=%Rhrc\n", this, "SnapshotEvent::getWaitable", *aWaitable, hrc));
    return hrc;
}

//
// IMachineEvent properties
//

STDMETHODIMP SnapshotEventWrap::COMGETTER(MachineId)(BSTR *aMachineId)
{
    LogRelFlow(("{%p} %s: enter aMachineId=%p\n", this, "SnapshotEvent::getMachineId", aMachineId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMachineId);
        UuidOutConverter TmpMachineId(aMachineId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_MACHINEID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMachineId(TmpMachineId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_MACHINEID_RETURN(this, hrc, 0 /*normal*/,TmpMachineId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_MACHINEID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_MACHINEID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMachineId=%ls hrc=%Rhrc\n", this, "SnapshotEvent::getMachineId", *aMachineId, hrc));
    return hrc;
}

//
// ISnapshotEvent properties
//

STDMETHODIMP SnapshotEventWrap::COMGETTER(SnapshotId)(BSTR *aSnapshotId)
{
    LogRelFlow(("{%p} %s: enter aSnapshotId=%p\n", this, "SnapshotEvent::getSnapshotId", aSnapshotId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSnapshotId);
        UuidOutConverter TmpSnapshotId(aSnapshotId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_SNAPSHOTID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSnapshotId(TmpSnapshotId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_SNAPSHOTID_RETURN(this, hrc, 0 /*normal*/,TmpSnapshotId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_SNAPSHOTID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_GET_SNAPSHOTID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSnapshotId=%ls hrc=%Rhrc\n", this, "SnapshotEvent::getSnapshotId", *aSnapshotId, hrc));
    return hrc;
}


//
// IEvent methods
//

STDMETHODIMP SnapshotEventWrap::SetProcessed()
{
    LogRelFlow(("{%p} %s:enter\n", this, "SnapshotEvent::setProcessed"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_SETPROCESSED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProcessed();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_SETPROCESSED_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_SETPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_SETPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "SnapshotEvent::setProcessed", hrc));
    return hrc;
}

STDMETHODIMP SnapshotEventWrap::WaitProcessed(LONG aTimeout,
                                              BOOL *aResult)
{
    LogRelFlow(("{%p} %s:enter aTimeout=%RI32 aResult=%p\n", this, "SnapshotEvent::waitProcessed", aTimeout, aResult));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResult);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_WAITPROCESSED_ENTER(this, aTimeout);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = waitProcessed(aTimeout,
                                aResult);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_WAITPROCESSED_RETURN(this, hrc, 0 /*normal*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_WAITPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_SNAPSHOTEVENT_WAITPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/, aTimeout, *aResult != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aResult=%RTbool hrc=%Rhrc\n", this, "SnapshotEvent::waitProcessed", *aResult, hrc));
    return hrc;
}

//
// IMachineEvent methods
//

//
// ISnapshotEvent methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(SnapshotEventWrap)
NS_IMPL_THREADSAFE_ISUPPORTS3_CI(SnapshotEventWrap, ISnapshotEvent, IMachineEvent, IEvent)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "SnapshotEventWrap.cpp"


// ##### BEGINFILE "GuestProcessEventWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IGuestProcessEvent.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_GUESTPROCESSEVENT

#include "GuestProcessEventWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(GuestProcessEventWrap)

//
// IEvent properties
//

STDMETHODIMP GuestProcessEventWrap::COMGETTER(Type)(VBoxEventType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "GuestProcessEvent::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "GuestProcessEvent::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP GuestProcessEventWrap::COMGETTER(Source)(IEventSource **aSource)
{
    LogRelFlow(("{%p} %s: enter aSource=%p\n", this, "GuestProcessEvent::getSource", aSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSource);
        ComTypeOutConverter<IEventSource> TmpSource(aSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_SOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSource(TmpSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_SOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_SOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_SOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSource=%p hrc=%Rhrc\n", this, "GuestProcessEvent::getSource", *aSource, hrc));
    return hrc;
}

STDMETHODIMP GuestProcessEventWrap::COMGETTER(Waitable)(BOOL *aWaitable)
{
    LogRelFlow(("{%p} %s: enter aWaitable=%p\n", this, "GuestProcessEvent::getWaitable", aWaitable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWaitable);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_WAITABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWaitable(aWaitable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_WAITABLE_RETURN(this, hrc, 0 /*normal*/,*aWaitable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_WAITABLE_RETURN(this, hrc, 1 /*hrc exception*/,*aWaitable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_WAITABLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aWaitable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWaitable=%RTbool hrc=%Rhrc\n", this, "GuestProcessEvent::getWaitable", *aWaitable, hrc));
    return hrc;
}

//
// IGuestSessionEvent properties
//

STDMETHODIMP GuestProcessEventWrap::COMGETTER(Session)(IGuestSession **aSession)
{
    LogRelFlow(("{%p} %s: enter aSession=%p\n", this, "GuestProcessEvent::getSession", aSession));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSession);
        ComTypeOutConverter<IGuestSession> TmpSession(aSession);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_SESSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSession(TmpSession.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_SESSION_RETURN(this, hrc, 0 /*normal*/,(void *)TmpSession.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_SESSION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_SESSION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSession=%p hrc=%Rhrc\n", this, "GuestProcessEvent::getSession", *aSession, hrc));
    return hrc;
}

//
// IGuestProcessEvent properties
//

STDMETHODIMP GuestProcessEventWrap::COMGETTER(Process)(IGuestProcess **aProcess)
{
    LogRelFlow(("{%p} %s: enter aProcess=%p\n", this, "GuestProcessEvent::getProcess", aProcess));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProcess);
        ComTypeOutConverter<IGuestProcess> TmpProcess(aProcess);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_PROCESS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProcess(TmpProcess.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_PROCESS_RETURN(this, hrc, 0 /*normal*/,(void *)TmpProcess.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_PROCESS_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_PROCESS_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProcess=%p hrc=%Rhrc\n", this, "GuestProcessEvent::getProcess", *aProcess, hrc));
    return hrc;
}

STDMETHODIMP GuestProcessEventWrap::COMGETTER(Pid)(ULONG *aPid)
{
    LogRelFlow(("{%p} %s: enter aPid=%p\n", this, "GuestProcessEvent::getPid", aPid));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aPid);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_PID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getPid(aPid);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_PID_RETURN(this, hrc, 0 /*normal*/,*aPid);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_PID_RETURN(this, hrc, 1 /*hrc exception*/,*aPid);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_GET_PID_RETURN(this, hrc, 9 /*unhandled exception*/,*aPid);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aPid=%RU32 hrc=%Rhrc\n", this, "GuestProcessEvent::getPid", *aPid, hrc));
    return hrc;
}


//
// IEvent methods
//

STDMETHODIMP GuestProcessEventWrap::SetProcessed()
{
    LogRelFlow(("{%p} %s:enter\n", this, "GuestProcessEvent::setProcessed"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_SETPROCESSED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProcessed();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_SETPROCESSED_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_SETPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_SETPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GuestProcessEvent::setProcessed", hrc));
    return hrc;
}

STDMETHODIMP GuestProcessEventWrap::WaitProcessed(LONG aTimeout,
                                                  BOOL *aResult)
{
    LogRelFlow(("{%p} %s:enter aTimeout=%RI32 aResult=%p\n", this, "GuestProcessEvent::waitProcessed", aTimeout, aResult));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResult);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_WAITPROCESSED_ENTER(this, aTimeout);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = waitProcessed(aTimeout,
                                aResult);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_WAITPROCESSED_RETURN(this, hrc, 0 /*normal*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_WAITPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTPROCESSEVENT_WAITPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/, aTimeout, *aResult != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aResult=%RTbool hrc=%Rhrc\n", this, "GuestProcessEvent::waitProcessed", *aResult, hrc));
    return hrc;
}

//
// IGuestSessionEvent methods
//

//
// IGuestProcessEvent methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(GuestProcessEventWrap)
NS_IMPL_THREADSAFE_ISUPPORTS3_CI(GuestProcessEventWrap, IGuestProcessEvent, IGuestSessionEvent, IEvent)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "GuestProcessEventWrap.cpp"


// ##### BEGINFILE "GuestFileEventWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IGuestFileEvent.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_GUESTFILEEVENT

#include "GuestFileEventWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(GuestFileEventWrap)

//
// IEvent properties
//

STDMETHODIMP GuestFileEventWrap::COMGETTER(Type)(VBoxEventType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "GuestFileEvent::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "GuestFileEvent::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP GuestFileEventWrap::COMGETTER(Source)(IEventSource **aSource)
{
    LogRelFlow(("{%p} %s: enter aSource=%p\n", this, "GuestFileEvent::getSource", aSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSource);
        ComTypeOutConverter<IEventSource> TmpSource(aSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_SOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSource(TmpSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_SOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_SOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_SOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSource=%p hrc=%Rhrc\n", this, "GuestFileEvent::getSource", *aSource, hrc));
    return hrc;
}

STDMETHODIMP GuestFileEventWrap::COMGETTER(Waitable)(BOOL *aWaitable)
{
    LogRelFlow(("{%p} %s: enter aWaitable=%p\n", this, "GuestFileEvent::getWaitable", aWaitable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWaitable);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_WAITABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWaitable(aWaitable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_WAITABLE_RETURN(this, hrc, 0 /*normal*/,*aWaitable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_WAITABLE_RETURN(this, hrc, 1 /*hrc exception*/,*aWaitable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_WAITABLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aWaitable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWaitable=%RTbool hrc=%Rhrc\n", this, "GuestFileEvent::getWaitable", *aWaitable, hrc));
    return hrc;
}

//
// IGuestSessionEvent properties
//

STDMETHODIMP GuestFileEventWrap::COMGETTER(Session)(IGuestSession **aSession)
{
    LogRelFlow(("{%p} %s: enter aSession=%p\n", this, "GuestFileEvent::getSession", aSession));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSession);
        ComTypeOutConverter<IGuestSession> TmpSession(aSession);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_SESSION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSession(TmpSession.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_SESSION_RETURN(this, hrc, 0 /*normal*/,(void *)TmpSession.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_SESSION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_SESSION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSession=%p hrc=%Rhrc\n", this, "GuestFileEvent::getSession", *aSession, hrc));
    return hrc;
}

//
// IGuestFileEvent properties
//

STDMETHODIMP GuestFileEventWrap::COMGETTER(File)(IGuestFile **aFile)
{
    LogRelFlow(("{%p} %s: enter aFile=%p\n", this, "GuestFileEvent::getFile", aFile));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aFile);
        ComTypeOutConverter<IGuestFile> TmpFile(aFile);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_FILE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getFile(TmpFile.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_FILE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpFile.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_FILE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_GET_FILE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aFile=%p hrc=%Rhrc\n", this, "GuestFileEvent::getFile", *aFile, hrc));
    return hrc;
}


//
// IEvent methods
//

STDMETHODIMP GuestFileEventWrap::SetProcessed()
{
    LogRelFlow(("{%p} %s:enter\n", this, "GuestFileEvent::setProcessed"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_SETPROCESSED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProcessed();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_SETPROCESSED_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_SETPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_SETPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GuestFileEvent::setProcessed", hrc));
    return hrc;
}

STDMETHODIMP GuestFileEventWrap::WaitProcessed(LONG aTimeout,
                                               BOOL *aResult)
{
    LogRelFlow(("{%p} %s:enter aTimeout=%RI32 aResult=%p\n", this, "GuestFileEvent::waitProcessed", aTimeout, aResult));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResult);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_WAITPROCESSED_ENTER(this, aTimeout);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = waitProcessed(aTimeout,
                                aResult);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_WAITPROCESSED_RETURN(this, hrc, 0 /*normal*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_WAITPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_GUESTFILEEVENT_WAITPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/, aTimeout, *aResult != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aResult=%RTbool hrc=%Rhrc\n", this, "GuestFileEvent::waitProcessed", *aResult, hrc));
    return hrc;
}

//
// IGuestSessionEvent methods
//

//
// IGuestFileEvent methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(GuestFileEventWrap)
NS_IMPL_THREADSAFE_ISUPPORTS3_CI(GuestFileEventWrap, IGuestFileEvent, IGuestSessionEvent, IEvent)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "GuestFileEventWrap.cpp"


// ##### BEGINFILE "ProgressEventWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IProgressEvent.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_PROGRESSEVENT

#include "ProgressEventWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(ProgressEventWrap)

//
// IEvent properties
//

STDMETHODIMP ProgressEventWrap::COMGETTER(Type)(VBoxEventType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "ProgressEvent::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "ProgressEvent::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP ProgressEventWrap::COMGETTER(Source)(IEventSource **aSource)
{
    LogRelFlow(("{%p} %s: enter aSource=%p\n", this, "ProgressEvent::getSource", aSource));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSource);
        ComTypeOutConverter<IEventSource> TmpSource(aSource);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_SOURCE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSource(TmpSource.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_SOURCE_RETURN(this, hrc, 0 /*normal*/,(void *)TmpSource.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_SOURCE_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_SOURCE_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSource=%p hrc=%Rhrc\n", this, "ProgressEvent::getSource", *aSource, hrc));
    return hrc;
}

STDMETHODIMP ProgressEventWrap::COMGETTER(Waitable)(BOOL *aWaitable)
{
    LogRelFlow(("{%p} %s: enter aWaitable=%p\n", this, "ProgressEvent::getWaitable", aWaitable));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aWaitable);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_WAITABLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getWaitable(aWaitable);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_WAITABLE_RETURN(this, hrc, 0 /*normal*/,*aWaitable != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_WAITABLE_RETURN(this, hrc, 1 /*hrc exception*/,*aWaitable != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_WAITABLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aWaitable != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aWaitable=%RTbool hrc=%Rhrc\n", this, "ProgressEvent::getWaitable", *aWaitable, hrc));
    return hrc;
}

//
// IProgressEvent properties
//

STDMETHODIMP ProgressEventWrap::COMGETTER(ProgressId)(BSTR *aProgressId)
{
    LogRelFlow(("{%p} %s: enter aProgressId=%p\n", this, "ProgressEvent::getProgressId", aProgressId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgressId);
        UuidOutConverter TmpProgressId(aProgressId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_PROGRESSID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProgressId(TmpProgressId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_PROGRESSID_RETURN(this, hrc, 0 /*normal*/,TmpProgressId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_PROGRESSID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_GET_PROGRESSID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProgressId=%ls hrc=%Rhrc\n", this, "ProgressEvent::getProgressId", *aProgressId, hrc));
    return hrc;
}


//
// IEvent methods
//

STDMETHODIMP ProgressEventWrap::SetProcessed()
{
    LogRelFlow(("{%p} %s:enter\n", this, "ProgressEvent::setProcessed"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_SETPROCESSED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProcessed();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_SETPROCESSED_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_SETPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_SETPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "ProgressEvent::setProcessed", hrc));
    return hrc;
}

STDMETHODIMP ProgressEventWrap::WaitProcessed(LONG aTimeout,
                                              BOOL *aResult)
{
    LogRelFlow(("{%p} %s:enter aTimeout=%RI32 aResult=%p\n", this, "ProgressEvent::waitProcessed", aTimeout, aResult));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aResult);


        
        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_WAITPROCESSED_ENTER(this, aTimeout);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = waitProcessed(aTimeout,
                                aResult);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_WAITPROCESSED_RETURN(this, hrc, 0 /*normal*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_WAITPROCESSED_RETURN(this, hrc, 1 /*hrc exception*/, aTimeout, *aResult != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_PROGRESSEVENT_WAITPROCESSED_RETURN(this, hrc, 9 /*unhandled exception*/, aTimeout, *aResult != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave aResult=%RTbool hrc=%Rhrc\n", this, "ProgressEvent::waitProcessed", *aResult, hrc));
    return hrc;
}

//
// IProgressEvent methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(ProgressEventWrap)
NS_IMPL_THREADSAFE_ISUPPORTS2_CI(ProgressEventWrap, IProgressEvent, IEvent)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "ProgressEventWrap.cpp"


// ##### BEGINFILE "StringArrayWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IStringArray.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_STRINGARRAY

#include "StringArrayWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(StringArrayWrap)

//
// IStringArray properties
//

STDMETHODIMP StringArrayWrap::COMGETTER(Values)(ComSafeArrayOut(BSTR, aValues))
{
    LogRelFlow(("{%p} %s: enter aValues=%p\n", this, "StringArray::getValues", aValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValues);
        ArrayBSTROutConverter TmpValues(ComSafeArrayOutArg(aValues));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_STRINGARRAY_GET_VALUES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getValues(TmpValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_STRINGARRAY_GET_VALUES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_STRINGARRAY_GET_VALUES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_STRINGARRAY_GET_VALUES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aValues=%zu hrc=%Rhrc\n", this, "StringArray::getValues", ComSafeArraySize(*aValues), hrc));
    return hrc;
}


//
// IStringArray methods
//

STDMETHODIMP StringArrayWrap::InternalAndReservedMethod1IStringArray()
{
    return E_NOTIMPL;
}

STDMETHODIMP StringArrayWrap::InternalAndReservedMethod2IStringArray()
{
    return E_NOTIMPL;
}

STDMETHODIMP StringArrayWrap::InternalAndReservedMethod3IStringArray()
{
    return E_NOTIMPL;
}

STDMETHODIMP StringArrayWrap::InternalAndReservedMethod4IStringArray()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(StringArrayWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(StringArrayWrap, IStringArray)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "StringArrayWrap.cpp"


// ##### BEGINFILE "FormValueWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IFormValue.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_FORMVALUE

#include "FormValueWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(FormValueWrap)

//
// IFormValue properties
//

STDMETHODIMP FormValueWrap::COMGETTER(Type)(FormValueType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "FormValue::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "FormValue::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP FormValueWrap::COMGETTER(Generation)(LONG *aGeneration)
{
    LogRelFlow(("{%p} %s: enter aGeneration=%p\n", this, "FormValue::getGeneration", aGeneration));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGeneration);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_GENERATION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGeneration(aGeneration);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_GENERATION_RETURN(this, hrc, 0 /*normal*/,*aGeneration);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_GENERATION_RETURN(this, hrc, 1 /*hrc exception*/,*aGeneration);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_GENERATION_RETURN(this, hrc, 9 /*unhandled exception*/,*aGeneration);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aGeneration=%RI32 hrc=%Rhrc\n", this, "FormValue::getGeneration", *aGeneration, hrc));
    return hrc;
}

STDMETHODIMP FormValueWrap::COMGETTER(Enabled)(BOOL *aEnabled)
{
    LogRelFlow(("{%p} %s: enter aEnabled=%p\n", this, "FormValue::getEnabled", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_ENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEnabled(aEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_ENABLED_RETURN(this, hrc, 0 /*normal*/,*aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_ENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_ENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEnabled=%RTbool hrc=%Rhrc\n", this, "FormValue::getEnabled", *aEnabled, hrc));
    return hrc;
}

STDMETHODIMP FormValueWrap::COMGETTER(Visible)(BOOL *aVisible)
{
    LogRelFlow(("{%p} %s: enter aVisible=%p\n", this, "FormValue::getVisible", aVisible));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVisible);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_VISIBLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVisible(aVisible);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_VISIBLE_RETURN(this, hrc, 0 /*normal*/,*aVisible != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_VISIBLE_RETURN(this, hrc, 1 /*hrc exception*/,*aVisible != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_VISIBLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aVisible != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVisible=%RTbool hrc=%Rhrc\n", this, "FormValue::getVisible", *aVisible, hrc));
    return hrc;
}

STDMETHODIMP FormValueWrap::COMGETTER(Label)(BSTR *aLabel)
{
    LogRelFlow(("{%p} %s: enter aLabel=%p\n", this, "FormValue::getLabel", aLabel));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLabel);
        BSTROutConverter TmpLabel(aLabel);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_LABEL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLabel(TmpLabel.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_LABEL_RETURN(this, hrc, 0 /*normal*/,TmpLabel.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_LABEL_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_LABEL_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLabel=%ls hrc=%Rhrc\n", this, "FormValue::getLabel", *aLabel, hrc));
    return hrc;
}

STDMETHODIMP FormValueWrap::COMGETTER(Description)(BSTR *aDescription)
{
    LogRelFlow(("{%p} %s: enter aDescription=%p\n", this, "FormValue::getDescription", aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDescription);
        BSTROutConverter TmpDescription(aDescription);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_DESCRIPTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDescription(TmpDescription.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_DESCRIPTION_RETURN(this, hrc, 0 /*normal*/,TmpDescription.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_DESCRIPTION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_DESCRIPTION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDescription=%ls hrc=%Rhrc\n", this, "FormValue::getDescription", *aDescription, hrc));
    return hrc;
}

STDMETHODIMP FormValueWrap::COMGETTER(Help)(BSTR *aHelp)
{
    LogRelFlow(("{%p} %s: enter aHelp=%p\n", this, "FormValue::getHelp", aHelp));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHelp);
        BSTROutConverter TmpHelp(aHelp);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_HELP_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHelp(TmpHelp.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_HELP_RETURN(this, hrc, 0 /*normal*/,TmpHelp.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_HELP_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_FORMVALUE_GET_HELP_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHelp=%ls hrc=%Rhrc\n", this, "FormValue::getHelp", *aHelp, hrc));
    return hrc;
}

STDMETHODIMP FormValueWrap::COMGETTER(InternalAndReservedAttribute1IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FormValueWrap::COMGETTER(InternalAndReservedAttribute2IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FormValueWrap::COMGETTER(InternalAndReservedAttribute3IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FormValueWrap::COMGETTER(InternalAndReservedAttribute4IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FormValueWrap::COMGETTER(InternalAndReservedAttribute5IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FormValueWrap::COMGETTER(InternalAndReservedAttribute6IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FormValueWrap::COMGETTER(InternalAndReservedAttribute7IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP FormValueWrap::COMGETTER(InternalAndReservedAttribute8IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IFormValue methods
//

STDMETHODIMP FormValueWrap::InternalAndReservedMethod1IFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP FormValueWrap::InternalAndReservedMethod2IFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP FormValueWrap::InternalAndReservedMethod3IFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP FormValueWrap::InternalAndReservedMethod4IFormValue()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(FormValueWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(FormValueWrap, IFormValue)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "FormValueWrap.cpp"


// ##### BEGINFILE "RangedIntegerFormValueWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IRangedIntegerFormValue.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_RANGEDINTEGERFORMVALUE

#include "RangedIntegerFormValueWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(RangedIntegerFormValueWrap)

//
// IFormValue properties
//

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(Type)(FormValueType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "RangedIntegerFormValue::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "RangedIntegerFormValue::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(Generation)(LONG *aGeneration)
{
    LogRelFlow(("{%p} %s: enter aGeneration=%p\n", this, "RangedIntegerFormValue::getGeneration", aGeneration));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGeneration);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_GENERATION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGeneration(aGeneration);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_GENERATION_RETURN(this, hrc, 0 /*normal*/,*aGeneration);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_GENERATION_RETURN(this, hrc, 1 /*hrc exception*/,*aGeneration);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_GENERATION_RETURN(this, hrc, 9 /*unhandled exception*/,*aGeneration);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aGeneration=%RI32 hrc=%Rhrc\n", this, "RangedIntegerFormValue::getGeneration", *aGeneration, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(Enabled)(BOOL *aEnabled)
{
    LogRelFlow(("{%p} %s: enter aEnabled=%p\n", this, "RangedIntegerFormValue::getEnabled", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_ENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEnabled(aEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_ENABLED_RETURN(this, hrc, 0 /*normal*/,*aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_ENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_ENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEnabled=%RTbool hrc=%Rhrc\n", this, "RangedIntegerFormValue::getEnabled", *aEnabled, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(Visible)(BOOL *aVisible)
{
    LogRelFlow(("{%p} %s: enter aVisible=%p\n", this, "RangedIntegerFormValue::getVisible", aVisible));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVisible);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_VISIBLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVisible(aVisible);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_VISIBLE_RETURN(this, hrc, 0 /*normal*/,*aVisible != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_VISIBLE_RETURN(this, hrc, 1 /*hrc exception*/,*aVisible != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_VISIBLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aVisible != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVisible=%RTbool hrc=%Rhrc\n", this, "RangedIntegerFormValue::getVisible", *aVisible, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(Label)(BSTR *aLabel)
{
    LogRelFlow(("{%p} %s: enter aLabel=%p\n", this, "RangedIntegerFormValue::getLabel", aLabel));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLabel);
        BSTROutConverter TmpLabel(aLabel);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_LABEL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLabel(TmpLabel.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_LABEL_RETURN(this, hrc, 0 /*normal*/,TmpLabel.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_LABEL_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_LABEL_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLabel=%ls hrc=%Rhrc\n", this, "RangedIntegerFormValue::getLabel", *aLabel, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(Description)(BSTR *aDescription)
{
    LogRelFlow(("{%p} %s: enter aDescription=%p\n", this, "RangedIntegerFormValue::getDescription", aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDescription);
        BSTROutConverter TmpDescription(aDescription);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_DESCRIPTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDescription(TmpDescription.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_DESCRIPTION_RETURN(this, hrc, 0 /*normal*/,TmpDescription.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_DESCRIPTION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_DESCRIPTION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDescription=%ls hrc=%Rhrc\n", this, "RangedIntegerFormValue::getDescription", *aDescription, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(Help)(BSTR *aHelp)
{
    LogRelFlow(("{%p} %s: enter aHelp=%p\n", this, "RangedIntegerFormValue::getHelp", aHelp));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHelp);
        BSTROutConverter TmpHelp(aHelp);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_HELP_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHelp(TmpHelp.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_HELP_RETURN(this, hrc, 0 /*normal*/,TmpHelp.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_HELP_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_HELP_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHelp=%ls hrc=%Rhrc\n", this, "RangedIntegerFormValue::getHelp", *aHelp, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute1IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute2IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute3IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute4IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute5IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute6IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute7IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute8IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IRangedIntegerFormValue properties
//

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(Suffix)(BSTR *aSuffix)
{
    LogRelFlow(("{%p} %s: enter aSuffix=%p\n", this, "RangedIntegerFormValue::getSuffix", aSuffix));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aSuffix);
        BSTROutConverter TmpSuffix(aSuffix);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_SUFFIX_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSuffix(TmpSuffix.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_SUFFIX_RETURN(this, hrc, 0 /*normal*/,TmpSuffix.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_SUFFIX_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_SUFFIX_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aSuffix=%ls hrc=%Rhrc\n", this, "RangedIntegerFormValue::getSuffix", *aSuffix, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(Minimum)(LONG *aMinimum)
{
    LogRelFlow(("{%p} %s: enter aMinimum=%p\n", this, "RangedIntegerFormValue::getMinimum", aMinimum));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMinimum);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_MINIMUM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMinimum(aMinimum);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_MINIMUM_RETURN(this, hrc, 0 /*normal*/,*aMinimum);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_MINIMUM_RETURN(this, hrc, 1 /*hrc exception*/,*aMinimum);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_MINIMUM_RETURN(this, hrc, 9 /*unhandled exception*/,*aMinimum);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMinimum=%RI32 hrc=%Rhrc\n", this, "RangedIntegerFormValue::getMinimum", *aMinimum, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(Maximum)(LONG *aMaximum)
{
    LogRelFlow(("{%p} %s: enter aMaximum=%p\n", this, "RangedIntegerFormValue::getMaximum", aMaximum));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aMaximum);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_MAXIMUM_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getMaximum(aMaximum);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_MAXIMUM_RETURN(this, hrc, 0 /*normal*/,*aMaximum);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_MAXIMUM_RETURN(this, hrc, 1 /*hrc exception*/,*aMaximum);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GET_MAXIMUM_RETURN(this, hrc, 9 /*unhandled exception*/,*aMaximum);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aMaximum=%RI32 hrc=%Rhrc\n", this, "RangedIntegerFormValue::getMaximum", *aMaximum, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute1IRangedIntegerFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute2IRangedIntegerFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute3IRangedIntegerFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::COMGETTER(InternalAndReservedAttribute4IRangedIntegerFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IFormValue methods
//

STDMETHODIMP RangedIntegerFormValueWrap::InternalAndReservedMethod1IFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::InternalAndReservedMethod2IFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::InternalAndReservedMethod3IFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::InternalAndReservedMethod4IFormValue()
{
    return E_NOTIMPL;
}

//
// IRangedIntegerFormValue methods
//

STDMETHODIMP RangedIntegerFormValueWrap::GetInteger(LONG *aValue)
{
    LogRelFlow(("{%p} %s:enter aValue=%p\n", this, "RangedIntegerFormValue::getInteger", aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GETINTEGER_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getInteger(aValue);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GETINTEGER_RETURN(this, hrc, 0 /*normal*/, *aValue);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GETINTEGER_RETURN(this, hrc, 1 /*hrc exception*/, *aValue);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_GETINTEGER_RETURN(this, hrc, 9 /*unhandled exception*/, *aValue);
#endif
    }

    LogRelFlow(("{%p} %s: leave aValue=%RI32 hrc=%Rhrc\n", this, "RangedIntegerFormValue::getInteger", *aValue, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::SetInteger(LONG aValue,
                                                    IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aValue=%RI32 aProgress=%p\n", this, "RangedIntegerFormValue::setInteger", aValue, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_SETINTEGER_ENTER(this, aValue);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setInteger(aValue,
                             TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_SETINTEGER_RETURN(this, hrc, 0 /*normal*/, aValue, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_SETINTEGER_RETURN(this, hrc, 1 /*hrc exception*/, aValue, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_RANGEDINTEGERFORMVALUE_SETINTEGER_RETURN(this, hrc, 9 /*unhandled exception*/, aValue, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "RangedIntegerFormValue::setInteger", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP RangedIntegerFormValueWrap::InternalAndReservedMethod1IRangedIntegerFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::InternalAndReservedMethod2IRangedIntegerFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::InternalAndReservedMethod3IRangedIntegerFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP RangedIntegerFormValueWrap::InternalAndReservedMethod4IRangedIntegerFormValue()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(RangedIntegerFormValueWrap)
NS_IMPL_THREADSAFE_ISUPPORTS2_CI(RangedIntegerFormValueWrap, IRangedIntegerFormValue, IFormValue)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "RangedIntegerFormValueWrap.cpp"


// ##### BEGINFILE "ChoiceFormValueWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IChoiceFormValue.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_CHOICEFORMVALUE

#include "ChoiceFormValueWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(ChoiceFormValueWrap)

//
// IFormValue properties
//

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(Type)(FormValueType_T *aType)
{
    LogRelFlow(("{%p} %s: enter aType=%p\n", this, "ChoiceFormValue::getType", aType));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aType);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_TYPE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getType(aType);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_TYPE_RETURN(this, hrc, 0 /*normal*/,*aType);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_TYPE_RETURN(this, hrc, 1 /*hrc exception*/,*aType);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_TYPE_RETURN(this, hrc, 9 /*unhandled exception*/,*aType);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aType=%RU32 hrc=%Rhrc\n", this, "ChoiceFormValue::getType", *aType, hrc));
    return hrc;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(Generation)(LONG *aGeneration)
{
    LogRelFlow(("{%p} %s: enter aGeneration=%p\n", this, "ChoiceFormValue::getGeneration", aGeneration));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aGeneration);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_GENERATION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getGeneration(aGeneration);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_GENERATION_RETURN(this, hrc, 0 /*normal*/,*aGeneration);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_GENERATION_RETURN(this, hrc, 1 /*hrc exception*/,*aGeneration);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_GENERATION_RETURN(this, hrc, 9 /*unhandled exception*/,*aGeneration);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aGeneration=%RI32 hrc=%Rhrc\n", this, "ChoiceFormValue::getGeneration", *aGeneration, hrc));
    return hrc;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(Enabled)(BOOL *aEnabled)
{
    LogRelFlow(("{%p} %s: enter aEnabled=%p\n", this, "ChoiceFormValue::getEnabled", aEnabled));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aEnabled);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_ENABLED_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getEnabled(aEnabled);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_ENABLED_RETURN(this, hrc, 0 /*normal*/,*aEnabled != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_ENABLED_RETURN(this, hrc, 1 /*hrc exception*/,*aEnabled != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_ENABLED_RETURN(this, hrc, 9 /*unhandled exception*/,*aEnabled != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aEnabled=%RTbool hrc=%Rhrc\n", this, "ChoiceFormValue::getEnabled", *aEnabled, hrc));
    return hrc;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(Visible)(BOOL *aVisible)
{
    LogRelFlow(("{%p} %s: enter aVisible=%p\n", this, "ChoiceFormValue::getVisible", aVisible));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aVisible);
        
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_VISIBLE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVisible(aVisible);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_VISIBLE_RETURN(this, hrc, 0 /*normal*/,*aVisible != FALSE);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_VISIBLE_RETURN(this, hrc, 1 /*hrc exception*/,*aVisible != FALSE);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_VISIBLE_RETURN(this, hrc, 9 /*unhandled exception*/,*aVisible != FALSE);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aVisible=%RTbool hrc=%Rhrc\n", this, "ChoiceFormValue::getVisible", *aVisible, hrc));
    return hrc;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(Label)(BSTR *aLabel)
{
    LogRelFlow(("{%p} %s: enter aLabel=%p\n", this, "ChoiceFormValue::getLabel", aLabel));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLabel);
        BSTROutConverter TmpLabel(aLabel);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_LABEL_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getLabel(TmpLabel.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_LABEL_RETURN(this, hrc, 0 /*normal*/,TmpLabel.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_LABEL_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_LABEL_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aLabel=%ls hrc=%Rhrc\n", this, "ChoiceFormValue::getLabel", *aLabel, hrc));
    return hrc;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(Description)(BSTR *aDescription)
{
    LogRelFlow(("{%p} %s: enter aDescription=%p\n", this, "ChoiceFormValue::getDescription", aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDescription);
        BSTROutConverter TmpDescription(aDescription);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_DESCRIPTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getDescription(TmpDescription.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_DESCRIPTION_RETURN(this, hrc, 0 /*normal*/,TmpDescription.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_DESCRIPTION_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_DESCRIPTION_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aDescription=%ls hrc=%Rhrc\n", this, "ChoiceFormValue::getDescription", *aDescription, hrc));
    return hrc;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(Help)(BSTR *aHelp)
{
    LogRelFlow(("{%p} %s: enter aHelp=%p\n", this, "ChoiceFormValue::getHelp", aHelp));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aHelp);
        BSTROutConverter TmpHelp(aHelp);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_HELP_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getHelp(TmpHelp.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_HELP_RETURN(this, hrc, 0 /*normal*/,TmpHelp.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_HELP_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_HELP_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aHelp=%ls hrc=%Rhrc\n", this, "ChoiceFormValue::getHelp", *aHelp, hrc));
    return hrc;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute1IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute2IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute3IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute4IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute5IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute6IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute7IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute8IFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IChoiceFormValue properties
//

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(Values)(ComSafeArrayOut(BSTR, aValues))
{
    LogRelFlow(("{%p} %s: enter aValues=%p\n", this, "ChoiceFormValue::getValues", aValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValues);
        ArrayBSTROutConverter TmpValues(ComSafeArrayOutArg(aValues));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_VALUES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getValues(TmpValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_VALUES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_VALUES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GET_VALUES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aValues=%zu hrc=%Rhrc\n", this, "ChoiceFormValue::getValues", ComSafeArraySize(*aValues), hrc));
    return hrc;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute1IChoiceFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute2IChoiceFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute3IChoiceFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::COMGETTER(InternalAndReservedAttribute4IChoiceFormValue)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IFormValue methods
//

STDMETHODIMP ChoiceFormValueWrap::InternalAndReservedMethod1IFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::InternalAndReservedMethod2IFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::InternalAndReservedMethod3IFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::InternalAndReservedMethod4IFormValue()
{
    return E_NOTIMPL;
}

//
// IChoiceFormValue methods
//

STDMETHODIMP ChoiceFormValueWrap::GetSelectedIndex(LONG *aIndex)
{
    LogRelFlow(("{%p} %s:enter aIndex=%p\n", this, "ChoiceFormValue::getSelectedIndex", aIndex));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aIndex);


        

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GETSELECTEDINDEX_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getSelectedIndex(aIndex);
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GETSELECTEDINDEX_RETURN(this, hrc, 0 /*normal*/, *aIndex);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GETSELECTEDINDEX_RETURN(this, hrc, 1 /*hrc exception*/, *aIndex);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_GETSELECTEDINDEX_RETURN(this, hrc, 9 /*unhandled exception*/, *aIndex);
#endif
    }

    LogRelFlow(("{%p} %s: leave aIndex=%RI32 hrc=%Rhrc\n", this, "ChoiceFormValue::getSelectedIndex", *aIndex, hrc));
    return hrc;
}

STDMETHODIMP ChoiceFormValueWrap::SetSelectedIndex(LONG aIndex,
                                                   IProgress **aProgress)
{
    LogRelFlow(("{%p} %s:enter aIndex=%RI32 aProgress=%p\n", this, "ChoiceFormValue::setSelectedIndex", aIndex, aProgress));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProgress);


        
        ComTypeOutConverter<IProgress> TmpProgress(aProgress);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_SETSELECTEDINDEX_ENTER(this, aIndex);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setSelectedIndex(aIndex,
                                   TmpProgress.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_SETSELECTEDINDEX_RETURN(this, hrc, 0 /*normal*/, aIndex, (void *)TmpProgress.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_SETSELECTEDINDEX_RETURN(this, hrc, 1 /*hrc exception*/, aIndex, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CHOICEFORMVALUE_SETSELECTEDINDEX_RETURN(this, hrc, 9 /*unhandled exception*/, aIndex, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProgress=%p hrc=%Rhrc\n", this, "ChoiceFormValue::setSelectedIndex", *aProgress, hrc));
    return hrc;
}

STDMETHODIMP ChoiceFormValueWrap::InternalAndReservedMethod1IChoiceFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::InternalAndReservedMethod2IChoiceFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::InternalAndReservedMethod3IChoiceFormValue()
{
    return E_NOTIMPL;
}

STDMETHODIMP ChoiceFormValueWrap::InternalAndReservedMethod4IChoiceFormValue()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(ChoiceFormValueWrap)
NS_IMPL_THREADSAFE_ISUPPORTS2_CI(ChoiceFormValueWrap, IChoiceFormValue, IFormValue)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "ChoiceFormValueWrap.cpp"


// ##### BEGINFILE "VirtualSystemDescriptionFormWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for IVirtualSystemDescriptionForm.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_VIRTUALSYSTEMDESCRIPTIONFORM

#include "VirtualSystemDescriptionFormWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(VirtualSystemDescriptionFormWrap)

//
// IForm properties
//

STDMETHODIMP VirtualSystemDescriptionFormWrap::COMGETTER(Values)(ComSafeArrayOut(IFormValue *, aValues))
{
    LogRelFlow(("{%p} %s: enter aValues=%p\n", this, "VirtualSystemDescriptionForm::getValues", aValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValues);
        ArrayComTypeOutConverter<IFormValue> TmpValues(ComSafeArrayOutArg(aValues));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALSYSTEMDESCRIPTIONFORM_GET_VALUES_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getValues(TmpValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALSYSTEMDESCRIPTIONFORM_GET_VALUES_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALSYSTEMDESCRIPTIONFORM_GET_VALUES_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALSYSTEMDESCRIPTIONFORM_GET_VALUES_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aValues=%zu hrc=%Rhrc\n", this, "VirtualSystemDescriptionForm::getValues", ComSafeArraySize(*aValues), hrc));
    return hrc;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::COMGETTER(InternalAndReservedAttribute1IForm)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::COMGETTER(InternalAndReservedAttribute2IForm)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::COMGETTER(InternalAndReservedAttribute3IForm)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::COMGETTER(InternalAndReservedAttribute4IForm)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

//
// IVirtualSystemDescriptionForm properties
//

STDMETHODIMP VirtualSystemDescriptionFormWrap::COMGETTER(InternalAndReservedAttribute1IVirtualSystemDescriptionForm)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::COMGETTER(InternalAndReservedAttribute2IVirtualSystemDescriptionForm)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::COMGETTER(InternalAndReservedAttribute3IVirtualSystemDescriptionForm)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::COMGETTER(InternalAndReservedAttribute4IVirtualSystemDescriptionForm)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// IForm methods
//

STDMETHODIMP VirtualSystemDescriptionFormWrap::InternalAndReservedMethod1IForm()
{
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::InternalAndReservedMethod2IForm()
{
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::InternalAndReservedMethod3IForm()
{
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::InternalAndReservedMethod4IForm()
{
    return E_NOTIMPL;
}

//
// IVirtualSystemDescriptionForm methods
//

STDMETHODIMP VirtualSystemDescriptionFormWrap::GetVirtualSystemDescription(IVirtualSystemDescription **aDescription)
{
    LogRelFlow(("{%p} %s:enter aDescription=%p\n", this, "VirtualSystemDescriptionForm::getVirtualSystemDescription", aDescription));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aDescription);


        ComTypeOutConverter<IVirtualSystemDescription> TmpDescription(aDescription);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALSYSTEMDESCRIPTIONFORM_GETVIRTUALSYSTEMDESCRIPTION_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getVirtualSystemDescription(TmpDescription.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALSYSTEMDESCRIPTIONFORM_GETVIRTUALSYSTEMDESCRIPTION_RETURN(this, hrc, 0 /*normal*/, (void *)TmpDescription.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALSYSTEMDESCRIPTIONFORM_GETVIRTUALSYSTEMDESCRIPTION_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_VIRTUALSYSTEMDESCRIPTIONFORM_GETVIRTUALSYSTEMDESCRIPTION_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aDescription=%p hrc=%Rhrc\n", this, "VirtualSystemDescriptionForm::getVirtualSystemDescription", *aDescription, hrc));
    return hrc;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::InternalAndReservedMethod1IVirtualSystemDescriptionForm()
{
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::InternalAndReservedMethod2IVirtualSystemDescriptionForm()
{
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::InternalAndReservedMethod3IVirtualSystemDescriptionForm()
{
    return E_NOTIMPL;
}

STDMETHODIMP VirtualSystemDescriptionFormWrap::InternalAndReservedMethod4IVirtualSystemDescriptionForm()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(VirtualSystemDescriptionFormWrap)
NS_IMPL_THREADSAFE_ISUPPORTS2_CI(VirtualSystemDescriptionFormWrap, IVirtualSystemDescriptionForm, IForm)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "VirtualSystemDescriptionFormWrap.cpp"


// ##### BEGINFILE "CloudNetworkEnvironmentInfoWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for ICloudNetworkEnvironmentInfo.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_CLOUDNETWORKENVIRONMENTINFO

#include "CloudNetworkEnvironmentInfoWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(CloudNetworkEnvironmentInfoWrap)

//
// ICloudNetworkEnvironmentInfo properties
//

STDMETHODIMP CloudNetworkEnvironmentInfoWrap::COMGETTER(TunnelNetworkId)(BSTR *aTunnelNetworkId)
{
    LogRelFlow(("{%p} %s: enter aTunnelNetworkId=%p\n", this, "CloudNetworkEnvironmentInfo::getTunnelNetworkId", aTunnelNetworkId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aTunnelNetworkId);
        BSTROutConverter TmpTunnelNetworkId(aTunnelNetworkId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORKENVIRONMENTINFO_GET_TUNNELNETWORKID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getTunnelNetworkId(TmpTunnelNetworkId.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORKENVIRONMENTINFO_GET_TUNNELNETWORKID_RETURN(this, hrc, 0 /*normal*/,TmpTunnelNetworkId.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORKENVIRONMENTINFO_GET_TUNNELNETWORKID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDNETWORKENVIRONMENTINFO_GET_TUNNELNETWORKID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aTunnelNetworkId=%ls hrc=%Rhrc\n", this, "CloudNetworkEnvironmentInfo::getTunnelNetworkId", *aTunnelNetworkId, hrc));
    return hrc;
}

STDMETHODIMP CloudNetworkEnvironmentInfoWrap::COMGETTER(InternalAndReservedAttribute1ICloudNetworkEnvironmentInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkEnvironmentInfoWrap::COMGETTER(InternalAndReservedAttribute2ICloudNetworkEnvironmentInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkEnvironmentInfoWrap::COMGETTER(InternalAndReservedAttribute3ICloudNetworkEnvironmentInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkEnvironmentInfoWrap::COMGETTER(InternalAndReservedAttribute4ICloudNetworkEnvironmentInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkEnvironmentInfoWrap::COMGETTER(InternalAndReservedAttribute5ICloudNetworkEnvironmentInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkEnvironmentInfoWrap::COMGETTER(InternalAndReservedAttribute6ICloudNetworkEnvironmentInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudNetworkEnvironmentInfoWrap::COMGETTER(InternalAndReservedAttribute7ICloudNetworkEnvironmentInfo)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// ICloudNetworkEnvironmentInfo methods
//

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(CloudNetworkEnvironmentInfoWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(CloudNetworkEnvironmentInfoWrap, ICloudNetworkEnvironmentInfo)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "CloudNetworkEnvironmentInfoWrap.cpp"


// ##### BEGINFILE "CloudProfileWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for ICloudProfile.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_CLOUDPROFILE

#include "CloudProfileWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(CloudProfileWrap)

//
// ICloudProfile properties
//

STDMETHODIMP CloudProfileWrap::COMGETTER(Name)(BSTR *aName)
{
    LogRelFlow(("{%p} %s: enter aName=%p\n", this, "CloudProfile::getName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aName);
        BSTROutConverter TmpName(aName);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GET_NAME_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aName=%ls hrc=%Rhrc\n", this, "CloudProfile::getName", *aName, hrc));
    return hrc;
}

STDMETHODIMP CloudProfileWrap::COMSETTER(Name)(IN_BSTR aName)
{
    LogRelFlow(("{%p} %s: enter aName=%ls\n", this, "CloudProfile::setName", aName));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        BSTRInConverter TmpName(aName);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SET_NAME_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setName(TmpName.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SET_NAME_RETURN(this, hrc, 0 /*normal*/,TmpName.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SET_NAME_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SET_NAME_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "CloudProfile::setName", hrc));
    return hrc;
}

STDMETHODIMP CloudProfileWrap::COMGETTER(ProviderId)(BSTR *aProviderId)
{
    LogRelFlow(("{%p} %s: enter aProviderId=%p\n", this, "CloudProfile::getProviderId", aProviderId));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProviderId);
        UuidOutConverter TmpProviderId(aProviderId);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GET_PROVIDERID_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProviderId(TmpProviderId.uuid());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GET_PROVIDERID_RETURN(this, hrc, 0 /*normal*/,TmpProviderId.uuid().toStringCurly().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GET_PROVIDERID_RETURN(this, hrc, 1 /*hrc exception*/,0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GET_PROVIDERID_RETURN(this, hrc, 9 /*unhandled exception*/,0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProviderId=%ls hrc=%Rhrc\n", this, "CloudProfile::getProviderId", *aProviderId, hrc));
    return hrc;
}

STDMETHODIMP CloudProfileWrap::COMGETTER(InternalAndReservedAttribute1ICloudProfile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProfileWrap::COMGETTER(InternalAndReservedAttribute2ICloudProfile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProfileWrap::COMGETTER(InternalAndReservedAttribute3ICloudProfile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProfileWrap::COMGETTER(InternalAndReservedAttribute4ICloudProfile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProfileWrap::COMGETTER(InternalAndReservedAttribute5ICloudProfile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProfileWrap::COMGETTER(InternalAndReservedAttribute6ICloudProfile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProfileWrap::COMGETTER(InternalAndReservedAttribute7ICloudProfile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProfileWrap::COMGETTER(InternalAndReservedAttribute8ICloudProfile)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// ICloudProfile methods
//

STDMETHODIMP CloudProfileWrap::GetProperty(IN_BSTR aName,
                                           BSTR *aValue)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aValue=%p\n", this, "CloudProfile::getProperty", aName, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aValue);


        BSTRInConverter TmpName(aName);
        BSTROutConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GETPROPERTY_ENTER(this, TmpName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProperty(TmpName.str(),
                              TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GETPROPERTY_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GETPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GETPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aValue=%ls hrc=%Rhrc\n", this, "CloudProfile::getProperty", *aValue, hrc));
    return hrc;
}

STDMETHODIMP CloudProfileWrap::SetProperty(IN_BSTR aName,
                                           IN_BSTR aValue)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aValue=%ls\n", this, "CloudProfile::setProperty", aName, aValue));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        BSTRInConverter TmpName(aName);
        BSTRInConverter TmpValue(aValue);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SETPROPERTY_ENTER(this, TmpName.str().c_str(), TmpValue.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProperty(TmpName.str(),
                              TmpValue.str());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SETPROPERTY_RETURN(this, hrc, 0 /*normal*/, TmpName.str().c_str(), TmpValue.str().c_str());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SETPROPERTY_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SETPROPERTY_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "CloudProfile::setProperty", hrc));
    return hrc;
}

STDMETHODIMP CloudProfileWrap::GetProperties(IN_BSTR aNames,
                                             ComSafeArrayOut(BSTR, aReturnNames),
                                             ComSafeArrayOut(BSTR, aReturnValues))
{
    LogRelFlow(("{%p} %s:enter aNames=%ls aReturnNames=%p aReturnValues=%p\n", this, "CloudProfile::getProperties", aNames, aReturnNames, aReturnValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aReturnNames);
        CheckComArgOutPointerValidThrow(aReturnValues);


        BSTRInConverter TmpNames(aNames);
        ArrayBSTROutConverter TmpReturnNames(ComSafeArrayOutArg(aReturnNames));
        ArrayBSTROutConverter TmpReturnValues(ComSafeArrayOutArg(aReturnValues));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GETPROPERTIES_ENTER(this, TmpNames.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProperties(TmpNames.str(),
                                TmpReturnNames.array(),
                                TmpReturnValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GETPROPERTIES_RETURN(this, hrc, 0 /*normal*/, TmpNames.str().c_str(), (uint32_t)TmpReturnNames.array().size(), NULL /*for now*/, (uint32_t)TmpReturnValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GETPROPERTIES_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_GETPROPERTIES_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aReturnNames=%zu aReturnValues=%zu hrc=%Rhrc\n", this, "CloudProfile::getProperties", ComSafeArraySize(*aReturnNames), ComSafeArraySize(*aReturnValues), hrc));
    return hrc;
}

STDMETHODIMP CloudProfileWrap::SetProperties(ComSafeArrayIn(IN_BSTR, aNames),
                                             ComSafeArrayIn(IN_BSTR, aValues))
{
    LogRelFlow(("{%p} %s:enter aNames=%zu aValues=%zu\n", this, "CloudProfile::setProperties", aNames, aValues));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {


        ArrayBSTRInConverter TmpNames(ComSafeArrayInArg(aNames));
        ArrayBSTRInConverter TmpValues(ComSafeArrayInArg(aValues));

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SETPROPERTIES_ENTER(this, (uint32_t)TmpNames.array().size(), NULL /*for now*/, (uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = setProperties(TmpNames.array(),
                                TmpValues.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SETPROPERTIES_RETURN(this, hrc, 0 /*normal*/, (uint32_t)TmpNames.array().size(), NULL /*for now*/, (uint32_t)TmpValues.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SETPROPERTIES_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_SETPROPERTIES_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "CloudProfile::setProperties", hrc));
    return hrc;
}

STDMETHODIMP CloudProfileWrap::Remove()
{
    LogRelFlow(("{%p} %s:enter\n", this, "CloudProfile::remove"));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {



#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_REMOVE_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = remove();
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_REMOVE_RETURN(this, hrc, 0 /*normal*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_REMOVE_RETURN(this, hrc, 1 /*hrc exception*/);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_REMOVE_RETURN(this, hrc, 9 /*unhandled exception*/);
#endif
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "CloudProfile::remove", hrc));
    return hrc;
}

STDMETHODIMP CloudProfileWrap::CreateCloudClient(ICloudClient **aCloudClient)
{
    LogRelFlow(("{%p} %s:enter aCloudClient=%p\n", this, "CloudProfile::createCloudClient", aCloudClient));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aCloudClient);


        ComTypeOutConverter<ICloudClient> TmpCloudClient(aCloudClient);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_CREATECLOUDCLIENT_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = createCloudClient(TmpCloudClient.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_CREATECLOUDCLIENT_RETURN(this, hrc, 0 /*normal*/, (void *)TmpCloudClient.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_CREATECLOUDCLIENT_RETURN(this, hrc, 1 /*hrc exception*/, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROFILE_CREATECLOUDCLIENT_RETURN(this, hrc, 9 /*unhandled exception*/, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aCloudClient=%p hrc=%Rhrc\n", this, "CloudProfile::createCloudClient", *aCloudClient, hrc));
    return hrc;
}

STDMETHODIMP CloudProfileWrap::InternalAndReservedMethod1ICloudProfile()
{
    return E_NOTIMPL;
}

STDMETHODIMP CloudProfileWrap::InternalAndReservedMethod2ICloudProfile()
{
    return E_NOTIMPL;
}

STDMETHODIMP CloudProfileWrap::InternalAndReservedMethod3ICloudProfile()
{
    return E_NOTIMPL;
}

STDMETHODIMP CloudProfileWrap::InternalAndReservedMethod4ICloudProfile()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(CloudProfileWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(CloudProfileWrap, ICloudProfile)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "CloudProfileWrap.cpp"


// ##### BEGINFILE "CloudProviderManagerWrap.cpp"
/** @file
 * VirtualBox API class wrapper code for ICloudProviderManager.
 *
 * DO NOT EDIT! This is a generated file.
 * Generated from: src/VBox/Main/idl/VirtualBox.xidl
 * Generator: src/VBox/Main/idl/apiwrap-server.xsl
 */

/*
 * Copyright (C) 2010-2020 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 */

#define LOG_GROUP LOG_GROUP_MAIN_CLOUDPROVIDERMANAGER

#include "CloudProviderManagerWrap.h"
#include "LoggingNew.h"
#ifdef VBOX_WITH_DTRACE_R3_MAIN
# include "dtrace/VBoxAPI.h"
#endif

DEFINE_EMPTY_CTOR_DTOR(CloudProviderManagerWrap)

//
// ICloudProviderManager properties
//

STDMETHODIMP CloudProviderManagerWrap::COMGETTER(Providers)(ComSafeArrayOut(ICloudProvider *, aProviders))
{
    LogRelFlow(("{%p} %s: enter aProviders=%p\n", this, "CloudProviderManager::getProviders", aProviders));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProviders);
        ArrayComTypeOutConverter<ICloudProvider> TmpProviders(ComSafeArrayOutArg(aProviders));
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GET_PROVIDERS_ENTER(this);
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProviders(TmpProviders.array());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GET_PROVIDERS_RETURN(this, hrc, 0 /*normal*/,(uint32_t)TmpProviders.array().size(), NULL /*for now*/);
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GET_PROVIDERS_RETURN(this, hrc, 1 /*hrc exception*/,0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GET_PROVIDERS_RETURN(this, hrc, 9 /*unhandled exception*/,0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave *aProviders=%zu hrc=%Rhrc\n", this, "CloudProviderManager::getProviders", ComSafeArraySize(*aProviders), hrc));
    return hrc;
}

STDMETHODIMP CloudProviderManagerWrap::COMGETTER(InternalAndReservedAttribute1ICloudProviderManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProviderManagerWrap::COMGETTER(InternalAndReservedAttribute2ICloudProviderManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProviderManagerWrap::COMGETTER(InternalAndReservedAttribute3ICloudProviderManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProviderManagerWrap::COMGETTER(InternalAndReservedAttribute4ICloudProviderManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProviderManagerWrap::COMGETTER(InternalAndReservedAttribute5ICloudProviderManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProviderManagerWrap::COMGETTER(InternalAndReservedAttribute6ICloudProviderManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProviderManagerWrap::COMGETTER(InternalAndReservedAttribute7ICloudProviderManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}

STDMETHODIMP CloudProviderManagerWrap::COMGETTER(InternalAndReservedAttribute8ICloudProviderManager)(ULONG *aReserved)
{
    NOREF(aReserved);
    return E_NOTIMPL;
}


//
// ICloudProviderManager methods
//

STDMETHODIMP CloudProviderManagerWrap::GetProviderById(IN_BSTR aProviderId,
                                                       ICloudProvider **aProvider)
{
    LogRelFlow(("{%p} %s:enter aProviderId=%ls aProvider=%p\n", this, "CloudProviderManager::getProviderById", aProviderId, aProvider));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProvider);


        UuidInConverter TmpProviderId(aProviderId);
        ComTypeOutConverter<ICloudProvider> TmpProvider(aProvider);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYID_ENTER(this, TmpProviderId.uuid().toStringCurly().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProviderById(TmpProviderId.uuid(),
                                  TmpProvider.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYID_RETURN(this, hrc, 0 /*normal*/, TmpProviderId.uuid().toStringCurly().c_str(), (void *)TmpProvider.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYID_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYID_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProvider=%p hrc=%Rhrc\n", this, "CloudProviderManager::getProviderById", *aProvider, hrc));
    return hrc;
}

STDMETHODIMP CloudProviderManagerWrap::GetProviderByShortName(IN_BSTR aProviderName,
                                                              ICloudProvider **aProvider)
{
    LogRelFlow(("{%p} %s:enter aProviderName=%ls aProvider=%p\n", this, "CloudProviderManager::getProviderByShortName", aProviderName, aProvider));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProvider);


        BSTRInConverter TmpProviderName(aProviderName);
        ComTypeOutConverter<ICloudProvider> TmpProvider(aProvider);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYSHORTNAME_ENTER(this, TmpProviderName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProviderByShortName(TmpProviderName.str(),
                                         TmpProvider.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYSHORTNAME_RETURN(this, hrc, 0 /*normal*/, TmpProviderName.str().c_str(), (void *)TmpProvider.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYSHORTNAME_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYSHORTNAME_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProvider=%p hrc=%Rhrc\n", this, "CloudProviderManager::getProviderByShortName", *aProvider, hrc));
    return hrc;
}

STDMETHODIMP CloudProviderManagerWrap::GetProviderByName(IN_BSTR aProviderName,
                                                         ICloudProvider **aProvider)
{
    LogRelFlow(("{%p} %s:enter aProviderName=%ls aProvider=%p\n", this, "CloudProviderManager::getProviderByName", aProviderName, aProvider));

    // Clear error info, to make in-process calls behave the same as
    // cross-apartment calls or out-of-process calls.
    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aProvider);


        BSTRInConverter TmpProviderName(aProviderName);
        ComTypeOutConverter<ICloudProvider> TmpProvider(aProvider);

#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYNAME_ENTER(this, TmpProviderName.str().c_str());
#endif
        AutoCaller autoCaller(this);
        hrc = autoCaller.rc();
        if (SUCCEEDED(hrc))
        {
            hrc = getProviderByName(TmpProviderName.str(),
                                    TmpProvider.ptr());
        }
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYNAME_RETURN(this, hrc, 0 /*normal*/, TmpProviderName.str().c_str(), (void *)TmpProvider.ptr());
#endif
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYNAME_RETURN(this, hrc, 1 /*hrc exception*/, 0, 0);
#endif
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
#ifdef VBOX_WITH_DTRACE_R3_MAIN
        VBOXAPI_CLOUDPROVIDERMANAGER_GETPROVIDERBYNAME_RETURN(this, hrc, 9 /*unhandled exception*/, 0, 0);
#endif
    }

    LogRelFlow(("{%p} %s: leave aProvider=%p hrc=%Rhrc\n", this, "CloudProviderManager::getProviderByName", *aProvider, hrc));
    return hrc;
}

STDMETHODIMP CloudProviderManagerWrap::InternalAndReservedMethod1ICloudProviderManager()
{
    return E_NOTIMPL;
}

STDMETHODIMP CloudProviderManagerWrap::InternalAndReservedMethod2ICloudProviderManager()
{
    return E_NOTIMPL;
}

STDMETHODIMP CloudProviderManagerWrap::InternalAndReservedMethod3ICloudProviderManager()
{
    return E_NOTIMPL;
}

STDMETHODIMP CloudProviderManagerWrap::InternalAndReservedMethod4ICloudProviderManager()
{
    return E_NOTIMPL;
}

#ifdef VBOX_WITH_XPCOM
NS_DECL_CLASSINFO(CloudProviderManagerWrap)
NS_IMPL_THREADSAFE_ISUPPORTS1_CI(CloudProviderManagerWrap, ICloudProviderManager)
#endif // VBOX_WITH_XPCOM

// ##### ENDFILE "CloudProviderManagerWrap.cpp"
