Skip to content

Commit 0d00253

Browse files
authored
try libnode.dll first in load_exe_hook (#2834)
1 parent bf9168e commit 0d00253

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/win_delay_load_hook.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) {
2828
if (_stricmp(info->szDll, HOST_BINARY) != 0)
2929
return NULL;
3030

31-
m = GetModuleHandle(NULL);
31+
// try for libnode.dll to compat node.js that using 'vcbuild.bat dll'
32+
m = GetModuleHandle("libnode.dll");
33+
if (m == NULL) m = GetModuleHandle(NULL);
3234
return (FARPROC) m;
3335
}
3436

0 commit comments

Comments
 (0)