mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Show DLL description and version into xivfixes dll load list (#958)
This commit is contained in:
parent
e9147387c7
commit
1f1f0aaa20
4 changed files with 120 additions and 3 deletions
|
|
@ -103,8 +103,23 @@ void hooks::getprocaddress_singleton_import_hook::initialize() {
|
|||
LdrRegisterDllNotification(0, [](ULONG notiReason, const LDR_DLL_NOTIFICATION_DATA* pData, void* context) {
|
||||
if (notiReason == LDR_DLL_NOTIFICATION_REASON_LOADED) {
|
||||
const auto dllName = unicode::convert<std::string>(pData->Loaded.FullDllName->Buffer);
|
||||
logging::I(R"({} "{}" has been loaded at 0x{:X} ~ 0x{:X} (0x{:X}); finding import table items to hook.)",
|
||||
LogTag, dllName,
|
||||
|
||||
utils::loaded_module mod(pData->Loaded.DllBase);
|
||||
std::wstring version, description;
|
||||
try {
|
||||
version = utils::format_file_version(mod.get_file_version());
|
||||
} catch (...) {
|
||||
version = L"<unknown>";
|
||||
}
|
||||
|
||||
try {
|
||||
description = mod.get_description();
|
||||
} catch (...) {
|
||||
description = L"<unknown>";
|
||||
}
|
||||
|
||||
logging::I(R"({} "{}" ("{}" ver {}) has been loaded at 0x{:X} ~ 0x{:X} (0x{:X}); finding import table items to hook.)",
|
||||
LogTag, dllName, description, version,
|
||||
reinterpret_cast<size_t>(pData->Loaded.DllBase),
|
||||
reinterpret_cast<size_t>(pData->Loaded.DllBase) + pData->Loaded.SizeOfImage,
|
||||
pData->Loaded.SizeOfImage);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue