From: Iain Patterson Date: Wed, 4 Jun 2014 18:20:44 +0000 (+0100) Subject: Suppress ERROR_PROC_NOT_FOUND events. X-Git-Tag: v2.23~4 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=6500f75954f9d96d35d4aa2749d36807704c1cb3;p=nssm.git Suppress ERROR_PROC_NOT_FOUND events. Don't log "The specified procedure could not be found" if GetProcAddress() fails. ERROR_PROC_NOT_FOUND is expected when running a version of Windows which doesn't support the desired. function Thanks Alain Douangpraseuth. --- diff --git a/imports.cpp b/imports.cpp index 18c8bb0..6257131 100644 --- a/imports.cpp +++ b/imports.cpp @@ -36,7 +36,7 @@ FARPROC get_import(HMODULE library, const char *function, unsigned long *error) #else function_name = (TCHAR *) function; #endif - log_event(EVENTLOG_WARNING_TYPE, NSSM_EVENT_GETPROCADDRESS_FAILED, function_name, error_string(*error), 0); + if (*error != ERROR_PROC_NOT_FOUND) log_event(EVENTLOG_WARNING_TYPE, NSSM_EVENT_GETPROCADDRESS_FAILED, function_name, error_string(*error), 0); #ifdef UNICODE if (function_name) HeapFree(GetProcessHeap(), 0, function_name); #endif