I've been working with a voicetronix card for a while now, it's a voice processing board, sort of like an enhanced voice modem, check out the site
www.voicetronix.com, the card I'm using is OpenLine4 on a WinXP platform. Now the problem is this: its library (vpbapi) is all coded in C and I need to translate the functions to VB6. Now I did translate all of them and I had no problem with pointers and UDT's and data type translation, except for one function, the callback. If you're a C programmer then you know what a callback function is, so what I need is to translate it to a VB6 declaration, but the thing is that this callback function also requires parameters sent as pointers:
#define WINAPI __stdcall
typedef struct {
int type; // event type
int handle; // channel that generated event
int data; // optional data
unsigned long data1;
} VPB_EVENT;
int WINAPI vpb_set_event_callback(
int handle,
void (WINAPI *event_callback)(VPB_EVENT *e, void *context),
void *context);
Gotta turn that into a
Declare Function vpb_set_event_callback Lib "libvpb.dll" (......) as Long
Any idea how to declare the parameters using AddressOf and VarPtr ?