Hi,
as using <dlfcn.h> functions directly (without generating warnings) has
become quite ugly (double casts) and even the Windows API for searching
function symbols does not take UTF-16 arguments, I propose the following
API additions to osl/module.h:
/** Retrieve the handle of an already loaded module.
This function can be used to search for a function symbol in the
process space.
Do not use the returned handle as an argument of osl_unloadModule.
On Unix platforms,
strModuleName gets ignored and the special handle RTLD_DEFAULT is
always returned.
@param strModuleName
[in] denotes the name of the module to search for. Ignored on Unix
@return
NULL if the module could not be found, otherwise a handle to the
module or the special
RTLD_DEFAULT on Unix. NOTE: do not call osl_unloadModule on the
returned handle !
@see osl_getAsciiFunctionSymbol
*/
oslModule SAL_CALL osl_getModuleHandle(rtl_uString *strModuleName);
/** Lookup the specified function symbol name.
osl_getAsciiFunctionSymbol is an alternative function for
osl_getFunctionSymbol.
It expects the C-style function name string to contain ascii
characters only.
@param Module
[in] a module handle as returned by osl_loadModule or
osl_getModuleHandle
@param pFunctionSymbolName
[in] Name of the function that will be looked up.
@return
<dl>
<dt>Function address.</dt>
<dd>on success</dd>
<dt>NULL</dt>
<dd>lookup failed or the parameter are invalid.</dd>
</dl>
@see osl_getModuleHandle
@see osl_getFunctionSymbol
*/
oslGenericFunction SAL_CALL osl_getAsciiFunctionSymbol( oslModule
Module, const sal_Char *pFunctionSymbolName );
Feedback/Nitpicking welcome !
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]