// Standard TeamShare scheme for handling DLL import/export declarations // as well as allowing same source file to link for DLL or LIB. #ifndef _TSAPI_H_ #define _TSAPI_H_ // *** Support for exporting symbols from this DLL or LIB *** // ********************************************************** #ifdef TS_API_AS_DLL // We're building a DLL, so we need these export/import symbols // --- BEGIN auto-generated Microsoft stuff --- // The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the TS_API_EXPORTS // symbol defined on the command line. this symbol should not be defined on any project // that uses this DLL. This way any other project whose source files include this file see // TS_API functions as being imported from a DLL, wheras this DLL sees symbols // defined with this macro as being exported. #ifdef TS_API_EXPORTS #define TS_API __declspec(dllexport) #else #define TS_API __declspec(dllimport) #endif // --- END auto-generated Microsoft stuff --- #else // TS_API_AS_DLL // We're not building a DLL, so make the import/export symbols vanish #define TS_API #endif // TS_API_AS_DLL // *** Examples showing how to use the TS_API symbol *** // ***************************************************** // Any symbol that should be exported when TSApi is built // as a DLL needs to be labeled TS_API. #if 0 // (don't actually compile these examples) class TS_API TSClass { public: TSClass(); //etc }; extern TS_API int nTSData; TS_API int TSFunction(); #endif // 0 (TS_API examples) #endif // _TSAPI_H_