VirtualBox

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

Last change on this file since 2106 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 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 STDMETHOD(GetGUID) (GUID *guid);
52 STDMETHOD(GetSource) (BSTR *source);
53 STDMETHOD(GetDescription) (BSTR *description);
54 STDMETHOD(GetHelpFile) (BSTR *pBstrHelpFile);
55 STDMETHOD(GetHelpContext) (DWORD *pdwHelpContext);
56#else // !defined (__WIN__)
57 NS_DECL_NSIEXCEPTION
58#endif
59
60 VirtualBoxErrorInfo() : mResultCode (S_OK) {}
61
62 // public initializer/uninitializer for internal purposes only
63 void init (HRESULT resultCode, const GUID &iid,
64 const BSTR component, const BSTR text);
65
66 // IVirtualBoxErrorInfo properties
67 STDMETHOD(COMGETTER(ResultCode)) (HRESULT *resultCode);
68 STDMETHOD(COMGETTER(InterfaceID)) (GUIDPARAMOUT iid);
69 STDMETHOD(COMGETTER(Component)) (BSTR *component);
70 STDMETHOD(COMGETTER(Text)) (BSTR *text);
71
72private:
73
74 HRESULT mResultCode;
75 Bstr mText;
76 Guid mIID;
77 Bstr mComponent;
78};
79
80#endif // ____H_VIRTUALBOXERRORINFOIMPL
81
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