summaryrefslogtreecommitdiff
path: root/examples/DLL/test_dll.cpp
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-10 19:59:37 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-10 19:59:37 +0000
commit3df4acfa816441fc28a95dee6d0191a927145d95 (patch)
treeb5ae7ca44662cfd8e5c95f1826e4406021a606f5 /examples/DLL/test_dll.cpp
parent60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff)
downloadATCD-pre-subset.tar.gz
This commit was manufactured by cvs2svn to create tag 'pre-subset'.pre-subset
Diffstat (limited to 'examples/DLL/test_dll.cpp')
-rw-r--r--examples/DLL/test_dll.cpp79
1 files changed, 0 insertions, 79 deletions
diff --git a/examples/DLL/test_dll.cpp b/examples/DLL/test_dll.cpp
deleted file mode 100644
index a0073158a2e..00000000000
--- a/examples/DLL/test_dll.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-
-// This program tests out how the various objects can be loaded
-// dynamically and method calls made on them.
-
-#include "Magazine.h"
-#include "ace/DLL.h"
-#include "ace/Auto_Ptr.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID(DLL, test_dll, "$Id$")
-
-typedef Magazine* (*Magazine_Creator) (void);
-
-int
-main (int argc, char *argv[])
-{
- ACE_UNUSED_ARG (argc);
- ACE_UNUSED_ARG (argv);
-
- ACE_DLL dll;
-
- int retval = dll.open ("./" ACE_DLL_PREFIX "Today");
-
- if (retval != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p",
- "dll.open"),
- -1);
- Magazine_Creator mc;
-
- mc = (Magazine_Creator) dll.symbol ("create_magazine");
-
- if (mc == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p",
- "dll.symbol"),
- -1);
- {
- auto_ptr <Magazine> magazine (mc ());
-
- magazine->title ();
- }
-
- dll.close ();
-
- // The other library is now loaded on demand.
-
- retval = dll.open ("./" ACE_DLL_PREFIX "Newsweek");
-
- if (retval != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p",
- "dll.open"),
- -1);
-
- mc = (Magazine_Creator) dll.symbol ("create_magazine");
-
- if (mc == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p",
- "dll.symbol"),
- -1);
- {
- auto_ptr <Magazine> magazine (mc ());
-
- magazine->title ();
- }
-
- dll.close ();
-
- return 0;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class auto_ptr <Magazine>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate auto_ptr <Magazine>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */