Callbacks, function pointers & structures
I'm trying to develop a WIndows app in VB 2005 that drives a computer telephony card. The card comes with a C language SDK. The manufacturer intended the user's app to written in C, and provides (for Win32) a dll, containing functions to initialise the card, set up the parameters, start the signaling, and then make and receive calls. Communication with the user's app is implemented with callbacks from the dll to the user's app.
My problem is that to initialise the card, it requires a C structure to be set up, and then passed to the dll in a function call. This structure contains about 20 function pointers to the specific functions in the users app that will handle the callbacks of varying types.
I can't seem to be able to define a Structure with delegates, which I appreciate I need in order to do this.
Any pointers (!) gratefully received. I would prefer to be able to do the whole thing in VB, but I am thinking perhaps I need to have an intermediate layer in C to talk to the dll, and then pass individual function calls to my VB app.
Your help appreciated! Thanks!

