typedef char* (*SomeRandomFunction1)();
typedef int (*SomeRandomFunction2)(long);
typedef int (*SomeRandomFunction3)();
typedef int (*SomeRandomFunction4)();
I need to convert the above code into the Visual Basic equivalent. Now, because VB (AFAIK) does not have prototypes or pointers, I'm at a loss on how to go about doing this.
I tried to do it myself and came up with this:Private CStr(SomeRandomFunction1) As String
But that's hopelessly wrong. Can anyone point me in the right direct?
As long as you just want to declare a variable to hold such a pointer, this works as an equivalent:
Dim SomeRandomFunction1 As Long
On 32-bit windows, those statements allocate space for a 4-byte value. Now if you want to actually *use* them in some way....
Well, yes - those variables are going to be used with GetProcAddress to get a few functions from a library I've loaded, and I want to be able to use them to call the functions as I would in C++. Is this not possible in VB?
Problem resolved.