Skip to content

Commit b9d10a5

Browse files
zombieyanglukekarrys
authored andcommitted
fix: try libnode.dll first in load_exe_hook (#2834)
1 parent bf9168e commit b9d10a5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/win_delay_load_hook.cc

Lines changed: 3 additions & 1 deletion
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)