/* Startup TSRM (call once for the entire process) */
-int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
+TSRM_FUNC int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
{
tsrm_tls_table_size = expected_threads;
tsrm_tls_table = (tsrm_tls_entry **) calloc(tsrm_tls_table_size, sizeof(tsrm_tls_entry *));
/* Shutdown TSRM (call once for the entire process) */
-void tsrm_shutdown()
+TSRM_FUNC void tsrm_shutdown()
{
int i;
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_DEBUG"
# ADD RSC /l 0x40d /d "_DEBUG"
BSC32=bscmake.exe
# PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
typedef int ts_rsrc_id;
+#if WIN32||WINNT
+# ifdef TSRM_EXPORTS
+# define TSRM_API __declspec(dllexport)
+# else
+# define TSRM_API __declspec(dllimport)
+# endif
+#else
+# define TSRM_API
+#endif
+
/* Define TSRM_FUNC */
#ifdef __cplusplus
-#define TSRM_FUNC extern "C"
+#define TSRM_FUNC extern "C" TSRM_API
#else
-#define TSRM_FUNC
+#define TSRM_FUNC TSRM_API
#endif