From 0712edb07be018b7cfe0fecb2bc418083a399bab Mon Sep 17 00:00:00 2001 From: sonyps5201314 Date: Sat, 12 Oct 2024 12:08:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9C=A8=E4=BD=8E=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=B3=BB=E7=BB=9F=E4=B8=8A=E5=A6=82=E6=9E=9C=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=B7=B2=E7=BB=8F=E5=8A=A0=E8=BD=BD=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E7=94=A8=E6=88=B7=E7=9B=AE=E5=BD=95=E4=B8=8B=E7=9A=84?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E5=90=8D=E7=A7=B0=E7=9A=84=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E4=B9=8B=E5=90=8Etry=5Fget=5Fmodule=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E5=B9=B6=E4=B8=8D=E8=83=BD=E5=8A=A0=E8=BD=BD=E5=88=B0?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=9B=AE=E5=BD=95=E4=B8=8B=E7=9A=84=E8=AF=A5?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E7=9A=84=E6=A8=A1=E5=9D=97=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Thunks/YY_Thunks.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Thunks/YY_Thunks.cpp b/src/Thunks/YY_Thunks.cpp index 7b2f9b4..7b01480 100644 --- a/src/Thunks/YY_Thunks.cpp +++ b/src/Thunks/YY_Thunks.cpp @@ -1197,8 +1197,13 @@ static HMODULE __fastcall try_get_module(volatile HMODULE* pModule, const wchar_ } else { - auto _sModuleName = YY::Thunks::internal::MakeNtString(module_name); - LdrLoadDll(szFilePathBuffer, nullptr, &_sModuleName, &new_handle); + wchar_t szStringBuffer[MAX_PATH]; + YY::Thunks::internal::StringBuffer _StringBuffer(szStringBuffer, _countof(szStringBuffer)); + _StringBuffer.AppendString(szFilePathBuffer); + _StringBuffer.AppendChar(L'\\'); + _StringBuffer.AppendString(module_name); + auto _sModuleName = YY::Thunks::internal::MakeNtString(szStringBuffer); + LdrLoadDll(nullptr, nullptr, &_sModuleName, &new_handle); } } else