tnt Posted December 18, 2006 Report Share Posted December 18, 2006 Hi all, I've made a DLL-wrapper (using MS Visual Studio 6) to make a suppliers dll callable from within LV. The original DLL contained some functions which returned a struct and unfortunately LV only supports Void, Numeric and String as returnvalue. I have a polling loop which continuously reads data from the dll (this loop runs for several hours w/o any problem, NO stops and NO memoryleaks). When I go to the block-diagram and add a probe to the block diagram, the DLL crashes (see attachment) The location of the probe on the block-diagram makes no difference, even closing an unreacheable probe causes the same effect. EDIT1: closing a probe that is placed on a non-running VI causes the same errormessage EDIT2: opening a new vi and closing it again also generates this errormessage, so closing a LV-owned window causes the DLL-call to stop Does anyone has seen this behaviour before and/or knows how this can be caused? Thanks, TNT Quote Link to comment
tnt Posted December 21, 2006 Author Report Share Posted December 21, 2006 Update... it seemed that closing a LabVIEW "window"/ "function pallette" / "help window" generated a Microsoft C++ exception in the DLL :thumbdown: . The only work-around that worked was by adding a try {} catch(...) {} (in my wrapper-DLL) around each call to the suppliers DLL. I just can't figure out how such things can happen, my wrapper is farly straight-forward and using the suppliers-DLL directly from LabVIEW (the useable functions), I have no problems either... Another strange things was that when I placed an "unhandled exception" MessageBox in the catch(...), it became even impossible to close a LabVIEW window, the Messagebox "unhandled exception" popped up but the window remained open. I know this a LV-forum :thumbup: , but are there perhaps any VS6-programmers out there who know how to get the thrown exception in a Catch (...)?? Thanks, tnt Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.