From 6fc4954457b70f1e7f07936216b9773f4f9f4101 Mon Sep 17 00:00:00 2001 From: Andrew Nguyen Date: Sun, 2 May 2010 01:24:40 -0500 Subject: [PATCH] regsvr32: Continue processing DLL list if an export is not found for a DLL. --- programs/regsvr32/regsvr32.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/programs/regsvr32/regsvr32.c b/programs/regsvr32/regsvr32.c index 75cc9c99450..ac8760bf16b 100644 --- a/programs/regsvr32/regsvr32.c +++ b/programs/regsvr32/regsvr32.c @@ -100,7 +100,7 @@ static VOID *LoadProc(const char* strDll, const char* procName, HMODULE* DllHand if(!Silent) printf("%s not implemented in DLL %s\n", procName, strDll); FreeLibrary(*DllHandle); - ExitProcess(1); + return NULL; } return proc; } @@ -112,6 +112,8 @@ static int RegisterDll(const char* strDll) HMODULE DllHandle = NULL; pfRegister = LoadProc(strDll, "DllRegisterServer", &DllHandle); + if (!pfRegister) + return 0; hr = pfRegister(); if(FAILED(hr)) @@ -136,6 +138,9 @@ static int UnregisterDll(char* strDll) HMODULE DllHandle = NULL; pfUnregister = LoadProc(strDll, "DllUnregisterServer", &DllHandle); + if (!pfUnregister) + return 0; + hr = pfUnregister(); if(FAILED(hr)) { @@ -159,6 +164,9 @@ static int InstallDll(BOOL install, char *strDll, WCHAR *command_line) HMODULE DllHandle = NULL; pfInstall = LoadProc(strDll, "DllInstall", &DllHandle); + if (!pfInstall) + return 0; + hr = pfInstall(install, command_line); if(FAILED(hr)) {