You are not logged in.
Pages: 1
Topic closed
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 ?
Waiting for the sun.. waiting for the sun..
Goddot might arrive anytime now :rolleyes:
keep the "faith" :lol:
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 ?
i'm still beginner in c programming, i'm gonna ask my teacher... wait for next week :oops:
Thanx Albert.. as for the rest of the "so-called programmers" in here, hehehehe ddabdabo.
bleh .. didn't study C yet .. so i can't help :?
i did take c at uni and never cared much for it...
Thanx Albert.. as for the rest of the "so-called programmers" in here, hehehehe ddabdabo
don't think that saying that to us "so-called programmers" is not a nice thing to do, i mean even if we're not as good as you are in programming, c'mon, give us some credit, and be nice.
you'll have to get used to sam :)
Earn the credit. I was referring to the people who bragged about their programming skills in another topic, like if they were programming gods or something, then ma tole3 7esson bel VB6 topics I made.. tsk tsk..
umm wasn't it you who was bragging about being a programming god?!
yeah that's right, i think it was YOU who was saying "yalla dabdabo"!!
LOL el hay2a fehmak ghaliz ya shreek.. I said "yalla dabdabo" when no one replied to my 2 topics, and I never bragged about anything, I consider myself to be an average programmer, but if I know a glimpse of VB6 or C or whatever, I don't post it and say I know the language, as others did, go check the topic. ;)
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 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 ?
Did you find a way to solve your problem ?
Maybe we can help. We are presently making a Voicetronix.ocx component to use with VB6/VB.net
Is it possible to see your VB translation code to detect where the problem is, and try to give you a solution ?
YOurs
Philippe.
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 ?
I have one small question... why are you dying to use pointers to variables and functions in vb? It's obvious that vb is not the language of choice for pointers.
I recommend that you use a simple byref for your pointer variables. As for the callbacks, just use events in vb. That's what they're made for.
easy wloo
so easy
just gimmy 5 minutess...(brb)
How come you're still not back after 3 hours?
hehe he was joking.
Pages: 1
Topic closed