win,node-gyp: make delay-load hook C89 compliant

This fixes building compiled addons with Visual Studio 2010.

PR-URL: https://github.com/TooTallNate/node-gyp/pull/616
Reviewed-By: Bert Belder <bertbelder@gmail.com>
This commit is contained in:
Sharat M R 2015-04-27 05:25:33 +05:30 committed by Bert Belder
parent c1de6d249e
commit 0d6d3dda95

View File

@ -16,6 +16,7 @@
#include <string.h> #include <string.h>
static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) { static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) {
HMODULE m;
if (event != dliNotePreLoadLibrary) if (event != dliNotePreLoadLibrary)
return NULL; return NULL;
@ -23,7 +24,7 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) {
_stricmp(info->szDll, "node.exe") != 0) _stricmp(info->szDll, "node.exe") != 0)
return NULL; return NULL;
HMODULE m = GetModuleHandle(NULL); m = GetModuleHandle(NULL);
return (FARPROC) m; return (FARPROC) m;
} }