diff options
Diffstat (limited to 'utils/zenutils/libraries/pelib-0.9/pelib/PeFile.cpp')
-rwxr-xr-x | utils/zenutils/libraries/pelib-0.9/pelib/PeFile.cpp | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/utils/zenutils/libraries/pelib-0.9/pelib/PeFile.cpp b/utils/zenutils/libraries/pelib-0.9/pelib/PeFile.cpp new file mode 100755 index 0000000000..39f2488b81 --- /dev/null +++ b/utils/zenutils/libraries/pelib-0.9/pelib/PeFile.cpp | |||
@@ -0,0 +1,169 @@ | |||
1 | /* | ||
2 | * PeLib.cpp - Part of the PeLib library. | ||
3 | * | ||
4 | * Copyright (c) 2004 - 2005 Sebastian Porst (webmaster@the-interweb.com) | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This software is licensed under the zlib/libpng License. | ||
8 | * For more details see http://www.opensource.org/licenses/zlib-license.php | ||
9 | * or the license information file (license.htm) in the root directory | ||
10 | * of PeLib. | ||
11 | */ | ||
12 | |||
13 | #include "PeFile.h" | ||
14 | |||
15 | namespace PeLib | ||
16 | { | ||
17 | PeFile::~PeFile() | ||
18 | { | ||
19 | } | ||
20 | |||
21 | PeFile32::PeFile32() : PeFileT<32>() | ||
22 | { | ||
23 | } | ||
24 | |||
25 | PeFile32::PeFile32(const std::string& strFlename) : PeFileT<32>(strFlename) | ||
26 | { | ||
27 | } | ||
28 | |||
29 | PeFile64::PeFile64() : PeFileT<64>() | ||
30 | { | ||
31 | } | ||
32 | |||
33 | PeFile64::PeFile64(const std::string& strFlename) : PeFileT<64>(strFlename) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | /** | ||
38 | * @return A reference to the file's MZ header. | ||
39 | **/ | ||
40 | |||
41 | const MzHeader& PeFile::mzHeader() const | ||
42 | { | ||
43 | return m_mzh; | ||
44 | } | ||
45 | |||
46 | /** | ||
47 | * @return A reference to the file's MZ header. | ||
48 | **/ | ||
49 | |||
50 | MzHeader& PeFile::mzHeader() | ||
51 | { | ||
52 | return m_mzh; | ||
53 | } | ||
54 | |||
55 | /** | ||
56 | * @return A reference to the file's export directory. | ||
57 | **/ | ||
58 | |||
59 | const ExportDirectory& PeFile::expDir() const | ||
60 | { | ||
61 | return m_expdir; | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * @return A reference to the file's export directory. | ||
66 | **/ | ||
67 | |||
68 | ExportDirectory& PeFile::expDir() | ||
69 | { | ||
70 | return m_expdir; | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * @return A reference to the file's bound import directory. | ||
75 | **/ | ||
76 | |||
77 | const BoundImportDirectory& PeFile::boundImpDir() const | ||
78 | { | ||
79 | return m_boundimpdir; | ||
80 | } | ||
81 | |||
82 | /** | ||
83 | * @return A reference to the file's bound import directory. | ||
84 | **/ | ||
85 | |||
86 | BoundImportDirectory& PeFile::boundImpDir() | ||
87 | { | ||
88 | return m_boundimpdir; | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * @return A reference to the file's resource directory. | ||
93 | **/ | ||
94 | |||
95 | const ResourceDirectory& PeFile::resDir() const | ||
96 | { | ||
97 | return m_resdir; | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * @return A reference to the file's resource directory. | ||
102 | **/ | ||
103 | |||
104 | ResourceDirectory& PeFile::resDir() | ||
105 | { | ||
106 | return m_resdir; | ||
107 | } | ||
108 | |||
109 | /** | ||
110 | * @return A reference to the file's relocations directory. | ||
111 | **/ | ||
112 | |||
113 | const RelocationsDirectory& PeFile::relocDir() const | ||
114 | { | ||
115 | return m_relocs; | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * @return A reference to the file's relocations directory. | ||
120 | **/ | ||
121 | |||
122 | RelocationsDirectory& PeFile::relocDir() | ||
123 | { | ||
124 | return m_relocs; | ||
125 | } | ||
126 | |||
127 | /** | ||
128 | * @return A reference to the file's COM+ descriptor directory. | ||
129 | **/ | ||
130 | |||
131 | const ComHeaderDirectory& PeFile::comDir() const | ||
132 | { | ||
133 | return m_comdesc; | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * @return A reference to the file's COM+ descriptor directory. | ||
138 | **/ | ||
139 | |||
140 | ComHeaderDirectory & PeFile::comDir() | ||
141 | { | ||
142 | return m_comdesc; | ||
143 | } | ||
144 | |||
145 | |||
146 | const IatDirectory& PeFile::iatDir() const | ||
147 | { | ||
148 | return m_iat; | ||
149 | } | ||
150 | |||
151 | |||
152 | IatDirectory& PeFile::iatDir() | ||
153 | { | ||
154 | return m_iat; | ||
155 | } | ||
156 | |||
157 | |||
158 | const DebugDirectory& PeFile::debugDir() const | ||
159 | { | ||
160 | return m_debugdir; | ||
161 | } | ||
162 | |||
163 | |||
164 | DebugDirectory& PeFile::debugDir() | ||
165 | { | ||
166 | return m_debugdir; | ||
167 | } | ||
168 | |||
169 | } | ||