summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cppuhelper/source/shlib.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index a97945431..8acfb334b 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -354,6 +354,7 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
OUString const & rPrefix )
SAL_THROW( (loader::CannotActivateFactoryException) )
{
+#ifndef IOS
OUString aModulePath( makeComponentPath( rLibName, rPath ) );
if (! checkAccessPath( &aModulePath ))
{
@@ -371,6 +372,16 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
OUSTR("loading component library failed: ") + aModulePath,
Reference< XInterface >() );
}
+#else
+ oslModule lib;
+ OUString aModulePath(OUSTR("MAIN"));
+ if (! osl_getModuleHandle( NULL, &lib))
+ {
+ throw loader::CannotActivateFactoryException(
+ OUSTR("osl_getModuleHandle of the executable: "),
+ Reference< XInterface >() );
+ }
+#endif
Reference< XInterface > xRet;