UDK 3.2.7 C/C++ API Reference
|
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /************************************************************************* 00003 * 00004 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 00005 * 00006 * Copyright 2000, 2010 Oracle and/or its affiliates. 00007 * 00008 * OpenOffice.org - a multi-platform office productivity suite 00009 * 00010 * This file is part of OpenOffice.org. 00011 * 00012 * OpenOffice.org is free software: you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 3 00014 * only, as published by the Free Software Foundation. 00015 * 00016 * OpenOffice.org is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License version 3 for more details 00020 * (a copy is included in the LICENSE file that accompanied this code). 00021 * 00022 * You should have received a copy of the GNU Lesser General Public License 00023 * version 3 along with OpenOffice.org. If not, see 00024 * <http://www.openoffice.org/license.html> 00025 * for a copy of the LGPLv3 License. 00026 * 00027 ************************************************************************/ 00028 00029 #ifndef _OSL_MODULE_H_ 00030 #define _OSL_MODULE_H_ 00031 00032 # include <rtl/ustring.h> 00033 # include <rtl/tencinfo.h> 00034 00035 #ifdef __cplusplus 00036 extern "C" { 00037 #endif 00038 00039 #ifdef SAL_DLLPREFIX 00040 #define SAL_MODULENAME(name) SAL_DLLPREFIX name SAL_DLLEXTENSION 00041 #else 00042 #define SAL_MODULENAME(name) name SAL_DLLEXTENSION 00043 #endif 00044 00045 #if defined(SAL_W32) 00046 #define SAL_MODULENAME_WITH_VERSION(name, version) name version SAL_DLLEXTENSION 00047 00048 #elif defined(SAL_UNX) 00049 #if defined(MACOSX) 00050 #define SAL_MODULENAME_WITH_VERSION(name, version) SAL_DLLPREFIX name ".dylib." version 00051 #else 00052 #define SAL_MODULENAME_WITH_VERSION(name, version) SAL_DLLPREFIX name SAL_DLLEXTENSION "." version 00053 #endif 00054 00055 #endif 00056 00057 #define SAL_LOADMODULE_DEFAULT 0x00000 00058 #define SAL_LOADMODULE_LAZY 0x00001 00059 #define SAL_LOADMODULE_NOW 0x00002 00060 #define SAL_LOADMODULE_GLOBAL 0x00100 00061 00062 typedef void* oslModule; 00063 00068 typedef void ( SAL_CALL *oslGenericFunction )( void ); 00069 00075 SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMode); 00076 00083 SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 nRtldMode); 00084 00102 SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModuleRelative( 00103 oslGenericFunction baseModule, rtl_uString * relativePath, sal_Int32 mode); 00104 00123 SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModuleRelativeAscii( 00124 oslGenericFunction baseModule, char const * relativePath, sal_Int32 mode); 00125 /* This function is guaranteed not to call into 00126 FullTextEncodingDataSingleton in sal/textenc/textenc.cxx, so can be used 00127 in its implementation without running into circles. */ 00128 00149 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult); 00150 00153 SAL_DLLPUBLIC void SAL_CALL osl_unloadModule(oslModule Module); 00154 00158 SAL_DLLPUBLIC void* SAL_CALL osl_getSymbol( oslModule Module, rtl_uString *strSymbolName); 00159 00182 SAL_DLLPUBLIC oslGenericFunction SAL_CALL osl_getFunctionSymbol( 00183 oslModule Module, rtl_uString *ustrFunctionSymbolName ); 00184 00207 SAL_DLLPUBLIC oslGenericFunction SAL_CALL osl_getAsciiFunctionSymbol( 00208 oslModule Module, const sal_Char *pSymbol ); 00209 00210 00216 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getModuleURLFromAddress( 00217 void *pv, rtl_uString **pustrURL ); 00218 00240 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getModuleURLFromFunctionAddress( 00241 oslGenericFunction pf, rtl_uString **pustrFunctionURL ); 00242 00243 #ifdef __cplusplus 00244 } 00245 #endif 00246 00247 #endif /* _OSL_MODULE_H_ */ 00248 00249 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */