在动态库DLL中,通过GetModuleHandle 获取模块句柄时:以 Sample.exe 调用 Function.dll 为例
BOOL DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved);
DllMain 传入的参数时 DLL 自身的句柄 等同于
GetModuleHandle(L"Sample.exe") <===> GetModuleHandle(NULL)
hModule <===> GetModuleHandle(L"Function.dll")
GetModuleHandle(L"[错误模块名].dll") <===> NULL