> Thank you for the advice,I changed the function call as reentrant and
> it increases the performance almost 3 times better.
>
Just to make sure you know what this changes. When a DLL is marked as
reentrant, LV will call it in the thread that is executing. This may
not be the same thread from call to call, and if you have the DLL call
in multiple locations, including in a reentrant subVI, the DLL may be
called by multiple threads simultaneously. Some DLL functions are OK
with this, others are not and may crash or return wrong results. This
is why the safe setting is not reentrant. If you are sure the the code
is reentrant or protected, or is called only once in your application,
then it is fine to swit
ch it over, and you will avoid some overhead of
thread switching. If you start seeing odd results or crashes, this is a
likely cause and the first thing to do is mark your DLLs as not
reentrant and see if this fixes the problem.
Greg McKaskle