Skip to content

Commit

Permalink
try libnode.dll first in load_exe_hook (#2834)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieyang authored Dec 13, 2024
1 parent bf9168e commit 0d00253
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/win_delay_load_hook.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) {
if (_stricmp(info->szDll, HOST_BINARY) != 0)
return NULL;

m = GetModuleHandle(NULL);
// try for libnode.dll to compat node.js that using 'vcbuild.bat dll'
m = GetModuleHandle("libnode.dll");
if (m == NULL) m = GetModuleHandle(NULL);
return (FARPROC) m;
}

Expand Down

0 comments on commit 0d00253

Please sign in to comment.