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