
#ifndef DSI_EXPORTS___H
#define DSI_EXPORTS___H

#include <windows.h>

#  ifdef LIBDSIPDCWRAP_EXPORTS
#    define DSIPDC_EXPORT __declspec (dllexport)
#  else
#    define DSIPDC_EXPORT __declspec (dllimport)
#  endif
// accepted calling convention
#  define DSIPDC_STDCALL  __stdcall 


#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */

typedef enum 
{
	DSI_RESPONSE_MAX = 32000,
};


typedef struct 
{
	char         Response[DSI_RESPONSE_MAX];
	USHORT       data_len;
			
} DSI_PDCRESPONSE_PACKET, *LPDSI_PDCRESPONSE_PACKET;


typedef enum 
{
	DSI_ERR_SUCCESS				=		0,
	DSI_ERR_COMINITFAILED		=		1,
	DSI_ERR_PDCOCXINITFAILED	=		2,
	DSI_ERR_DATALENGTH	        =		3,
	DSI_OCX_NOTINITIALIZED		=		4,
	DSI_COM_NOTINITIALIZED		=		5,
	DSI_COM_EXCEPTIONTHROWN		=		6,

}WRAPPER_ERROR;


// Interface functions:

// Init Com and the OCX
DSIPDC_EXPORT WRAPPER_ERROR DSIPDC_STDCALL Init (void);

// Methods 
DSIPDC_EXPORT WRAPPER_ERROR DSIPDC_STDCALL 
	ProcessTransaction(LPDSI_PDCRESPONSE_PACKET Response,LPCTSTR XMLCommand,LPCTSTR ClientServerPassword,LPCTSTR UserTraceData);
DSIPDC_EXPORT WRAPPER_ERROR DSIPDC_STDCALL 
	ServerIPConfig(LPDSI_PDCRESPONSE_PACKET Response,LPCTSTR HostList);
DSIPDC_EXPORT WRAPPER_ERROR DSIPDC_STDCALL 
	PingStoredServerList(LPDSI_PDCRESPONSE_PACKET Response,LPCTSTR IpPort);
DSIPDC_EXPORT WRAPPER_ERROR DSIPDC_STDCALL 
	CancelRequest(void);
DSIPDC_EXPORT WRAPPER_ERROR DSIPDC_STDCALL 
	GetIPAddressFromHostName(LPDSI_PDCRESPONSE_PACKET Response,LPCTSTR HostName);
DSIPDC_EXPORT WRAPPER_ERROR DSIPDC_STDCALL 
	PingServer(LPDSI_PDCRESPONSE_PACKET Response,LPCTSTR IpAddress, LPCTSTR IpPort);
DSIPDC_EXPORT WRAPPER_ERROR DSIPDC_STDCALL 
	SetConnectTimeout(SHORT * Timeout);
DSIPDC_EXPORT WRAPPER_ERROR DSIPDC_STDCALL 
	SetResponseTimeout(SHORT * Timeout);

// Release OCX and uninit COM
DSIPDC_EXPORT void DSIPDC_STDCALL Cleanup (void);
/*/
/*/
/// sample usage 
/*
	
*/	



#ifdef __cplusplus
}
#endif /* __cplusplus */


#endif 
