05-26-2020 09:24 AM
Hi,
I encounter a problem unsing the function DSSet handle size in a DLL.
I have to make a wrapper for an API that will return strings of various size. Since I can only know the length of the string in my C wrapper I figured out that I should use the provided DSSetHandleSize func in order to resize the labview handle to hold the string i'm trying to retrieve from the API.
At first sight it seems to work and I retrieve a string of the right size. However, if I then try to save or touch something on the FP of my VI, labview crashes sending me this error :
" e:\builds\penguin\labview\branches\2017\dev\source\panel\fpsane.cpp(548) : DAbort 0x1A7102DF: Fatal insanities(0x00000400) exist in ReportInsanities, "
My C code is for now fairly simple (test purpose only) and is basicaly a simplified copy of the example given by Ni in the " Libraries and exectutable " example project.
and here is the corresponding labview diagram :
the parameters of the library call are both set to string, string handle.
I use Labview 2017 32bits and the library is compiled using CVI 2019
What I found the most intriguing is that if I modify the VI given by NI in the " Libraries and exectutable " example project in order to triger the condition to pass throught that DSSetHandleSize, I have no crashes but it does not work, the string I retrieve is of the size of the string I feed in. Does the provided C example really are what's complied int the example DLL ?