INTEGRATION: CWS obr05 (1.21.124); FILE MERGED
2007/04/03 09:46:23 obr 1.21.124.1: #i76025# New OSL API: osl_getModuleHandle & osl_getAsciiFunctionSymbol Also removed usage of osl_psz_getSymbol and osl_psz_loadModule in nlsupport.c and security.c
This commit is contained in:
parent
d8b7b46b7a
commit
45b808d8c3
1 changed files with 36 additions and 3 deletions
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: module.c,v $
|
||||
*
|
||||
* $Revision: 1.21 $
|
||||
* $Revision: 1.22 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2006-06-20 04:20:56 $
|
||||
* last change: $Author: kz $ $Date: 2007-06-19 16:17:20 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -86,6 +86,23 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMod
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* osl_getModuleHandle */
|
||||
/*****************************************************************************/
|
||||
|
||||
sal_Bool SAL_CALL
|
||||
osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult)
|
||||
{
|
||||
HINSTANCE hInstance = GetModuleHandleW(pModuleName->buffer);
|
||||
if( hInstance )
|
||||
{
|
||||
*pResult = (oslModule) hInstance;
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* osl_unloadModule */
|
||||
/*****************************************************************************/
|
||||
|
@ -128,12 +145,28 @@ oslGenericFunction SAL_CALL osl_getFunctionSymbol( oslModule Module, rtl_uString
|
|||
OUSTRING_TO_OSTRING_CVTFLAGS
|
||||
);
|
||||
|
||||
address=(oslGenericFunction)GetProcAddress((HINSTANCE)Module, rtl_string_getStr(symbolName));
|
||||
address=osl_getAsciiFunctionSymbol(Module, rtl_string_getStr(symbolName));
|
||||
rtl_string_release(symbolName);
|
||||
|
||||
return address;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* osl_getAsciiFunctionSymbol */
|
||||
/*****************************************************************************/
|
||||
oslGenericFunction SAL_CALL
|
||||
osl_getAsciiFunctionSymbol( oslModule Module, const sal_Char *pSymbol )
|
||||
{
|
||||
oslGenericFunction fncAddr = NULL;
|
||||
|
||||
if( pSymbol )
|
||||
fncAddr=(oslGenericFunction)GetProcAddress((HINSTANCE) Module, pSymbol);
|
||||
|
||||
return fncAddr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* osl_addressGetModuleURL */
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in a new issue