summaryrefslogtreecommitdiff
path: root/salhelper/test/Symbols/loader.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'salhelper/test/Symbols/loader.cxx')
-rw-r--r--salhelper/test/Symbols/loader.cxx37
1 files changed, 37 insertions, 0 deletions
diff --git a/salhelper/test/Symbols/loader.cxx b/salhelper/test/Symbols/loader.cxx
new file mode 100644
index 000000000000..82adeecaea9e
--- /dev/null
+++ b/salhelper/test/Symbols/loader.cxx
@@ -0,0 +1,37 @@
+
+#include <salhelper/dynload.hxx>
+#include <rtl/ustring>
+#include <stdio.h>
+#include "samplelib.hxx"
+
+
+using namespace salhelper;
+using namespace rtl;
+
+
+class SampleLibLoader
+ : public ::salhelper::ODynamicLoader<SampleLib_Api>
+{
+public:
+ SampleLibLoader():
+ ::salhelper::ODynamicLoader<SampleLib_Api>
+ (::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SAL_MODULENAME( "samplelib") ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(SAMPLELIB_INIT_FUNCTION_NAME) ))
+ {}
+
+};
+
+
+int main( int argc, char *argv[ ], char *envp[ ] )
+{
+ SampleLibLoader Loader;
+ SampleLibLoader Loader2;
+ Loader= Loader2;
+ SampleLib_Api *pApi= Loader.getApi();
+
+ sal_Int32 retint= pApi->funcA( 10);
+ double retdouble= pApi->funcB( 3.14);
+
+
+ return 0;
+}