regsvr32: Use correct exit code when GetProcAddress fails.
This commit is contained in:
parent
cb183688bb
commit
68a5642d5c
|
@ -127,7 +127,7 @@ static int RegisterDll(const WCHAR* strDll)
|
||||||
|
|
||||||
pfRegister = LoadProc(strDll, "DllRegisterServer", &DllHandle);
|
pfRegister = LoadProc(strDll, "DllRegisterServer", &DllHandle);
|
||||||
if (!pfRegister)
|
if (!pfRegister)
|
||||||
return 0;
|
return GETPROCADDRESS_FAILED;
|
||||||
|
|
||||||
hr = pfRegister();
|
hr = pfRegister();
|
||||||
if(FAILED(hr))
|
if(FAILED(hr))
|
||||||
|
@ -150,7 +150,7 @@ static int UnregisterDll(const WCHAR* strDll)
|
||||||
|
|
||||||
pfUnregister = LoadProc(strDll, "DllUnregisterServer", &DllHandle);
|
pfUnregister = LoadProc(strDll, "DllUnregisterServer", &DllHandle);
|
||||||
if (!pfUnregister)
|
if (!pfUnregister)
|
||||||
return 0;
|
return GETPROCADDRESS_FAILED;
|
||||||
|
|
||||||
hr = pfUnregister();
|
hr = pfUnregister();
|
||||||
if(FAILED(hr))
|
if(FAILED(hr))
|
||||||
|
@ -173,7 +173,7 @@ static int InstallDll(BOOL install, const WCHAR *strDll, const WCHAR *command_li
|
||||||
|
|
||||||
pfInstall = LoadProc(strDll, "DllInstall", &DllHandle);
|
pfInstall = LoadProc(strDll, "DllInstall", &DllHandle);
|
||||||
if (!pfInstall)
|
if (!pfInstall)
|
||||||
return 0;
|
return GETPROCADDRESS_FAILED;
|
||||||
|
|
||||||
hr = pfInstall(install, command_line);
|
hr = pfInstall(install, command_line);
|
||||||
if(FAILED(hr))
|
if(FAILED(hr))
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Exit codes */
|
||||||
|
#define GETPROCADDRESS_FAILED 4
|
||||||
|
|
||||||
/* Resource strings */
|
/* Resource strings */
|
||||||
#define STRING_HEADER 1000
|
#define STRING_HEADER 1000
|
||||||
#define STRING_USAGE 1001
|
#define STRING_USAGE 1001
|
||||||
|
|
Loading…
Reference in New Issue