diff options
author | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-11-26 02:23:48 +0000 |
---|---|---|
committer | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-11-26 02:23:48 +0000 |
commit | 2411f9f96f9eccf5d7ccb556e54afac623f9a23d (patch) | |
tree | 9b46abc00d26a6d9cd0e326264b840165c5c1ce7 /tests/DLL_Test.cpp | |
parent | 172003688025b5b4496e64ea9ef121edfa82f8f8 (diff) | |
download | ATCD-2411f9f96f9eccf5d7ccb556e54afac623f9a23d.tar.gz |
*** empty log message ***
Diffstat (limited to 'tests/DLL_Test.cpp')
-rw-r--r-- | tests/DLL_Test.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/DLL_Test.cpp b/tests/DLL_Test.cpp index e7908ded476..68a2be7dd33 100644 --- a/tests/DLL_Test.cpp +++ b/tests/DLL_Test.cpp @@ -6,7 +6,7 @@ // tests // // = FILENAME -// DLL_Test.cpp + // DLL_Test.cpp // // = DESCRIPTION // This test illustrates the use of <ACE_DLL> wrapper class. @@ -20,6 +20,10 @@ #include "ace/DLL.h" #include "ace/Auto_Ptr.h" +# if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +# endif /* ACE_LACKS_PRAGMA_ONCE */ + // Considering UNIX OS to be default. # if defined (ACE_HAS_WIN32) # define ACE_OBJ_SUFFIX ".obj" @@ -71,7 +75,7 @@ Hello *get_hello (void) return hello; } -typedef Hello *(*TC)(void); +typedef Hello *(*TC) (void); int main (void) @@ -80,18 +84,15 @@ main (void) ACE_DLL ace_dll_obj; - // @@ Kirthika, the following code is incorrect since you're + // *done*@@ Kirthika, the following code is incorrect since you're // trying to do a strcat() on a string literal... Make // sure you ALWAYS run Purify on your code to find errors // list this. - if (0 != ace_dll_obj.open (ACE_OS::strcat (".obj/DLL_Test", - ACE_OBJ_SUFFIX))) + int retval = ace_dll_obj.open ("./DLL_Test"ACE_OBJ_SUFFIX); + if (retval != 0) ACE_ERROR_RETURN ((LM_ERROR, - // @@ Kirthika, ALWAYS leave a - // space before the '('... Make sure to - // fix this elsewhere, as well. ace_dll_obj.error()), - -1); + -1); TC f = (TC) ace_dll_obj.symbol ("get_hello"); @@ -114,7 +115,6 @@ main (void) } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - template class auto_ptr <Hello>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate auto_ptr <Hello> |