diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-12 23:22:53 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-12 23:22:53 +0000 |
commit | a93b93a7ea67bfdcbdf2ff5f6714792c4fad06fe (patch) | |
tree | 51b15ae15e5960a46e578ad78757eeada71ae59e /tests/DLL_Test.cpp | |
parent | 841c8bdb38fccd0f2871e25f3eba292677d60015 (diff) | |
download | ATCD-a93b93a7ea67bfdcbdf2ff5f6714792c4fad06fe.tar.gz |
*** empty log message ***
Diffstat (limited to 'tests/DLL_Test.cpp')
-rw-r--r-- | tests/DLL_Test.cpp | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/tests/DLL_Test.cpp b/tests/DLL_Test.cpp index d47ebc90915..96b01cd6b08 100644 --- a/tests/DLL_Test.cpp +++ b/tests/DLL_Test.cpp @@ -18,7 +18,7 @@ #define ACE_BUILD_SVC_DLL -#include "test_config.h" /* Include first to enable ACE_ASSERT. */ +#include "test_config.h" #include "ace/DLL.h" #include "ace/Auto_Ptr.h" @@ -33,14 +33,15 @@ USELIB("..\ace\aced.lib"); //--------------------------------------------------------------------------- #endif /* defined(__BORLANDC__) && __BORLANDC__ >= 0x0530 */ -// Considering UNIX OS to be default. On Win32 platforms, the symbols are got form the .exe -// as one cant have .exe and .dll for the same .cpp. Also, on Win32 platforms one cant use the -// .obj to obtain symbols dynamically at runtime. +// Considering UNIX OS to be default. On Win32 platforms, the symbols +// are got form the .exe as one cant have .exe and .dll for the same +// .cpp. Also, on Win32 platforms one cant use the .obj to obtain +// symbols dynamically at runtime. #if defined (ACE_WIN32) -# define ACE_OBJ_SUFFIX ".exe" +# define OBJ_SUFFIX ".exe" #else -# define ACE_OBJ_SUFFIX ".o" +# define OBJ_SUFFIX ".o" #endif /*ACE_WIN32*/ class Hello @@ -54,12 +55,6 @@ class Hello // symbols from the library. public: - Hello (void) - { } - - ~Hello (void) - { } - void say_hello (void) { ACE_DEBUG ((LM_DEBUG, @@ -98,22 +93,22 @@ main (int argc, char *argv[]) ACE_START_TEST ("DLL_Test"); - ACE_DLL ace_dll_obj; + ACE_DLL dll; - int retval = ace_dll_obj.open ("./DLL_Test"ACE_OBJ_SUFFIX); + int retval = dll.open ("DLL_Test" OBJ_SUFFIX); if (retval != 0) ACE_ERROR_RETURN ((LM_ERROR, - ace_dll_obj.error()), + dll.error ()), -1); - TC f = (TC) ace_dll_obj.symbol ("get_hello"); + TC f = (TC) dll.symbol ("get_hello"); if (f == 0) ACE_ERROR_RETURN ((LM_ERROR, - ace_dll_obj.error()), + dll.error ()), -1); - auto_ptr <Hello> my_hello (f ()); + auto_ptr<Hello> my_hello (f ()); // Make the method calls, as the object pointer is available. my_hello->say_hello (); |