LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems passing ActiveX dll refnum from VI to VI via local, global variables

Hi Ben

Thanks Ben for your input. My problem is different but the same Smiley Very Happy You are correct that my primary problem is that the resources relatived to the refnum (and therefore the reference to the Event handler) are released when this is not intended. The example I have seen for an FG/AE solution is based on creating a new refnum when the old is released. This still causes me a problem, as part of the shutdown process for the COM object is the releasing of the Event Handler that was referenced to the original refnum whose resources have already been released by a previous LV cleanup routine. This results in the COM Object trying to release a Event process (that is still running) via a non existent pointer (now a NULL pointer) causing the COM Object (and LabView) to crash.

In any case I will investigate further the possibilities of using the FG/AE solution.

Regards

Ian M.

 

 

0 Kudos
Message 11 of 13
(546 Views)
Since LV is a a graphic language the images of your code would be very helpful in letting us help y'all.
 
Please post images of your code (and or example code) and Y'all will get much better milage out of us.
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 13
(530 Views)

Hi Ben

I've zipped up the project and attached it below. You will notice that there are a number of case statements that appear to be static. I use this method to switch off features when I'm experimenting as it saves the time of re-drawing deleted items.

I hope that it will be of some use.

Ian

 

0 Kudos
Message 13 of 13
(512 Views)