[PATCH 1/3] regsvr32: Use correct exit code when GetProcAddress fails
Hugh McMaster
hugh.mcmaster at outlook.com
Wed Sep 2 06:12:26 CDT 2015
---
programs/regsvr32/regsvr32.c | 6 +++---
programs/regsvr32/regsvr32.h | 3 +++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/programs/regsvr32/regsvr32.c b/programs/regsvr32/regsvr32.c
index f75825b..68cb949 100644
--- a/programs/regsvr32/regsvr32.c
+++ b/programs/regsvr32/regsvr32.c
@@ -127,7 +127,7 @@ static int RegisterDll(const WCHAR* strDll)
pfRegister = LoadProc(strDll, "DllRegisterServer", &DllHandle);
if (!pfRegister)
- return 0;
+ return GETPROCADDRESS_FAILED;
hr = pfRegister();
if(FAILED(hr))
@@ -150,7 +150,7 @@ static int UnregisterDll(const WCHAR* strDll)
pfUnregister = LoadProc(strDll, "DllUnregisterServer", &DllHandle);
if (!pfUnregister)
- return 0;
+ return GETPROCADDRESS_FAILED;
hr = pfUnregister();
if(FAILED(hr))
@@ -173,7 +173,7 @@ static int InstallDll(BOOL install, const WCHAR *strDll, const WCHAR *command_li
pfInstall = LoadProc(strDll, "DllInstall", &DllHandle);
if (!pfInstall)
- return 0;
+ return GETPROCADDRESS_FAILED;
hr = pfInstall(install, command_line);
if(FAILED(hr))
diff --git a/programs/regsvr32/regsvr32.h b/programs/regsvr32/regsvr32.h
index e3b50eb..c021c55 100644
--- a/programs/regsvr32/regsvr32.h
+++ b/programs/regsvr32/regsvr32.h
@@ -18,6 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+/* Exit codes */
+#define GETPROCADDRESS_FAILED 4
+
/* Resource strings */
#define STRING_HEADER 1000
#define STRING_USAGE 1001
--
1.9.1
More information about the wine-patches
mailing list