LabViewFreak wrote:
> And how can I find the corrupted DLL call?
> Are there any tools that will help me to find something like that?
> It's my first programm using DLL's...
🙂Other than carefully examining all DLL calls with the according function
documentation there is only trial and error left. Basically make sure
you define function parameters which need to be passed by reference to
be "passed as pointer" (in the C header they usually are declared
something like {type} *{name}.
Also the caller (here LabVIEW) needs to allocate any memory buffer the
DLL might need to fill in data into. LabVIEW can't do this automatically
as it has not enough information to do the right thing (TM). So you need
to give it a hand.
If you need to pass arr
ays to a function, allocate them properly in the
LabVIEW diagram. They need to contain at least the number of elements
the DLL function is documented to require and then passed to the left
terminal of the Call Library Node for that parameter.
For strings they need to be allocated as well with large enough size on
the LabVIEW diagram and should be one byte longer than the longest
string the DLL might ever want to put in that string buffer. It's
easiest to use "Intialize Array" here also with an unsigned 8bit integer
constant and the correct number of elements and then pass that array
through the "Byte Array To String" function before wiring it to the left
terminal of the Call Library Node.
Rolf Kalbermatter
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390