Skip to content

Commit 98e4184

Browse files
authoredDec 14, 2022
fix: win_delay_load_hook.cc will fall back to the host process (#289)
1 parent 3be712f commit 98e4184

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎lib/cpp/win_delay_load_hook.cc

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) {
4040

4141
if (_stricmp(info->szDll, "node.exe") != 0)
4242
return NULL;
43+
44+
// Fall back to the current process
45+
if(!node_dll) node_dll = GetModuleHandleA(NULL);
4346

4447
return (FARPROC) node_dll;
4548
}

0 commit comments

Comments
 (0)
Please sign in to comment.