Complex C DLL Callback function Struct
Posted on 2003-02-25
I'm trying to translate some c work into VB and of course the C code uses a C style DLL which I have to match in VB. I know that i need to make Declare statements to match the calls, but what is really getting me is a parameter of one of those calls.
I will list the C struct and call below, then if anyone can help me translate this into VB I would really appreciate it.
// C - Structure
void (*onProgress) (long SomeLong, int i_progress);
void (*onResult) (long Result, const char* TextResult);
//How it is called in C++
MyNewStructure.OnProgress = MyOnProgress; // MyOnProgress is the name of a function call in C++
MyNewStructure.OnResult = MyOnResult;
//Finally it is being used in another DLL Call...
return = CreateProgress(&MyNewStructure);
Any and all help would be appreciated!!