03-30-2018 01:26 AM
I have dll with function that is defined in header file like this:
DLL_EXPORT unsigned long openInterface(void ** ppHandle, unsigned long param1,
unsigned long param2, const char * param3, const char * param4Out);
When I try to import function using "Import Shared Library" I get red "i" next to parameter ppHandle, like in the attached image. The parameter ppHandle is defined as pointer to pointer with ** and I cannot figure out how can I define this function in Labview.
One additional information about void **ppHandle parameter is that this is "Pointer to pointer to object - handle. "
Please for help.
Solved! Go to Solution.
03-30-2018 05:55 AM - edited 03-30-2018 06:00 AM
If you don't need to do anything with that handle but passing it to other functions then you would configure this as a Numeric: pointer sized (unsigned) integer, passed with pointer to value. In the front panel of your VIs you would use a 64-bit (unsigned) integer control to pass this handle from VI to VI.
Other functions most likely will declare this parameter as:
function(void * pHandle, ....)
and here you would configure it as Numeric: pointer sized (unsigned) integer, passed as value.
@Skoda3One additional information about void **ppHandle parameter is that this is "Pointer to pointer to object - handle. "
Nitpick. It is a reference to an opaque pointer, which might be an object, not a reference/pointer to a pointer to an object! The fact that it is an opaque pointer normally means that the caller should not know nor want to know what the actual implementation behind that handle is.