From 4a4baf2566c595c0a79ef4cb4b6a0a4dbe1cc483 Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Wed, 2 Sep 2015 21:12:27 +1000 Subject: [PATCH] regsvr32: Use correct exit code when LoadLibraryEx fails. --- programs/regsvr32/regsvr32.c | 2 +- programs/regsvr32/regsvr32.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/regsvr32/regsvr32.c b/programs/regsvr32/regsvr32.c index 68cb94918a8..c0a9e135a62 100644 --- a/programs/regsvr32/regsvr32.c +++ b/programs/regsvr32/regsvr32.c @@ -107,7 +107,7 @@ static VOID *LoadProc(const WCHAR* strDll, const char* procName, HMODULE* DllHan if(!*DllHandle) { output_write(STRING_DLL_LOAD_FAILED, strDll); - ExitProcess(1); + ExitProcess(LOADLIBRARY_FAILED); } proc = (VOID *) GetProcAddress(*DllHandle, procName); if(!proc) diff --git a/programs/regsvr32/regsvr32.h b/programs/regsvr32/regsvr32.h index c021c5570a9..85b4a72f2f9 100644 --- a/programs/regsvr32/regsvr32.h +++ b/programs/regsvr32/regsvr32.h @@ -19,6 +19,7 @@ */ /* Exit codes */ +#define LOADLIBRARY_FAILED 3 #define GETPROCADDRESS_FAILED 4 /* Resource strings */