regsvr32: Use correct exit code when GetProcAddress fails.

This commit is contained in:
Hugh McMaster 2015-09-02 21:12:26 +10:00 committed by Alexandre Julliard
parent cb183688bb
commit 68a5642d5c
2 changed files with 6 additions and 3 deletions

View File

@ -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))

View File

@ -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