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.
#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