blob: 6dfc653fbc219d1eee6f7c3608237db48ea979ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
/*++
Copyright (c) 2005 Microsoft Corporation
All rights reserved.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
File Name:
xdexcept.h
Abstract:
XPSDrv sample driver exception class
--*/
#pragma once
class CXDException
{
public:
/*++
Routine Name:
CXDException
Routine Description:
Class constructor
Arguments:
None
Return Value:
None
--*/
CXDException() throw() :
m_hr(E_FAIL)
{
}
/*++
Routine Name:
CXDException
Routine Description:
Class constructor
Arguments:
hr - HRESULT value for the error for which the exception is thrown
Return Value:
None
--*/
CXDException(
HRESULT hr
) throw() :
m_hr(hr)
{
}
/*++
Routine Name:
operator HRESULT()
Routine Description:
HRESULT cast operator
Arguments:
None
Return Value:
The HRESULT value associated with the exception
--*/
operator HRESULT() CONST throw()
{
return m_hr;
}
public:
HRESULT m_hr;
};
|