private GitLab instance for personal projects

Commit fb868965 authored by Kevin M. Gallagher's avatar Kevin M. Gallagher

Include .svn in git repository

Don't ask me why; I know this is inadvisable.
parent 1aaa825c

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
/* $Id$ */
/** @file
* VirtualBoxErrorInfo COM class definition.
*/
/*
* Copyright (C) 2006-2019 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.
*/
#ifndef MAIN_INCLUDED_VirtualBoxErrorInfoImpl_h
#define MAIN_INCLUDED_VirtualBoxErrorInfoImpl_h
#ifndef RT_WITHOUT_PRAGMA_ONCE
# pragma once
#endif
#include "VirtualBoxBase.h"
using namespace com;
class ATL_NO_VTABLE VirtualBoxErrorInfo
: public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>
, VBOX_SCRIPTABLE_IMPL(IVirtualBoxErrorInfo)
#ifndef VBOX_WITH_XPCOM /* IErrorInfo doesn't inherit from IDispatch, ugly 3am hack: */
, public IDispatch
#endif
{
public:
DECLARE_NOT_AGGREGATABLE(VirtualBoxErrorInfo)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(VirtualBoxErrorInfo)
COM_INTERFACE_ENTRY(IErrorInfo)
COM_INTERFACE_ENTRY(IVirtualBoxErrorInfo)
COM_INTERFACE_ENTRY(IDispatch)
COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler)
END_COM_MAP()
HRESULT FinalConstruct()
{
#ifndef VBOX_WITH_XPCOM
return CoCreateFreeThreadedMarshaler((IUnknown *)(void *)this, &m_pUnkMarshaler);
#else
return S_OK;
#endif
}
void FinalRelease()
{
#ifndef VBOX_WITH_XPCOM
if (m_pUnkMarshaler)
{
m_pUnkMarshaler->Release();
m_pUnkMarshaler = NULL;
}
#endif
}
#ifndef VBOX_WITH_XPCOM
HRESULT init(IErrorInfo *aInfo);
STDMETHOD(GetGUID)(GUID *guid);
STDMETHOD(GetSource)(BSTR *pBstrSource);
STDMETHOD(GetDescription)(BSTR *description);
STDMETHOD(GetHelpFile)(BSTR *pBstrHelpFile);
STDMETHOD(GetHelpContext)(DWORD *pdwHelpContext);
// IDispatch forwarding - 3am hack.
typedef IDispatchImpl<IVirtualBoxErrorInfo, &IID_IVirtualBoxErrorInfo, &LIBID_VirtualBox, kTypeLibraryMajorVersion, kTypeLibraryMinorVersion> idi;
STDMETHOD(GetTypeInfoCount)(UINT *pcInfo)
{
return idi::GetTypeInfoCount(pcInfo);
}
STDMETHOD(GetTypeInfo)(UINT iInfo, LCID Lcid, ITypeInfo **ppTypeInfo)
{
return idi::GetTypeInfo(iInfo, Lcid, ppTypeInfo);
}
STDMETHOD(GetIDsOfNames)(REFIID rIID, LPOLESTR *papwszNames, UINT cNames, LCID Lcid, DISPID *paDispIDs)
{
return idi::GetIDsOfNames(rIID, papwszNames, cNames, Lcid, paDispIDs);
}
STDMETHOD(Invoke)(DISPID idDispMember, REFIID rIID, LCID Lcid, WORD fw, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *piErrArg)
{
return idi::Invoke(idDispMember, rIID, Lcid, fw, pDispParams, pVarResult, pExcepInfo, piErrArg);
}
#else // defined(VBOX_WITH_XPCOM)
HRESULT init(nsIException *aInfo);
NS_DECL_NSIEXCEPTION
#endif
VirtualBoxErrorInfo()
: m_resultCode(S_OK),
m_resultDetail(0)
{}
virtual ~VirtualBoxErrorInfo() {}
// public initializer/uninitializer for internal purposes only
HRESULT init(HRESULT aResultCode,
const GUID &aIID,
const char *pcszComponent,
const Utf8Str &strText,
IVirtualBoxErrorInfo *aNext = NULL);
HRESULT initEx(HRESULT aResultCode,
LONG aResultDetail,
const GUID &aIID,
const char *pcszComponent,
const Utf8Str &strText,
IVirtualBoxErrorInfo *aNext = NULL);