01-23-2018 05:38 PM
I have a dll,Function parameter define as follow
typedef struct
{
uint32_t LocId;
uint32_t EESize;
uint8_t SerialNumber[64];
uint8_t Description[4096];
const char* FileInfo;
} IoData_t;
I try the attach picture method, at run program then labview crash.
what can I do for solve this probram
Looking forward to your advice, thanks!!!!
01-23-2018 06:47 PM
I suspect you need to allocate the memory for the const char* FileInfo parameter. At the moment you're passing in a value of 0. The dll function will then try to de-refence that (invalid) memory location, causing the crash. Instead you should allocate some memory and pass that into the function for the FileInfo parameter. See this knowledge base article (under the Additional Information section) for details: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P6tcSAC
01-23-2018 07:18 PM
Thanks!!!
my problem is the struct's array
dll function declaration
uint8_t SerialNumber[64]
uint8_t Description[4096]
In labview I try use U8 array and size is 64, U8 array and size is 4096,then labview crash
In labview I try use cluster include 64 u8 element, cluster include 4096 u8 element then labview could run and receive dll's result
but use cluster include 4096 u8 element is very hard, so use array in cluster can complete this work?
01-23-2018 08:43 PM
> but use cluster include 4096 u8 element is very hard
Why?