diff --git a/src/xpdev/msg_queue.c b/src/xpdev/msg_queue.c
index d2f586e605374b95e54c011d465be3d6e6949740..35b1efb4fde3b35a3b50e6fea6759924135de402 100644
--- a/src/xpdev/msg_queue.c
+++ b/src/xpdev/msg_queue.c
@@ -42,7 +42,7 @@
 #include "threadwrap.h"	/* pthread_self */
 #include "msg_queue.h"
 
-msg_queue_t* msgQueueInit(msg_queue_t* q, long flags)
+msg_queue_t* DLLCALL msgQueueInit(msg_queue_t* q, long flags)
 {
 	if(q==NULL) {
 		if((q=(msg_queue_t*)malloc(sizeof(msg_queue_t)))==NULL)
@@ -63,7 +63,7 @@ msg_queue_t* msgQueueInit(msg_queue_t* q, long flags)
 	return(q);
 }
 
-BOOL msgQueueFree(msg_queue_t* q)
+BOOL DLLCALL msgQueueFree(msg_queue_t* q)
 {
 	if(q==NULL)
 		return(FALSE);
@@ -77,7 +77,7 @@ BOOL msgQueueFree(msg_queue_t* q)
 	return(TRUE);
 }
 
-long msgQueueAttach(msg_queue_t* q)
+long DLLCALL msgQueueAttach(msg_queue_t* q)
 {
 	if(q==NULL)
 		return(-1);
@@ -87,7 +87,7 @@ long msgQueueAttach(msg_queue_t* q)
 	return(q->refs);
 }
 
-long msgQueueDetach(msg_queue_t* q)
+long DLLCALL msgQueueDetach(msg_queue_t* q)
 {
 	int refs;
 
@@ -100,7 +100,7 @@ long msgQueueDetach(msg_queue_t* q)
 	return(refs);
 }
 
-void* msgQueueSetPrivateData(msg_queue_t* q, void* p)
+void* DLLCALL msgQueueSetPrivateData(msg_queue_t* q, void* p)
 {
 	void* old;
 
@@ -112,7 +112,7 @@ void* msgQueueSetPrivateData(msg_queue_t* q, void* p)
 	return(old);
 }
 
-void* msgQueueGetPrivateData(msg_queue_t* q)
+void* DLLCALL msgQueueGetPrivateData(msg_queue_t* q)
 {
 	if(q==NULL)
 		return(NULL);
@@ -141,7 +141,7 @@ static link_list_t* msgQueueWriteList(msg_queue_t* q)
 	return(&q->in);
 }
 
-long msgQueueReadLevel(msg_queue_t* q)
+long DLLCALL msgQueueReadLevel(msg_queue_t* q)
 {
 	return listCountNodes(msgQueueReadList(q));
 }
@@ -171,7 +171,7 @@ static BOOL list_wait(link_list_t* list, long timeout)
 #endif
 }
 
-BOOL msgQueueWait(msg_queue_t* q, long timeout)
+BOOL DLLCALL msgQueueWait(msg_queue_t* q, long timeout)
 {
 	BOOL			result;
 	link_list_t*	list = msgQueueReadList(q);
@@ -185,7 +185,7 @@ BOOL msgQueueWait(msg_queue_t* q, long timeout)
 	return(result);
 }
 
-void* msgQueueRead(msg_queue_t* q, long timeout)
+void* DLLCALL msgQueueRead(msg_queue_t* q, long timeout)
 {
 	link_list_t*	list = msgQueueReadList(q);
 
@@ -194,7 +194,7 @@ void* msgQueueRead(msg_queue_t* q, long timeout)
 	return listShiftNode(list);
 }
 
-void* msgQueuePeek(msg_queue_t* q, long timeout)
+void* DLLCALL msgQueuePeek(msg_queue_t* q, long timeout)
 {
 	link_list_t*	list = msgQueueReadList(q);
 
@@ -207,7 +207,7 @@ void* msgQueuePeek(msg_queue_t* q, long timeout)
 	return listNodeData(listFirstNode(list));
 }
 
-void* msgQueueFind(msg_queue_t* q, const void* data, size_t length)
+void* DLLCALL msgQueueFind(msg_queue_t* q, const void* data, size_t length)
 {
 	link_list_t*	list = msgQueueReadList(q);
 	list_node_t*	node;
@@ -217,22 +217,22 @@ void* msgQueueFind(msg_queue_t* q, const void* data, size_t length)
 	return listRemoveNode(list,node,/* Free Data? */FALSE);
 }
 
-list_node_t* msgQueueFirstNode(msg_queue_t* q)
+list_node_t* DLLCALL msgQueueFirstNode(msg_queue_t* q)
 {
 	return listFirstNode(msgQueueReadList(q));
 }
 
-list_node_t* msgQueueLastNode(msg_queue_t* q)
+list_node_t* DLLCALL msgQueueLastNode(msg_queue_t* q)
 {
 	return listLastNode(msgQueueReadList(q));
 }
 
-long msgQueueWriteLevel(msg_queue_t* q)
+long DLLCALL msgQueueWriteLevel(msg_queue_t* q)
 {
 	return listCountNodes(msgQueueWriteList(q));
 }
 
-BOOL msgQueueWrite(msg_queue_t* q, const void* data, size_t length)
+BOOL DLLCALL msgQueueWrite(msg_queue_t* q, const void* data, size_t length)
 {
 	return listPushNodeData(msgQueueWriteList(q),data,length)!=NULL;
 }
diff --git a/src/xpdev/msg_queue.h b/src/xpdev/msg_queue.h
index 8053a76a774246284d7af64bb225ec36c014adea..aa0fa607610d4b70f909557167a4f47927a4d2d1 100644
--- a/src/xpdev/msg_queue.h
+++ b/src/xpdev/msg_queue.h
@@ -40,6 +40,7 @@
 
 #include "link_list.h"
 #include "threadwrap.h"
+#include "wrapdll.h"
 
 #if defined(__cplusplus)
 extern "C" {
@@ -58,29 +59,29 @@ typedef struct {
 #define MSG_QUEUE_MALLOC		(1<<0)	/* Queue allocated with malloc() */
 #define MSG_QUEUE_BIDIR			(1<<1)	/* Bi-directional message queue */
 
-msg_queue_t*	msgQueueInit(msg_queue_t*, long flags);
-BOOL			msgQueueFree(msg_queue_t*);
+DLLEXPORT msg_queue_t*	DLLCALL msgQueueInit(msg_queue_t*, long flags);
+DLLEXPORT BOOL			DLLCALL msgQueueFree(msg_queue_t*);
 
-long			msgQueueAttach(msg_queue_t*);
-long			msgQueueDetach(msg_queue_t*);
+DLLEXPORT long			DLLCALL msgQueueAttach(msg_queue_t*);
+DLLEXPORT long			DLLCALL msgQueueDetach(msg_queue_t*);
 
 /* Get/Set queue private data */
-void*			msgQueueSetPrivateData(msg_queue_t*, void*);
-void*			msgQueueGetPrivateData(msg_queue_t*);
+DLLEXPORT void*			DLLCALL msgQueueSetPrivateData(msg_queue_t*, void*);
+DLLEXPORT void*			DLLCALL msgQueueGetPrivateData(msg_queue_t*);
 
-BOOL			msgQueueWait(msg_queue_t* q, long timeout);
-long			msgQueueReadLevel(msg_queue_t*);
-void*			msgQueueRead(msg_queue_t*, long timeout);
-void*			msgQueuePeek(msg_queue_t*, long timeout);
-void*			msgQueueFind(msg_queue_t*, const void*, size_t length);
-list_node_t*	msgQueueFirstNode(msg_queue_t*);
-list_node_t*	msgQueueLastNode(msg_queue_t*);
+DLLEXPORT BOOL			DLLCALL msgQueueWait(msg_queue_t* q, long timeout);
+DLLEXPORT long			DLLCALL msgQueueReadLevel(msg_queue_t*);
+DLLEXPORT void*			DLLCALL msgQueueRead(msg_queue_t*, long timeout);
+DLLEXPORT void*			DLLCALL msgQueuePeek(msg_queue_t*, long timeout);
+DLLEXPORT void*			DLLCALL msgQueueFind(msg_queue_t*, const void*, size_t length);
+DLLEXPORT list_node_t*	DLLCALL msgQueueFirstNode(msg_queue_t*);
+DLLEXPORT list_node_t*	DLLCALL msgQueueLastNode(msg_queue_t*);
 #define			msgQueueNextNode(node)			listNextNode(node)
 #define			msgQueuePrevNode(node)			listPrevNode(node)
 #define			msgQueueNodeData(node)			listNodeData(node)
 
-long			msgQueueWriteLevel(msg_queue_t*);
-BOOL			msgQueueWrite(msg_queue_t*, const void*, size_t length);
+DLLEXPORT long			DLLCALL msgQueueWriteLevel(msg_queue_t*);
+DLLEXPORT BOOL			DLLCALL msgQueueWrite(msg_queue_t*, const void*, size_t length);
 
 #if defined(__cplusplus)
 }
diff --git a/src/xpdev/netwrap.c b/src/xpdev/netwrap.c
index 1e158b9bf5f2c670ea12d89db97870c8b92c92f7..ba08568c7a7d183975f94da5c4ab2485b3699b13 100644
--- a/src/xpdev/netwrap.c
+++ b/src/xpdev/netwrap.c
@@ -46,7 +46,7 @@
 	#include <iphlpapi.h>	/* GetNetworkParams */
 #endif
 
-str_list_t getNameServerList(void)
+str_list_t DLLCALL getNameServerList(void)
 {
 #ifdef __unix__	/* Look up DNS server address */
 	FILE*	fp;
@@ -97,7 +97,7 @@ str_list_t getNameServerList(void)
 #endif
 }
 
-const char* getHostNameByAddr(const char* str)
+const char* DLLCALL getHostNameByAddr(const char* str)
 {
 	HOSTENT*	h;
 	uint32_t	ip;
@@ -121,7 +121,7 @@ const char* getHostNameByAddr(const char* str)
 }
 
 /* In case we want to DLL-export getNameServerList in the future */
-void freeNameServerList(str_list_t list)
+void DLLCALL freeNameServerList(str_list_t list)
 {
 	strListFree(&list);
 }
diff --git a/src/xpdev/netwrap.h b/src/xpdev/netwrap.h
index a405ade6fc1a50c0ab79e3ae8500c4a03ffde2f0..322dc8e681f8bdb7b028afc0dbea9582bc41f915 100644
--- a/src/xpdev/netwrap.h
+++ b/src/xpdev/netwrap.h
@@ -40,6 +40,7 @@
 
 #include <stddef.h>		/* size_t */
 #include "str_list.h"	/* string list functions and types */
+#include "wrapdll.h"
 
 #define IPv4_LOCALHOST	0x7f000001U	/* 127.0.0.1 */
 
@@ -47,9 +48,9 @@
 extern "C" {
 #endif
 
-const char* getHostNameByAddr(const char*);
-str_list_t	getNameServerList(void);
-void		freeNameServerList(str_list_t);
+DLLEXPORT const char* 	DLLCALL getHostNameByAddr(const char*);
+DLLEXPORT str_list_t	DLLCALL getNameServerList(void);
+DLLEXPORT void			DLLCALL freeNameServerList(str_list_t);
 
 #if defined(__cplusplus)
 }
diff --git a/src/xpdev/xpdatetime.c b/src/xpdev/xpdatetime.c
index 2996f78497c98506448f1454601d5890204e9d50..2ebb074c1c1d127899263ac0a9e86d6b3243d597 100644
--- a/src/xpdev/xpdatetime.c
+++ b/src/xpdev/xpdatetime.c
@@ -43,7 +43,7 @@
 /* Cross-platform date/time functions */
 /**************************************/
 
-xpDateTime_t xpDateTime_create(unsigned year, unsigned month, unsigned day
+xpDateTime_t DLLCALL xpDateTime_create(unsigned year, unsigned month, unsigned day
 							  ,unsigned hour, unsigned minute, float second
 							  ,xpTimeZone_t zone)
 {
@@ -60,7 +60,7 @@ xpDateTime_t xpDateTime_create(unsigned year, unsigned month, unsigned day
 	return xpDateTime;
 }
 
-xpDateTime_t xpDateTime_now(void)
+xpDateTime_t DLLCALL xpDateTime_now(void)
 {
 #if defined(_WIN32)
 	SYSTEMTIME systime;
@@ -84,7 +84,7 @@ xpDateTime_t xpDateTime_now(void)
 #endif
 }
 
-xpTimeZone_t xpTimeZone_local(void)
+xpTimeZone_t DLLCALL xpTimeZone_local(void)
 {
 #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DARWIN__)
 	struct tm tm;
@@ -123,7 +123,7 @@ xpTimeZone_t xpTimeZone_local(void)
 #endif
 }
 
-time_t xpDateTime_to_time(xpDateTime_t xpDateTime)
+time_t DLLCALL xpDateTime_to_time(xpDateTime_t xpDateTime)
 {
 	struct tm tm;
 
@@ -143,7 +143,7 @@ time_t xpDateTime_to_time(xpDateTime_t xpDateTime)
 	return sane_mktime(&tm);
 }
 
-xpDateTime_t time_to_xpDateTime(time_t ti, xpTimeZone_t zone)
+xpDateTime_t DLLCALL time_to_xpDateTime(time_t ti, xpTimeZone_t zone)
 {
 	xpDateTime_t	never;
 	struct tm tm;
@@ -158,7 +158,7 @@ xpDateTime_t time_to_xpDateTime(time_t ti, xpTimeZone_t zone)
 		,zone==xpTimeZone_LOCAL ? xpTimeZone_local() : zone);
 }
 
-xpDateTime_t gmtime_to_xpDateTime(time_t ti)
+xpDateTime_t DLLCALL gmtime_to_xpDateTime(time_t ti)
 {
 	xpDateTime_t	never;
 	struct tm tm;
@@ -177,7 +177,7 @@ xpDateTime_t gmtime_to_xpDateTime(time_t ti)
 /* Decimal-coded ISO-8601 date/time functions */
 /**********************************************/
 
-isoDate_t xpDateTime_to_isoDateTime(xpDateTime_t xpDateTime, isoTime_t* isoTime)
+isoDate_t DLLCALL xpDateTime_to_isoDateTime(xpDateTime_t xpDateTime, isoTime_t* isoTime)
 {
 	if(isoTime!=NULL)
 		*isoTime=0;
@@ -191,13 +191,13 @@ isoDate_t xpDateTime_to_isoDateTime(xpDateTime_t xpDateTime, isoTime_t* isoTime)
 	return isoDate_create(xpDateTime.date.year,xpDateTime.date.month,xpDateTime.date.day);
 }
 
-xpDateTime_t isoDateTime_to_xpDateTime(isoDate_t date, isoTime_t ti)
+xpDateTime_t DLLCALL isoDateTime_to_xpDateTime(isoDate_t date, isoTime_t ti)
 {
 	return xpDateTime_create(isoDate_year(date),isoDate_month(date),isoDate_day(date)
 		,isoTime_hour(ti),isoTime_minute(ti),(float)isoTime_second(ti),xpTimeZone_local());
 }
 
-isoDate_t time_to_isoDateTime(time_t ti, isoTime_t* isoTime)
+isoDate_t DLLCALL time_to_isoDateTime(time_t ti, isoTime_t* isoTime)
 {
 	struct tm tm;
 
@@ -214,7 +214,7 @@ isoDate_t time_to_isoDateTime(time_t ti, isoTime_t* isoTime)
 	return isoDate_create(1900+tm.tm_year,1+tm.tm_mon,tm.tm_mday);
 }
 
-isoTime_t time_to_isoTime(time_t ti)
+isoTime_t DLLCALL time_to_isoTime(time_t ti)
 {
 	isoTime_t isoTime;
 	
@@ -223,7 +223,7 @@ isoTime_t time_to_isoTime(time_t ti)
 	return isoTime;
 }
 
-isoDate_t gmtime_to_isoDateTime(time_t ti, isoTime_t* isoTime)
+isoDate_t DLLCALL gmtime_to_isoDateTime(time_t ti, isoTime_t* isoTime)
 {
 	struct tm tm;
 
@@ -240,7 +240,7 @@ isoDate_t gmtime_to_isoDateTime(time_t ti, isoTime_t* isoTime)
 	return isoDate_create(1900+tm.tm_year,1+tm.tm_mon,tm.tm_mday);
 }
 
-isoTime_t gmtime_to_isoTime(time_t ti)
+isoTime_t DLLCALL gmtime_to_isoTime(time_t ti)
 {
 	isoTime_t isoTime;
 	
@@ -249,7 +249,7 @@ isoTime_t gmtime_to_isoTime(time_t ti)
 	return isoTime;
 }
 
-time_t isoDateTime_to_time(isoDate_t date, isoTime_t ti)
+time_t DLLCALL isoDateTime_to_time(isoDate_t date, isoTime_t ti)
 {
 	struct tm tm;
 
@@ -273,7 +273,7 @@ time_t isoDateTime_to_time(isoDate_t date, isoTime_t ti)
 /* Conversion from xpDate/Time/Zone to isoDate/Time/Zone Strings			*/
 /****************************************************************************/
 
-char* xpDate_to_isoDateStr(xpDate_t date, const char* sep, char* str, size_t maxlen)
+char* DLLCALL xpDate_to_isoDateStr(xpDate_t date, const char* sep, char* str, size_t maxlen)
 {
 	if(sep==NULL)
 		sep="-";
@@ -294,7 +294,7 @@ char* xpDate_to_isoDateStr(xpDate_t date, const char* sep, char* str, size_t max
  * 2            "14:02:39.82"
  * 3            "14:02:39.829"
  */
-char* xpTime_to_isoTimeStr(xpTime_t ti, const char* sep, int precision
+char* DLLCALL xpTime_to_isoTimeStr(xpTime_t ti, const char* sep, int precision
 								   ,char* str, size_t maxlen)
 {
 	if(sep==NULL)
@@ -319,7 +319,7 @@ char* xpTime_to_isoTimeStr(xpTime_t ti, const char* sep, int precision
 	return str;
 }
 
-char* xpTimeZone_to_isoTimeZoneStr(xpTimeZone_t zone, const char* sep
+char* DLLCALL xpTimeZone_to_isoTimeZoneStr(xpTimeZone_t zone, const char* sep
 								   ,char *str, size_t maxlen)
 {
 	xpTimeZone_t	tz=zone;
@@ -342,7 +342,7 @@ char* xpTimeZone_to_isoTimeZoneStr(xpTimeZone_t zone, const char* sep
 	return str;
 }
 
-char* xpDateTime_to_isoDateTimeStr(xpDateTime_t dt
+char* DLLCALL xpDateTime_to_isoDateTimeStr(xpDateTime_t dt
 								   ,const char* date_sep, const char* datetime_sep, const char* time_sep
 								   ,int precision
 								   ,char* str, size_t maxlen)
@@ -366,7 +366,7 @@ char* xpDateTime_to_isoDateTimeStr(xpDateTime_t dt
 /* isoDate/Time/Zone String parsing functions								*/
 /****************************************************************************/
 
-BOOL isoTimeZoneStr_parse(const char* str, xpTimeZone_t* zone)
+BOOL DLLCALL isoTimeZoneStr_parse(const char* str, xpTimeZone_t* zone)
 {
 	unsigned hour=0,minute=0;
 
@@ -391,7 +391,7 @@ BOOL isoTimeZoneStr_parse(const char* str, xpTimeZone_t* zone)
 }
 
 /* TODO: adjust times in 24:xx:xx format */
-xpDateTime_t isoDateTimeStr_parse(const char* str)
+xpDateTime_t DLLCALL isoDateTimeStr_parse(const char* str)
 {
 	char zone[16];
 	xpDateTime_t	xpDateTime;
diff --git a/src/xpdev/xpdatetime.h b/src/xpdev/xpdatetime.h
index 61ce9fdb3a94014f6b9ac07d0608162fdb457938..87169635ac679e4bf1297d478f6deb853fa2d30b 100644
--- a/src/xpdev/xpdatetime.h
+++ b/src/xpdev/xpdatetime.h
@@ -39,6 +39,7 @@
 #define _XPDATETIME_H_
 
 #include "gen_defs.h"	/* uint32_t and time_t */
+#include "wrapdll.h"
 
 #if defined(__cplusplus)
 extern "C" {
@@ -72,14 +73,14 @@ typedef struct {
 	xpTimeZone_t	zone;	/* minutes +/- UTC */
 } xpDateTime_t;
 
-xpDateTime_t	xpDateTime_create(unsigned year, unsigned month, unsigned day
+DLLEXPORT xpDateTime_t	DLLCALL xpDateTime_create(unsigned year, unsigned month, unsigned day
 								   ,unsigned hour, unsigned minute, float second
 								   ,xpTimeZone_t);
-xpDateTime_t	xpDateTime_now(void);
-time_t			xpDateTime_to_time(xpDateTime_t);
-xpDateTime_t	time_to_xpDateTime(time_t, xpTimeZone_t);
-xpDateTime_t	gmtime_to_xpDateTime(time_t);
-xpTimeZone_t	xpTimeZone_local(void);
+DLLEXPORT xpDateTime_t	DLLCALL xpDateTime_now(void);
+DLLEXPORT time_t		DLLCALL xpDateTime_to_time(xpDateTime_t);
+DLLEXPORT xpDateTime_t	DLLCALL time_to_xpDateTime(time_t, xpTimeZone_t);
+DLLEXPORT xpDateTime_t	DLLCALL gmtime_to_xpDateTime(time_t);
+DLLEXPORT xpTimeZone_t	DLLCALL xpTimeZone_local(void);
 
 /**********************************************/
 /* Decimal-coded ISO-8601 date/time functions */
@@ -99,17 +100,17 @@ typedef uint32_t	isoTime_t;	/* HHMMSS   (decimal) */
 #define			isoTime_minute(time)			(((time)/100)%100)
 #define			isoTime_second(time)			((time)%100)
 
-BOOL			isoTimeZoneStr_parse(const char* str, xpTimeZone_t*);
-xpDateTime_t	isoDateTimeStr_parse(const char* str);
+DLLEXPORT BOOL			DLLCALL isoTimeZoneStr_parse(const char* str, xpTimeZone_t*);
+DLLEXPORT xpDateTime_t	DLLCALL isoDateTimeStr_parse(const char* str);
 
 /**************************************************************/
 /* Conversion between time_t (local and GMT) and isoDate/Time */
 /**************************************************************/
-isoTime_t		time_to_isoTime(time_t);
-isoTime_t		gmtime_to_isoTime(time_t);
-isoDate_t		time_to_isoDateTime(time_t, isoTime_t*);
-isoDate_t		gmtime_to_isoDateTime(time_t, isoTime_t*);
-time_t			isoDateTime_to_time(isoDate_t, isoTime_t);
+DLLEXPORT isoTime_t		DLLCALL time_to_isoTime(time_t);
+DLLEXPORT isoTime_t		DLLCALL gmtime_to_isoTime(time_t);
+DLLEXPORT isoDate_t		DLLCALL time_to_isoDateTime(time_t, isoTime_t*);
+DLLEXPORT isoDate_t		DLLCALL gmtime_to_isoDateTime(time_t, isoTime_t*);
+DLLEXPORT time_t		DLLCALL isoDateTime_to_time(isoDate_t, isoTime_t);
 #define			time_to_isoDate(t)		time_to_isoDateTime(t,NULL)
 #define			gmtime_to_isoDate(t)	gmtime_to_isoDateTime(t,NULL)
 
@@ -120,8 +121,8 @@ time_t			isoDateTime_to_time(isoDate_t, isoTime_t);
 #define			xpDate_to_isoDate(date)	isoDate_create((date).year,(date).month,(date).day)
 #define			xpTime_to_isoTime(time)	isoTime_create((time).hour,(time).minute,(unsigned)((time).second))
 
-xpDateTime_t	isoDateTime_to_xpDateTime(isoDate_t, isoTime_t);
-isoDate_t		xpDateTime_to_isoDateTime(xpDateTime_t, isoTime_t*);
+DLLEXPORT xpDateTime_t	DLLCALL isoDateTime_to_xpDateTime(isoDate_t, isoTime_t);
+DLLEXPORT isoDate_t		DLLCALL xpDateTime_to_isoDateTime(xpDateTime_t, isoTime_t*);
 
 /*****************************************************************/
 /* Conversion from xpDate/Time/Zone to isoDate/Time/Zone Strings */
@@ -137,17 +138,17 @@ isoDate_t		xpDateTime_to_isoDateTime(xpDateTime_t, isoTime_t*);
  * 2            "14.02:39.82"
  * 3            "14.02:39.829"
  */
-char* xpDate_to_isoDateStr(xpDate_t
+DLLEXPORT char* DLLCALL xpDate_to_isoDateStr(xpDate_t
 						,const char* sep
 						,char* str, size_t maxlen);
-char* xpTime_to_isoTimeStr(xpTime_t
+DLLEXPORT char* DLLCALL xpTime_to_isoTimeStr(xpTime_t
 						,const char* sep
 						,int precision
 						,char* str, size_t maxlen);
-char* xpTimeZone_to_isoTimeZoneStr(xpTimeZone_t
+DLLEXPORT char* DLLCALL xpTimeZone_to_isoTimeZoneStr(xpTimeZone_t
 						,const char* sep
 						,char *str, size_t maxlen);
-char* xpDateTime_to_isoDateTimeStr(xpDateTime_t
+DLLEXPORT char* DLLCALL xpDateTime_to_isoDateTimeStr(xpDateTime_t
 						,const char* date_sep, const char* datetime_sep, const char* time_sep
 						,int precision
 						,char* str, size_t maxlen);
diff --git a/src/xpdev/xpmap.c b/src/xpdev/xpmap.c
index e89274388df4f54b856e100ab383c7cf4e683269..1eedc0cfb248214f599b98ab5360b7f305d2e170 100644
--- a/src/xpdev/xpmap.c
+++ b/src/xpdev/xpmap.c
@@ -46,7 +46,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
-struct xpmapping *xpmap(const char *filename, enum xpmap_type type)
+struct xpmapping* DLLCALL xpmap(const char *filename, enum xpmap_type type)
 {
 	int					fd;
 	void				*addr=NULL;
@@ -91,7 +91,7 @@ struct xpmapping *xpmap(const char *filename, enum xpmap_type type)
 	return ret;
 }
 
-void xpunmap(struct xpmapping *map)
+void DLLCALL xpunmap(struct xpmapping *map)
 {
 	munmap(map->addr, map->size);
 	close(map->fd);
@@ -100,7 +100,7 @@ void xpunmap(struct xpmapping *map)
 
 #elif defined(_WIN32)
 
-struct xpmapping *xpmap(const char *filename, enum xpmap_type type)
+struct xpmapping* DLLCALL xpmap(const char *filename, enum xpmap_type type)
 {
 	HFILE				fd;
 	HANDLE				md;
@@ -149,7 +149,7 @@ struct xpmapping *xpmap(const char *filename, enum xpmap_type type)
 	return ret;
 }
 
-void xpunmap(struct xpmapping *map)
+void DLLCALL xpunmap(struct xpmapping *map)
 {
 	UnmapViewOfFile(map->addr);
 	CloseHandle(map->md);
diff --git a/src/xpdev/xpmap.h b/src/xpdev/xpmap.h
index 2ca4a463c72cd992b1208482a287325b9deb9ebf..e73d12cc1742e1c46fe7324f99606332f971fe2f 100644
--- a/src/xpdev/xpmap.h
+++ b/src/xpdev/xpmap.h
@@ -39,6 +39,7 @@
 #define _XPMAP_H
 
 #include "gen_defs.h"
+#include "wrapdll.h"
 
 enum xpmap_type {
 	XPMAP_READ,
@@ -70,7 +71,7 @@ struct xpmapping {
 
 #endif
 
-struct xpmapping *xpmap(const char *filename, enum xpmap_type type);
-void xpunmap(struct xpmapping *map);
+DLLEXPORT struct xpmapping* DLLCALL xpmap(const char *filename, enum xpmap_type type);
+DLLEXPORT void DLLCALL xpunmap(struct xpmapping *map);
 
 #endif