mirror of
https://github.com/DoubleLabyrinth/navicat-keygen.git
synced 2019-12-02 05:10:56 +00:00
Add NumberOfSections() for ImageInterpreter
This commit is contained in:
@@ -298,6 +298,7 @@ namespace nkg {
|
||||
return IsRvaRangeInRelocTable(FileOffsetToRva(FileOffset), Size);
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
DWORD ImageInterpreter::ImageFileMajorVersion() const {
|
||||
if (_VsFixedFileInfo) {
|
||||
return _VsFixedFileInfo->dwFileVersionMS;
|
||||
@@ -306,6 +307,7 @@ namespace nkg {
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
DWORD ImageInterpreter::ImageFileMinorVersion() const {
|
||||
if (_VsFixedFileInfo) {
|
||||
return _VsFixedFileInfo->dwFileVersionLS;
|
||||
@@ -314,6 +316,7 @@ namespace nkg {
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
DWORD ImageInterpreter::ImageProductMajorVersion() const {
|
||||
if (_VsFixedFileInfo) {
|
||||
return _VsFixedFileInfo->dwProductVersionMS;
|
||||
@@ -322,6 +325,7 @@ namespace nkg {
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
DWORD ImageInterpreter::ImageProductMinorVersion() const {
|
||||
if (_VsFixedFileInfo) {
|
||||
return _VsFixedFileInfo->dwProductVersionLS;
|
||||
@@ -329,5 +333,10 @@ namespace nkg {
|
||||
throw Exception(NKG_CURRENT_SOURCE_FILE(), NKG_CURRENT_SOURCE_LINE(), TEXT("Image does not have version info."));
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
size_t ImageInterpreter::NumberOfSections() const noexcept {
|
||||
return _NtHeaders->FileHeader.NumberOfSections;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -229,6 +229,9 @@ namespace nkg {
|
||||
|
||||
[[nodiscard]]
|
||||
DWORD ImageProductMinorVersion() const;
|
||||
|
||||
[[nodiscard]]
|
||||
size_t NumberOfSections() const noexcept;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user