08-22-2014 09:15 AM
i have an activeX node (containing a .COM object which i believe is the correct approach), I wish to be able to hide it until it is needed. I normally achieve this by the visible property node. When I go to create this node on the activex object Labview crashes with the error message Exception: Access violation 0XC0000005 at EIP = 0x07BE16D8
Anyone have any suggestions on whats happening/what im doing wrong please?
I am using Labview 2011Sp1 on windows 7
Thanks in advance
Akiel
08-23-2014 11:09 PM
I don't know specifically, but what is the ActiveX object? I could try it in 2013 and 2014 to see if I get the same result.
Mike...
08-26-2014 02:25 AM
The object is a .com from one of our suppliers, I have just tried it by inserting the acrobat reader object then trying to hide the object, this worked fine so i have passed the problem back to the supplier, but I havent been able able to es it with another .com item. Can you suggest an object to test it with as I think most objects I have access too are activex
thanks
08-26-2014 08:43 AM
Unfortunately I can't really suggest anything because most ActiveX things I work with don't appear on the front panel.
Just a wild thought, but does the ActiveX control in question have a method to make itself invisible?
Mike...
08-27-2014 09:18 AM
Hi Akiel,
It will make debugging easier if you could post you code on the thread. I will take a look at it and see if I can recreate the error.
Thank you.
Kind regards,
Nigel
08-27-2014 10:15 AM - edited 08-27-2014 10:23 AM
ActiveX is always a bit tricky and you have to rely on the provider of the ActiveX server in context of "does that work?".
ActiveX provides different methods to approach and "use" an ActiveX server.
It sounds to me that you are using "Embed" with "Create Control". In this method, the container instanciates the ActiveX server object and handles the connection.
Hiding the container could break the connection, which, in turn, could make references invalid essentially leading to Access Violations, which as last consequence will crash your LV process.
Norbert
EDIT: In order to display a "weird" effect with ActiveX containers, you can follow these steps:
- Open a new VI. Place an ActiveX container on the frontpanel.
- Right-click the container and select "Insert ActiveX Object". Keep "Create Control" and browse for "Windows Media Player". Click OK.
- In the BD, add a property node. Connect the "WindowsMediaPlayer" reference to the reference input of the property node. Now select "URL". Change the direction of the "URL" property to "Write".
- Add a "Path to String" method, wire the string to the URL and create a constant on the path input (context menu).
- Right-click the Path constant and select "Browse for Path". Select a video file available on your computer.
- Swap to the FP and run the VI. The VI will finish, but the Media Player will start/continue to display the video. Stop the video.
- Right-click the Media Player container and select "Create >> Property Node >> Visible". Place it somewhere on the BD and change it to "write". Create a False constant for it.
- Re-run the VI and observe the behavior of the Media Player container.