summaryrefslogtreecommitdiff
path: root/salhelper
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2001-04-19 14:12:00 +0000
committerJoachim Lingner <jl@openoffice.org>2001-04-19 14:12:00 +0000
commit69995796449e513800199ec319d82a46e8eee44b (patch)
tree1f13a19fe2e21094f4289119feb18b821f890b43 /salhelper
parent8e773af5ecfba8e3fd105c0e6daa6eb52765628b (diff)
new
Diffstat (limited to 'salhelper')
-rw-r--r--salhelper/test/Symbols/loader.cxx57
-rw-r--r--salhelper/test/Symbols/makefile.mk57
2 files changed, 64 insertions, 50 deletions
diff --git a/salhelper/test/Symbols/loader.cxx b/salhelper/test/Symbols/loader.cxx
index 935528db52ad..82adeecaea9e 100644
--- a/salhelper/test/Symbols/loader.cxx
+++ b/salhelper/test/Symbols/loader.cxx
@@ -1,58 +1,37 @@
-
-/*
-This small test program tests whether all necessary symbols are exported from
-isalhelper.lib. If this linker runs without errors than it is ok.
-
-(public)
-static class salhelper::ORealDynamicLoader * __cdecl salhelper::ORealDynamicLoader::newInstance(class salhelper::ORealDynamicLoader * *,class rtl::OUString const &,class rtl::OUString const &)
-
-unsigned long __cdecl salhelper::ORealDynamicLoader::acquire(void)
-
-unsigned long __cdecl salhelper::ORealDynamicLoader::release(void)
-
-void * __cdecl salhelper::ORealDynamicLoader::getApi(void)const
-
-(protected)
-salhelper::ORealDynamicLoader::ORealDynamicLoader( ORealDynamicLoader ** ppSetToZeroInDestructor,
- const ::rtl::OUString& strModuleName,
- const ::rtl::OUString& strInitFunction,
- void* pApi,
- oslModule pModule );
-
-
-virtual salhelper::ORealDynamicLoader::~ORealDynamicLoader();
-
-*/
-
#include <salhelper/dynload.hxx>
#include <rtl/ustring>
+#include <stdio.h>
+#include "samplelib.hxx"
+
using namespace salhelper;
using namespace rtl;
-class Loader:public ORealDynamicLoader
+
+class SampleLibLoader
+ : public ::salhelper::ODynamicLoader<SampleLib_Api>
{
public:
- Loader(){}
+ SampleLibLoader():
+ ::salhelper::ODynamicLoader<SampleLib_Api>
+ (::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SAL_MODULENAME( "samplelib") ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(SAMPLELIB_INIT_FUNCTION_NAME) ))
+ {}
- void deletethis()
- {
- delete this;
- }
};
+
int main( int argc, char *argv[ ], char *envp[ ] )
{
- ORealDynamicLoader* pLoader= ORealDynamicLoader::newInstance( NULL, OUString(), OUString());
-
- pLoader->acquire();
+ SampleLibLoader Loader;
+ SampleLibLoader Loader2;
+ Loader= Loader2;
+ SampleLib_Api *pApi= Loader.getApi();
- pLoader->getApi();
- pLoader->release();
+ sal_Int32 retint= pApi->funcA( 10);
+ double retdouble= pApi->funcB( 3.14);
- Loader* pLoader2= new Loader();
- pLoader2->deletethis();
return 0;
}
diff --git a/salhelper/test/Symbols/makefile.mk b/salhelper/test/Symbols/makefile.mk
index 45fc345650f6..6903a39d1a20 100644
--- a/salhelper/test/Symbols/makefile.mk
+++ b/salhelper/test/Symbols/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.1 $
+# $Revision: 1.2 $
#
-# last change: $Author: jl $ $Date: 2001-03-29 14:36:29 $
+# last change: $Author: jl $ $Date: 2001-04-19 15:12:00 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -62,25 +62,22 @@
PRJ=..$/..$/
-PRJNAME=dtrans
-TARGET=dndTest
+PRJNAME=salhelper
+TARGET=dynloader
+TARGET1=samplelib
TARGETTYPE=CUI
LIBTARGET=NO
-#USE_DEFFILE= TRUE
NO_BSYMBOLIC= TRUE
ENABLE_EXCEPTIONS=TRUE
BOOTSTRAP_SERVICE=FALSE
# --- Settings ---
-.INCLUDE : svpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sv.mk
# --- Files ---
-# CFLAGS+=/GR -DUNICODE -D_UNICODE
UNOUCRDEP= $(SOLARBINDIR)$/applicat.rdb
UNOUCRRDB= $(SOLARBINDIR)$/applicat.rdb
@@ -92,13 +89,44 @@ CPPUMAKERFLAGS += -C
UNOUCROUT= $(OUT)$/inc
.ENDIF
+#RTTI on
+.IF "$(OS)" == "WNT"
+CFLAGS+= -GR
+.ENDIF
+
+
# UNOTYPES= com.sun.star.lang.XInitialization \
-
+#---------------------------------------------------------------------------
+# Build the test library which is loaded by the
+# RealDynamicLoader
+
+SLOFILES= \
+ $(SLO)$/samplelib.obj
+
+LIB1TARGET=$(SLB)$/$(TARGET1).lib
+LIB1OBJFILES= \
+ $(SLO)$/samplelib.obj
+
+SHL1TARGET= $(TARGET1)
-.IF "$(depend)" != ""
+SHL1STDLIBS= \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(SALLIB)
-.ENDIF # depend
+SHL1DEPN=
+SHL1IMPLIB= i$(TARGET1)
+SHL1LIBS= $(SLB)$/$(TARGET1).lib
+SHL1DEF= $(MISC)$/$(SHL1TARGET).def
+
+DEF1NAME= $(SHL1TARGET)
+DEFLIB1NAME =$(TARGET1)
+DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt
+
+#DEF1EXPORTFILE= exports.dxp
+
+# ------------------------------------------------------------------------------
APP1NOSAL=TRUE
@@ -128,3 +156,10 @@ APP1DEF= $(MISC)\$(APP1TARGET).def
.INCLUDE : target.mk
+
+$(MISC)$/$(SHL1TARGET).flt: makefile.mk
+ @echo ------------------------------
+ @echo Making: $@
+ @echo __CT>>$@
+
+