Commit 68a5642d authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regsvr32: Use correct exit code when GetProcAddress fails.

parent cb183688
......@@ -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))
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment