Eugen Graf Posted April 4, 2007 Report Share Posted April 4, 2007 Can be, that, if I loaded a VI, which calls a DLL, into memory(by opening e.g. from project explorer) and then load a VI, which calls this VI by static reference, then LV tryes to load the DLL twice? I get errors from DLL if I do that and LV closes immideatly. Eugen screenshots Quote Link to comment
Ton Plomp Posted April 5, 2007 Report Share Posted April 5, 2007 I think it does call it twice, because the static ref, means a seperate dataspace (LV 8+). Ton Quote Link to comment
Tomi Maila Posted April 5, 2007 Report Share Posted April 5, 2007 You open two references to the VI that contains the DLL this way. Is this VI of yours a reentrant VI? What ever is the case I don't think that LV should load the DLL multiple times but always use the same DLL instance even when there is a node for that DLL in multiple open VIs. Are these VIs you open in the same application instance? Quote Link to comment
Eugen Graf Posted April 5, 2007 Author Report Share Posted April 5, 2007 VI, which calls DLL is not reentrant. Both VIs are in the same application. Eugen Quote Link to comment
Eugen Graf Posted April 5, 2007 Author Report Share Posted April 5, 2007 I think, I change the statical call to dynamical, than I have no problems with (excluding one disadvantage - the name of called VI must stay constant). Eugen Quote Link to comment
Tomi Maila Posted April 5, 2007 Report Share Posted April 5, 2007 QUOTE(Eugen Graf @ Apr 4 2007, 04:57 PM) I think, I change the statical call to dynamical, than I have no problems with (excluding one disadvantage - the name of called VI must stay constant). I don't know if you could use the trick where you use static reference to get VI name and then open a reference dynamically with this name. See image in the middle at http://thinkinging.com/2007/03/29/reentrant-vi-clone-name/' target="_blank">Jim Krings blog. Tomi Quote Link to comment
Eugen Graf Posted April 5, 2007 Author Report Share Posted April 5, 2007 QUOTE(Tomi Maila @ Apr 4 2007, 04:01 PM) I don't know if you could use the trick where you use static reference to get VI name and then open a reference dynamically with this name. See image in the middle at http://thinkinging.com/2007/03/29/reentrant-vi-clone-name/' target="_blank">Jim Krings blog.Tomi I think it can't help, because even using of statical VI reference causes the problem. Eugen Quote Link to comment
TG Posted April 6, 2007 Report Share Posted April 6, 2007 Actually, I think Tomi is correct about a possible solution. (trying to imagine something roughly similar on paper.) The cloning feature Jim just discover means different instance's can run asynchrously. If it works for an activeX container then it should for a DLL. (my reasoning) Quote Link to comment
Eugen Graf Posted April 8, 2007 Author Report Share Posted April 8, 2007 I found out now, that the error appears if I loaded the VI and want then build an application. The app builder loads the VI into memory too, than I have the DLL twice and get the error. I post the error message at tuesday, than you can sse what I think. Eugen 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.