11-14-2017 04:32 AM - edited 11-14-2017 04:37 AM
Hi,
I try to develop an application which based on a .NET dll (builded in LV). In the meanwhile I found a weird behaviour which I can reproduce in a small project (see attached zip). The problem is if I call a dll method, which contains a "wait on asynch call" with a specified timeout, then in case of wait timeout the method will be returned with default value instead of the "real" correct value (of course it works if i dont build and use the dll).
Project structures:
It seems "use case 2" does not behave properly (compare modal window and stingOut values).
Somebody could confirm it that is a bug, or it works as specified and I use the dll wrong?
Thanks for any help,
Balint
11-14-2017 09:09 AM
Hi,
it the same message above, I improved the description a little bit.
I try to develop an application which is based on a .NET dll (built in LV). I found a weird behaviour which I can reproduce in a small project (see attached zip). The problem is that the dll returns different values than the VI that the dll is wrapping. Specifically, the returned class instance (it’s a OOP application) is null and the returned application-specific value is the default value of the type. Note that the original LV code never returns these values.
It seems that the behavior has to do with the "wait on asynch call" VI. If there is no timeout, everything works fine. In case of timeout the dll (when called from LV, I didn’t test it otherwise) returns the wrong values (see above). Note that the application works fine if I don’t use dll (as pure LV application).
Project structures:
It seems "use case 2" does not behave properly (compare modal window and stringOut values).
Can anybody confirm that it is a bug? Or, am I using the dll wrong in a wrong way?
Thanks,
Balint
11-18-2017 12:17 PM
Sorry for spamming the thread, but it turned out, that the problem is more generic. That means, it is independent from error (in my example the "wait on asynch" call thrown an error). An additional information, if I turn on "lv 2011 compatibility mode", then this weird behavior of .net DLL disappears. The question is still, is it anywhere specified (I found only that)?
Balint