diff --git a/addon.gypi b/addon.gypi index 62e8bc67c7..118ff22769 100644 --- a/addon.gypi +++ b/addon.gypi @@ -43,7 +43,7 @@ 'conditions': [ [ 'OS=="win"', { 'sources': [ - '<(node_gyp_dir)/src/win_delay_load_hook.c', + '<(node_gyp_dir)/src/win_delay_load_hook.cc', ], 'msvs_settings': { 'VCLinkerTool': { diff --git a/src/win_delay_load_hook.c b/src/win_delay_load_hook.cc similarity index 92% rename from src/win_delay_load_hook.c rename to src/win_delay_load_hook.cc index b1e170aa13..e75954b605 100644 --- a/src/win_delay_load_hook.c +++ b/src/win_delay_load_hook.cc @@ -31,6 +31,6 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) { return (FARPROC) m; } -PfnDliHook __pfnDliNotifyHook2 = load_exe_hook; +decltype(__pfnDliNotifyHook2) __pfnDliNotifyHook2 = load_exe_hook; #endif