04-22-2010 03:03 PM
I am trying (new at this) to call an external dll. The function prototype looks like this:
int FUNCTION( int *Count, struct List_t *List );
Count is a Long
List_t is a struct that looks like:
typedef struct List_t
{
char Name[MAXCHARS];
char File[MAXCHARS];
double Length;
bool wired;
bool DDD;
};
and List is an array of length (MAX-1), where MAX is defined as 10 and MAXCHARS is defined as 48.
This is my latest try:
and I have the List parameter as "adapt to type", and "array data pointer".
I get some correct data back, but not all.
Thanks
Solved! Go to Solution.
04-22-2010 03:14 PM
In your Array to Cluster function, what size are you setting the cluster to? It should be the same number as MAXCHARS. Right click on the function to set its size.
04-23-2010 03:37 AM
And in addition to what tbob said, you better make sure that the count input never is higher than 1 as the function might otherwise try to fill in beyond the end of the single element array you pass in and that can AND WILL corrupt your memory eventually causing some crashes, though that doesn't need to crash immediately.
What you probably should do is replacing the Build Array Node by a Initialize Array Node and wire the count control also to the size input of it. Set the count to 10 and on return use the count output to resize the array using Reshape Array to the size that was filled in.
04-23-2010 03:57 AM
Guys, thanks for the help. It was the initilize array problem that was driving me crazy. I could change the cluster size and see all (most) of the text in my first string, but I could never get the array portion working properly.
Thanks for the additional eyes on my problem!