
# define WIN32_LEAN_AND_MEAN
# include <windows.h>

// 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 WINLIST_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 
// WINLIST_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef WINLIST_EXPORTS
#define WINLIST_API __declspec(dllexport)
#else
#define WINLIST_API __declspec(dllimport)
#endif

extern "C"
{
	// note: the triple dots at the end of these prototypes circumvents C++ decorated name challenges !

	// multiple additional parameters are potentially passed for the Initialize function,
	// and functions that are invoked by a roo ExternalClass 'perform' method request

	typedef GLOBALHANDLE (CALLBACK* callback_method_t ) ( LPCSTR invocationContext, LPCSTR pMethod, ... );

	WINLIST_API GLOBALHANDLE WINAPI Initialize( LPCSTR invocationContext, LPCSTR pOther, ... );

	WINLIST_API void WINAPI SetCallback( LPCSTR invocationContext, callback_method_t Callback, ... );

	WINLIST_API void WINAPI Terminate( LPCSTR invocationContext, ... );

	// the following function is invoked by a roo ExternalClass 'perform' method request

	WINLIST_API GLOBALHANDLE WINAPI List( LPCSTR invocationContext, LPCSTR pPattern, ... );
};

