there might be one... it will require a bit of reverse engineering though.
i started with that but have given up at some point. here's what i have:
this little code snippet will give you the address of the megabuf function:
VM_CONTEXT vmc = g_extinfo->allocVM();
compileContext *ctx = (compileContext *)vmc;
VM_CODEHANDLE cod = g_extinfo->compileVMcode(vmc, "gmegabuf(0)");
codeHandleType *ch = (codeHandleType *)cod;
char *output = new char[1024];
memset(output,0,1024);
void *foo = *((void **)(((unsigned char *)ch->code)+25));
static double * (NSEEL_CGEN_CALL *__megabuf)(double ***,double *);
__asm {
mov eax,foo
mov __megabuf,eax
}
void (*blub)(void) = (void (*)(void))(ch->code);
//blub();
sprintf(output,"%X",__megabuf);
MessageBox(NULL, output, "debug output", 0);
delete[] output;
g_extinfo->freeCode(cod);
g_extinfo->freeVM(vmc);
you also need to put that struct somewhere:
#define YYSTYPE int
typedef struct
{
double **varTable_Values;
char **varTable_Names;
int varTable_numBlocks;
int errVar;
int colCount;
int result;
char last_error_string[256];
YYSTYPE yylval;
int yychar; /* the lookahead symbol */
int yynerrs; /* number of parse errors so far */
char yytext[256];
char lastVar[256];
char *llsave[16]; /* Look ahead buffer */
char llbuf[100]; /* work buffer */
char *llp1;// = &llbuf[0]; /* pointer to next avail. in token */
char *llp2;// = &llbuf[0]; /* pointer to end of lookahead */
char *llend;// = &llbuf[0]; /* pointer to end of token */
char *llebuf;// = &llbuf[sizeof llbuf];
int lleof;
int yyline;// = 0;
void *tmpblocks_head,*blocks_head;
int computTableTop; // make it abort on potential overflow =)
int l_stats[4]; // source bytes, static code bytes, call code bytes, data bytes
void *userfunc_data[64];
}
compileContext;
#define LLB_DSIZE (65536-64)
typedef struct _llBlock {
struct _llBlock *next;
int sizeused;
char block[LLB_DSIZE];
} llBlock;
typedef struct {
int workTablePtr_size;
llBlock *blocks;
void *code;
int code_stats[4];
} codeHandleType;
#define NSEEL_CGEN_CALL __fastcall
you can also find that in the nseel folder of the winamp SDK. better get it from there 🙂