LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call function from DLL with return type void*

Here's the problem:
I have a DLL containing a function which takes an integer as parameter
and returns a void* pointer to a structure. The function definition is:
void * MODE __stdcall IICali_ReadBaseboardProperties(int target);
The return type is of the following structure:
typedef void (*IsrFnPtr)(int target);
typedef struct
{
// Timers
int Timer0Enabled; // True/False
int Timer1Enabled; // True/False
float Timer0Rate;
[... more parameters......]
IsrFnPtr OnTimer0Interrupt;
IsrFnPtr OnTimer1Interrupt;
IsrFnPtr OnExternalInterrupt;
IsrFnPtr OnModuleInt0Interrupt;
int
StreamInputIntType; // Enum
IIInterruptType
int StreamOutputIntType; // Enum
IIInterruptType
int StreamInputIntSense; // Enum
IIInterruptSense
[... more parameters......]
int DioWriteStream; // Enum IIStreamEnd
} BaseboardProperties;

OK, now the function call in C++ would be something like:
BaseboardProperties *BBProps = (BaseboardProperties
*)IICali_ReadBaseboardProperties(0);

Question: How do I generate this call in LV5.1 ??
I find no way to have the return type be void*. I expect it would be
something like "adapt to type", but that's only available for
parameters, not for the return type.

Any help is appreciated.
Thanks, Carsten Schmidt
0 Kudos
Message 1 of 1
(1,594 Views)