diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-19 16:02:07 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-19 16:02:07 +0000 |
commit | 983a105270b4fbbcecffe5a0a9541d346bd7351c (patch) | |
tree | 4b825f0f2c9c3ecd542ec6ef50327fd7eacfc8a3 /examples/DLL | |
parent | 50e060d55874b7b188543c57d83636394d027bac (diff) | |
download | ATCD-983a105270b4fbbcecffe5a0a9541d346bd7351c.tar.gz |
Wed May 19 10:52:15 1999 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'examples/DLL')
-rw-r--r-- | examples/DLL/test_dll.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/examples/DLL/test_dll.cpp b/examples/DLL/test_dll.cpp index cbae44b4e0a..45df35c4f87 100644 --- a/examples/DLL/test_dll.cpp +++ b/examples/DLL/test_dll.cpp @@ -10,8 +10,8 @@ ACE_RCSID(DLL, test_dll, "$Id$") typedef Magazine* (*Magazine_Creator) (void); - -int + +int main (int argc, char *argv[]) { ACE_UNUSED_ARG (argc); @@ -36,13 +36,13 @@ main (int argc, char *argv[]) dll.error ()), -1); { - auto_ptr <Magazine> magazine = mc (); - + auto_ptr <Magazine> magazine (mc ()); + magazine->title (); } dll.close (); - + // The other library is now loaded on demand. retval = dll.open ("./" ACE_DLL_PREFIX "Newsweek" ACE_DLL_SUFFIX); @@ -52,7 +52,7 @@ main (int argc, char *argv[]) "%s", dll.error ()), -1); - + mc = (Magazine_Creator) dll.symbol ("create_magazine"); if (mc == 0) @@ -61,14 +61,14 @@ main (int argc, char *argv[]) dll.error ()), -1); { - auto_ptr <Magazine> magazine = mc (); + auto_ptr <Magazine> magazine (mc ()); magazine->title (); } dll.close (); - - return 0; + + return 0; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) @@ -76,5 +76,3 @@ template class auto_ptr <Magazine>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate auto_ptr <Magazine> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - - |