diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-01-28 14:29:22 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-01-28 14:29:22 +0000 |
commit | 15a7e7ebe01e173460bbda40b9496e1fce5daca2 (patch) | |
tree | 7dbd94a23212e05d7ee6119b18a42916a9dd6b66 /sal/osl/w32/module.c | |
parent | 109727e58881b96c334ad6e6ea92157e98b9d6df (diff) |
INTEGRATION: CWS hro27 (1.23.48); FILE MERGED
2007/12/14 15:45:25 hro 1.23.48.1: #83243# Reuse already loaded psapi libryry
Diffstat (limited to 'sal/osl/w32/module.c')
-rw-r--r-- | sal/osl/w32/module.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sal/osl/w32/module.c b/sal/osl/w32/module.c index e9a2bc0a8..86e3aa9fa 100644 --- a/sal/osl/w32/module.c +++ b/sal/osl/w32/module.c @@ -4,9 +4,9 @@ * * $RCSfile: module.c,v $ * - * $Revision: 1.23 $ + * $Revision: 1.24 $ * - * last change: $Author: kz $ $Date: 2007-09-06 13:46:52 $ + * last change: $Author: vg $ $Date: 2008-01-28 15:29:22 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -400,7 +400,10 @@ typedef BOOL (WINAPI *GetModuleInformation_PROC)( static sal_Bool SAL_CALL _osl_addressGetModuleURL_NT( void *pv, rtl_uString **pustrURL ) { sal_Bool bSuccess = sal_False; /* Assume failure */ - HMODULE hModPsapi = LoadLibrary( "PSAPI.DLL" ); + static HMODULE hModPsapi = NULL; + + if ( !hModPsapi ) + hModPsapi = LoadLibrary( "PSAPI.DLL" ); if ( hModPsapi ) { @@ -442,7 +445,6 @@ static sal_Bool SAL_CALL _osl_addressGetModuleURL_NT( void *pv, rtl_uString **pu } } - FreeLibrary( hModPsapi ); } return bSuccess; |