exdll.h revision dc2db4623ff57b4efcc4033875d3d7176a69f5d3
/** Taken from:
*/
#ifndef _EXDLL_H_
#define _EXDLL_H_
#include <windows.h>
#if defined(__GNUC__)
#else
#define UNUSED
#endif
// only include this file from one place in your DLL.
// (it is all static, if you use it in two places it will fail)
#define EXDLL_INIT() { \
typedef struct _stack_t {
} stack_t;
static unsigned int g_stringsize;
static stack_t **g_stacktop;
static char *g_variables;
enum
{
INST_0, // $0
INST_1, // $1
INST_2, // $2
INST_3, // $3
INST_4, // $4
INST_5, // $5
INST_6, // $6
INST_7, // $7
INST_8, // $8
INST_9, // $9
INST_R0, // $R0
INST_R1, // $R1
INST_R2, // $R2
INST_R3, // $R3
INST_R4, // $R4
INST_R5, // $R5
INST_R6, // $R6
INST_R7, // $R7
INST_R8, // $R8
INST_R9, // $R9
INST_CMDLINE, // $CMDLINE
INST_INSTDIR, // $INSTDIR
INST_OUTDIR, // $OUTDIR
INST_EXEDIR, // $EXEDIR
INST_LANG, // $LANGUAGE
};
// utility functions (not required but often useful)
{
th=(*g_stacktop);
return 0;
}
{
if (!g_stacktop) return;
*g_stacktop=th;
}
{
}
{
}
#endif//_EXDLL_H_