regsvr32: Use correct exit code when DllRegisterServer, DllUnregisterServer and DllInstall fail.

This commit is contained in:
Hugh McMaster 2015-09-03 19:29:42 +10:00 committed by Alexandre Julliard
parent 4349b3c16d
commit 76162a4ea8
2 changed files with 4 additions and 3 deletions

View File

@ -133,7 +133,7 @@ static int RegisterDll(const WCHAR* strDll)
if(FAILED(hr))
{
output_write(STRING_REGISTER_FAILED, strDll);
return -1;
return DLLSERVER_FAILED;
}
output_write(STRING_REGISTER_SUCCESSFUL, strDll);
@ -156,7 +156,7 @@ static int UnregisterDll(const WCHAR* strDll)
if(FAILED(hr))
{
output_write(STRING_UNREGISTER_FAILED, strDll);
return -1;
return DLLSERVER_FAILED;
}
output_write(STRING_UNREGISTER_SUCCESSFUL, strDll);
@ -182,7 +182,7 @@ static int InstallDll(BOOL install, const WCHAR *strDll, const WCHAR *command_li
output_write(STRING_INSTALL_FAILED, strDll);
else
output_write(STRING_UNINSTALL_FAILED, strDll);
return -1;
return DLLSERVER_FAILED;
}
if (install)
output_write(STRING_INSTALL_SUCCESSFUL, strDll);

View File

@ -22,6 +22,7 @@
#define INVALID_ARG 1
#define LOADLIBRARY_FAILED 3
#define GETPROCADDRESS_FAILED 4
#define DLLSERVER_FAILED 5
/* Resource strings */
#define STRING_HEADER 1000