VirtualBox

source: vbox/trunk/src/VBox/Main/include/VirtualBoxErrorInfoImpl.h@ 2929

Last change on this file since 2929 was 2672, checked in by vboxsync, 18 years ago

Main: Ported latest dmik/exp branch changes (r21219:21226) into the trunk.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/** @file
2 *
3 * VirtualBoxErrorInfo COM classe definition
4 */
5
6/*
7 * Copyright (C) 2006 InnoTek Systemberatung GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22#ifndef ____H_VIRTUALBOXERRORINFOIMPL
23#define ____H_VIRTUALBOXERRORINFOIMPL
24
25#include "VirtualBoxBase.h"
26
27using namespace com;
28
29class ATL_NO_VTABLE VirtualBoxErrorInfo
30#if defined (__WIN__)
31 : public CComObjectRootEx <CComMultiThreadModel>
32#else
33 : public CComObjectRootEx
34#endif
35 , public IVirtualBoxErrorInfo
36{
37public:
38
39 DECLARE_NOT_AGGREGATABLE(VirtualBoxErrorInfo)
40
41 DECLARE_PROTECT_FINAL_CONSTRUCT()
42
43 BEGIN_COM_MAP(VirtualBoxErrorInfo)
44 COM_INTERFACE_ENTRY(IErrorInfo)
45 COM_INTERFACE_ENTRY(IVirtualBoxErrorInfo)
46 END_COM_MAP()
47
48 NS_DECL_ISUPPORTS
49
50#if defined (__WIN__)
51
52 HRESULT init (IErrorInfo *aInfo);
53
54 STDMETHOD(GetGUID) (GUID *guid);
55 STDMETHOD(GetSource) (BSTR *source);
56 STDMETHOD(GetDescription) (BSTR *description);
57 STDMETHOD(GetHelpFile) (BSTR *pBstrHelpFile);
58 STDMETHOD(GetHelpContext) (DWORD *pdwHelpContext);
59
60#else // !defined (__WIN__)
61
62 HRESULT init (nsIException *aInfo);
63
64 NS_DECL_NSIEXCEPTION
65
66#endif
67
68 VirtualBoxErrorInfo() : mResultCode (S_OK) {}
69
70 // public initializer/uninitializer for internal purposes only
71 HRESULT init (HRESULT aResultCode, const GUID &aIID,
72 const BSTR aComponent, const BSTR aText,
73 IVirtualBoxErrorInfo *aNext = NULL);
74
75 // IVirtualBoxErrorInfo properties
76 STDMETHOD(COMGETTER(ResultCode)) (HRESULT *aResultCode);
77 STDMETHOD(COMGETTER(InterfaceID)) (GUIDPARAMOUT aIID);
78 STDMETHOD(COMGETTER(Component)) (BSTR *aComponent);
79 STDMETHOD(COMGETTER(Text)) (BSTR *aText);
80 STDMETHOD(COMGETTER(Next)) (IVirtualBoxErrorInfo **aNext);
81
82private:
83
84 HRESULT mResultCode;
85 Bstr mText;
86 Guid mIID;
87 Bstr mComponent;
88 ComPtr <IVirtualBoxErrorInfo> mNext;
89};
90
91#endif // ____H_VIRTUALBOXERRORINFOIMPL
92
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette