diff --git a/src/win_delay_load_hook.cc b/src/win_delay_load_hook.cc index 39290d41a8..f7de9b0144 100644 --- a/src/win_delay_load_hook.cc +++ b/src/win_delay_load_hook.cc @@ -31,8 +31,13 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) { return ret; } if (event == dliStartProcessing) { - node_dll = GetModuleHandle("node.dll"); - nw_dll = GetModuleHandle("nw.dll"); + #ifdef UNICODE + node_dll = GetModuleHandle(L"node.dll"); + nw_dll = GetModuleHandle(L"nw.dll"); + #else + node_dll = GetModuleHandle("node.dll"); + nw_dll = GetModuleHandle("nw.dll"); + #endif return NULL; } if (event != dliNotePreLoadLibrary)