From 27e061b4444223d81b0b7ce8589420e8fa4cab04 Mon Sep 17 00:00:00 2001 From: Ketut Kumajaya Date: Wed, 27 Mar 2024 00:15:06 +0700 Subject: [PATCH] Restore OPCDACLIENT_API for dll export/import Including to CTransaction class and disable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS --- OPCClientToolKit/CMakeLists.txt | 2 +- OPCClientToolKit/OPCGroup.h | 2 +- OPCClientToolKit/OPCHost.h | 6 +++--- OPCClientToolKit/OPCItem.h | 2 +- OPCClientToolKit/OPCItemData.h | 4 ++-- OPCClientToolKit/OPCProperties.h | 2 +- OPCClientToolKit/OPCServer.h | 2 +- OPCClientToolKit/Transaction.h | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/OPCClientToolKit/CMakeLists.txt b/OPCClientToolKit/CMakeLists.txt index 44b3039..74d0694 100644 --- a/OPCClientToolKit/CMakeLists.txt +++ b/OPCClientToolKit/CMakeLists.txt @@ -1,6 +1,6 @@ project(OPCClientToolKit) -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS OFF) set(SOURCE_H OpcEnum.h opccomn.h opcda.h OPCClient.h OPCHost.h OPCItemData.h OPCServer.h diff --git a/OPCClientToolKit/OPCGroup.h b/OPCClientToolKit/OPCGroup.h index 76a81b5..499e5ac 100644 --- a/OPCClientToolKit/OPCGroup.h +++ b/OPCClientToolKit/OPCGroup.h @@ -43,7 +43,7 @@ class CAsyncDataCallback; /** * Client sided abstraction of an OPC group, wrapping the COM interfaces to the group within the OPC server. */ -class COPCGroup +class OPCDACLIENT_API COPCGroup { private: ATL::CComPtr iStateManagement; diff --git a/OPCClientToolKit/OPCHost.h b/OPCClientToolKit/OPCHost.h index a46acf9..f58f89d 100644 --- a/OPCClientToolKit/OPCHost.h +++ b/OPCClientToolKit/OPCHost.h @@ -37,7 +37,7 @@ namespace opcda_client * Abstract class that represents a PC which may host one or more OPC servers. Provides means of getting a list * of OPC servers on the host and creating connections to OPC servers. */ -class COPCHost +class OPCDACLIENT_API COPCHost { /** * TCHAR: WCHAR if UNICODE is defined, a CHAR otherwise. @@ -137,7 +137,7 @@ class COPCHost /** * Used for accessing OPC servers on a remote host. Make use of OpcEnum to browse servers. */ -class CRemoteHost : public COPCHost +class OPCDACLIENT_API CRemoteHost : public COPCHost { private: /** @@ -177,7 +177,7 @@ class CRemoteHost : public COPCHost * Used for accessing OPC servers on a local (this) host. Uses the Component Categories manger to enumerate * the OPC servers on the local machine. */ -class CLocalHost : public COPCHost +class OPCDACLIENT_API CLocalHost : public COPCHost { public: CLocalHost(); diff --git a/OPCClientToolKit/OPCItem.h b/OPCClientToolKit/OPCItem.h index fa05f99..3397154 100644 --- a/OPCClientToolKit/OPCItem.h +++ b/OPCClientToolKit/OPCItem.h @@ -37,7 +37,7 @@ class COPCGroup; * Provides wrapper for operations that typically exist at the group level (e.g. reads) (it is at this level * that OPC supports the operation) however, we provide the operation at this level for ease of use. */ -class COPCItem +class OPCDACLIENT_API COPCItem { private: OPCHANDLE ServersItemHandle; diff --git a/OPCClientToolKit/OPCItemData.h b/OPCClientToolKit/OPCItemData.h index a5ab8a1..fcd3da3 100644 --- a/OPCClientToolKit/OPCItemData.h +++ b/OPCClientToolKit/OPCItemData.h @@ -32,7 +32,7 @@ class COPCItem; /** *Wrapper for OPC data. Hides COM memory management. */ -struct OPCItemData +struct OPCDACLIENT_API OPCItemData { FILETIME ftTimeStamp; WORD wQuality; @@ -71,7 +71,7 @@ struct OPCItemData /** * Can't find an ATL autoptr map - this class provides the functionality I want. */ -class COPCItemDataMap : public CAtlMap +class OPCDACLIENT_API COPCItemDataMap : public CAtlMap { public: ~COPCItemDataMap(); diff --git a/OPCClientToolKit/OPCProperties.h b/OPCClientToolKit/OPCProperties.h index 61ca153..d1fb644 100644 --- a/OPCClientToolKit/OPCProperties.h +++ b/OPCClientToolKit/OPCProperties.h @@ -32,7 +32,7 @@ namespace opcda_client /** * Holds desciption of a property for an OPC item. */ -struct CPropertyDescription +struct OPCDACLIENT_API CPropertyDescription { /// properties identifier DWORD id; diff --git a/OPCClientToolKit/OPCServer.h b/OPCClientToolKit/OPCServer.h index 71efb81..4a23cd6 100644 --- a/OPCClientToolKit/OPCServer.h +++ b/OPCClientToolKit/OPCServer.h @@ -51,7 +51,7 @@ struct ServerStatus /** * Local representation of a local or remote OPC server. Wrapper for the COM interfaces to the server. */ -class COPCServer +class OPCDACLIENT_API COPCServer { private: /** diff --git a/OPCClientToolKit/Transaction.h b/OPCClientToolKit/Transaction.h index 21dde17..ffd4a32 100644 --- a/OPCClientToolKit/Transaction.h +++ b/OPCClientToolKit/Transaction.h @@ -29,7 +29,7 @@ namespace opcda_client { #endif -class CTransaction; +class OPCDACLIENT_API CTransaction; /** * Interface which provides means by which the client can be notified when an asynchronous operation