25#include <osl/module.h>
26#include <osl/module.hxx>
27#include <rtl/malformeduriexception.hxx>
29#include <rtl/ustring.hxx>
36#ifndef DISABLE_DYNLOADING
38bool loadModule(osl::Module& rModule, OUString
const & name) {
39 static OUString
base = [] {
41 if (!osl::Module::getUrlFromAddress(
42 reinterpret_cast<oslGenericFunction
>(&
loadModule), url))
44 SAL_WARN(
"cppu",
"osl::Module::getUrlFromAddress failed");
47 assert(!url.isEmpty());
51 SAL_INFO(
"cppu",
"osl::Module::getUrlFromAddress had failed");
55#if defined SAL_DLLPREFIX
61 b = rtl::Uri::convertRelToAbs(
base, b);
62 }
catch (rtl::MalformedUriException & e) {
63 SAL_INFO(
"cppu",
"rtl::MalformedUriException <" << e.getMessage() <<
">");
68 SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY);
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
bool loadModule(osl::Module &rModule, OUString const &name)
Load a module.