1 
2 #include  <salhelper/dynload.hxx>
3 #include <rtl/ustring>
4 #include <stdio.h>
5 #include "samplelib.hxx"
6 
7 
8 using namespace salhelper;
9 using namespace rtl;
10 
11 
12 class SampleLibLoader
13 	: public ::salhelper::ODynamicLoader<SampleLib_Api>
14 {
15 public:
16 	SampleLibLoader():
17 		::salhelper::ODynamicLoader<SampleLib_Api>
18 			(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SAL_MODULENAME( "samplelib") ) ),
19 			 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(SAMPLELIB_INIT_FUNCTION_NAME) ))
20 		{}
21 
22 };
23 
24 
25 int main( int argc, char *argv[ ], char *envp[ ] )
26 {
27 	SampleLibLoader Loader;
28 	SampleLibLoader Loader2;
29 	Loader= Loader2;
30 	SampleLib_Api *pApi= Loader.getApi();
31 
32 	sal_Int32 retint= pApi->funcA( 10);
33 	double retdouble= pApi->funcB( 3.14);
34 
35 
36 	return 0;
37 }
38