summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-13 10:53:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-13 09:47:08 +0000
commitc236c8e88a6d3e30cc4acc9108cbce018ca872cc (patch)
tree659a5f99233820653d0e0273b9d2d7f15bd51823 /setup_native
parenta8fa87913f61ffbb67e224366d865ffe6ccfff86 (diff)
LoadLibraryEx returns null on error
Returning <= HINSTANCE_ERROR (aka 32) on error was apparently a feature of LoadLibrary in 16-bit Windows 3 times. Change-Id: Idf9fbd84ac1fadb67449968b65cd5e8e391a39f2 Reviewed-on: https://gerrit.libreoffice.org/29752 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'setup_native')
-rw-r--r--setup_native/source/win32/customactions/regactivex/regactivex.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
index bf33f71322c1..b4373185b7b1 100644
--- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx
+++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
@@ -72,7 +72,7 @@ char* UnicodeToAnsiString( wchar_t* pUniString )
void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser, BOOL InstallFor64Bit )
{
HINSTANCE hModule = LoadLibraryExA( pActiveXPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH );
- if( !( hModule <= ( HINSTANCE )HINSTANCE_ERROR ) )
+ if( hModule )
{
DllNativeRegProc pNativeProc = ( DllNativeRegProc )GetProcAddress( hModule, "DllRegisterServerNative" );
if( pNativeProc!=NULL )
@@ -99,7 +99,7 @@ void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallFor
void UnregisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser, BOOL InstallFor64Bit )
{
HINSTANCE hModule = LoadLibraryExA( pActiveXPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH );
- if( !( hModule <= ( HINSTANCE )HINSTANCE_ERROR ) )
+ if( hModule )
{
DllNativeUnregProc pNativeProc = ( DllNativeUnregProc )GetProcAddress( hModule, "DllUnregisterServerNative" );
if( pNativeProc!=NULL )