summaryrefslogtreecommitdiff
path: root/examples/DLL/Newsweek.cpp
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-30 02:06:57 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-30 02:06:57 +0000
commit72dba72cb51730f0f6e76ee876181adb3781e02d (patch)
tree0e1055502cc2137c0ea8d25c6fe3631db2d7cb1a /examples/DLL/Newsweek.cpp
parentd833c6d9baa65caba564ae60bbb723a255ed0d97 (diff)
downloadATCD-72dba72cb51730f0f6e76ee876181adb3781e02d.tar.gz
*** empty log message ***
Diffstat (limited to 'examples/DLL/Newsweek.cpp')
-rw-r--r--examples/DLL/Newsweek.cpp28
1 files changed, 7 insertions, 21 deletions
diff --git a/examples/DLL/Newsweek.cpp b/examples/DLL/Newsweek.cpp
index f48d7700ea7..0a6c63dc1ff 100644
--- a/examples/DLL/Newsweek.cpp
+++ b/examples/DLL/Newsweek.cpp
@@ -1,25 +1,8 @@
// $Id$
-#include "Newsweek.h"
-
-// @@ Kirthika, please see the comments in the Today.cpp file to see
-// my recommendations for simplifying this stuff.
-
-// This declaration necessary to get thi sworking on NT.
-#if defined (ACE_HAS_WIN32)
-
-#ifdef __cplusplus
-extern "C" { // only need to export C interface if
- // used by C++ source code
-#endif
+#define ACE_BUILD_SVC_DLL
- __declspec( dllexport ) Magazine *create_magazine (void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+#include "Newsweek.h"
// Implementation of the abstract class method which describes
// the magazine.
@@ -31,9 +14,12 @@ void Newsweek::title (void)
}
// Returns the Newsweek class pointer.
+// The ACE_BUILD_SVC_DLL and ACE_Svc_Export directives are necessary as take care
+// of exporting the function for Win32 platforms.
+extern "C" ACE_Svc_Export Magazine *create_magazine (void);
-extern "C"
-Magazine *create_magazine (void)
+Magazine *
+create_magazine (void)
{
Magazine *mag;
ACE_NEW_RETURN (mag,