Hello,
this must be very common problem when calling DLL:s, but still I haven't found
clear and usable solution for it.
I'm using LV 8.2 with DLL import wizard, but when I call a DLL, where are functions
with parameters which are pointer to structures the wizard says "The function(s) are not
declared in your header file."
For example, structure "Example_name" in my header-file (64 bytes):
struct Example_name
{
char one[32];
short two;
long three;
char four[3];
};
and my function "Example_function" in DLL:
extern "C" CCONV Example_function (short something, Example_name *about);
How can these structures be used when calling DLL with LabVIEW? Is it so that
I can't solve this problem with DLL-wizard (by modifying the header-file, but I can't
modify the DLL) and I must use normal calling node?
I already tried to make a cluster and flatten it to a string, but after calling I get
result only the first element value ("one"). (or only part of it; the first two bytes
are "0" after calling). I made char one[32] -array to a 32-element cluster before flattening
but it doesn't work anyway. I also tried to unflatten the string returned from DLL after
calling but i get "generic error". (tried with different "endian" & "prepend array or string size"
with LV flatten to string -function).
Any good examples?
Waiting for help & hoping for the best...