Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
LPTSTR DLLPath = 新しい TCHAR[_MAX_PATH]; ::GetModuleFileName((HINSTANCE)&__ImageBase, DLLPath, _MAX_PATH);
上記の関数を使用して、isapi dll の物理パスを取得していました。デバッグ モードでは正常に動作します。リリース モードでビルドしようとすると、 __ImageBase unidentified と表示されます。誰かがこれに代わるものを私に提案できますか?
ありがとう
おそらく、ではなくhInstanceに渡されたパラメータを保存して使用する必要があります。DllMain()__ImageBase
hInstance
DllMain()
__ImageBase
おそらく次のようにキャストする必要があります。
__ImageBaseは通常、値: です0x400000。これは通常、Image Loader が .exe をメモリにロードする場所です。
0x400000
HINSTANCE hInst = reinterpret_cast<HINSTANCE>(&__ImageBase)