AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
module.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 
4 #ifndef INCLUDED_OSL_MODULE_H
5 #define INCLUDED_OSL_MODULE_H
6 
7 #include "sal/config.h"
8 
9 #include "rtl/ustring.h"
10 #include "sal/saldllapi.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #ifdef SAL_DLLPREFIX
17 #define SAL_MODULENAME(name) SAL_DLLPREFIX name SAL_DLLEXTENSION
18 #else
19 #define SAL_MODULENAME(name) name SAL_DLLEXTENSION
20 #endif
21 
22 #if defined(_WIN32)
23 #define SAL_MODULENAME_WITH_VERSION(name, version) name version SAL_DLLEXTENSION
24 
25 #elif defined(SAL_UNX)
26 #if defined(MACOSX)
27 #define SAL_MODULENAME_WITH_VERSION(name, version) SAL_DLLPREFIX name ".dylib." version
28 #else
29 #define SAL_MODULENAME_WITH_VERSION(name, version) SAL_DLLPREFIX name SAL_DLLEXTENSION "." version
30 #endif
31 
32 #endif
33 
34 #define SAL_LOADMODULE_DEFAULT 0x00000
35 #define SAL_LOADMODULE_LAZY 0x00001
36 #define SAL_LOADMODULE_NOW 0x00002
37 #define SAL_LOADMODULE_GLOBAL 0x00100
38 
39 typedef void* oslModule;
40 
46 typedef void ( SAL_CALL *oslGenericFunction )( void );
47 
48 #ifndef DISABLE_DYNLOADING
49 
57 SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMode);
58 
68 SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModuleAscii(const char *pModuleName, sal_Int32 nRtldMode);
69 
81 SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModuleRelative(
82  oslGenericFunction baseModule, rtl_uString * relativePath, sal_Int32 mode);
83 
97  oslGenericFunction baseModule, char const * relativePath, sal_Int32 mode);
98  /* This function is guaranteed not to call into
99  FullTextEncodingDataSingleton in sal/textenc/textenc.cxx, so can be used
100  in its implementation without running into circles. */
101 
102 #endif
103 
121 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult);
122 
123 #ifndef DISABLE_DYNLOADING
124 
127 SAL_DLLPUBLIC void SAL_CALL osl_unloadModule(oslModule Module);
128 
129 #endif
130 
140 SAL_DLLPUBLIC void* SAL_CALL osl_getSymbol( oslModule Module, rtl_uString *strSymbolName);
141 
157  oslModule Module, rtl_uString *ustrFunctionSymbolName );
158 
177  oslModule Module, const char *pSymbol );
178 
186  void *pv, rtl_uString **pustrURL );
187 
202  oslGenericFunction pf, rtl_uString **pustrFunctionURL );
203 
204 #ifdef __cplusplus
205 }
206 #endif
207 
208 #endif // INCLUDED_OSL_MODULE_H
209 
210 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC oslModule osl_loadModuleRelativeAscii(oslGenericFunction baseModule, char const *relativePath, sal_Int32 mode)
Load a module located relative to some other module.
unsigned char sal_Bool
Definition: types.h:18
SAL_DLLPUBLIC oslModule osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMode)
Load a shared library or module.
void(* oslGenericFunction)(void)
Generic Function pointer type that will be used as symbol address.
Definition: module.h:46
SAL_DLLPUBLIC oslModule osl_loadModuleAscii(const char *pModuleName, sal_Int32 nRtldMode)
Load a shared library or module.
SAL_DLLPUBLIC oslGenericFunction osl_getFunctionSymbol(oslModule Module, rtl_uString *ustrFunctionSymbolName)
Lookup the specified function symbol name.
SAL_DLLPUBLIC sal_Bool osl_getModuleURLFromAddress(void *pv, rtl_uString **pustrURL)
Lookup URL of module which is mapped at the specified address.
SAL_DLLPUBLIC oslModule osl_loadModuleRelative(oslGenericFunction baseModule, rtl_uString *relativePath, sal_Int32 mode)
Load a module located relative to some other module.
void * oslModule
Definition: module.h:39
SAL_DLLPUBLIC oslGenericFunction osl_getAsciiFunctionSymbol(oslModule Module, const char *pSymbol)
Lookup the specified function symbol name.
SAL_DLLPUBLIC void * osl_getSymbol(oslModule Module, rtl_uString *strSymbolName)
lookup the specified symbol name.
SAL_DLLPUBLIC void osl_unloadModule(oslModule Module)
Release the module.
SAL_DLLPUBLIC sal_Bool osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult)
Retrieve the handle of an already loaded module.
SAL_DLLPUBLIC sal_Bool osl_getModuleURLFromFunctionAddress(oslGenericFunction pf, rtl_uString **pustrFunctionURL)
Lookup URL of module which is mapped at the specified function address.
#define SAL_DLLPUBLIC
Definition: saldllapi.h:14