07-17-2009 02:37 AM
Hi all
I need to interface to an existing program via a DLL.
The existing program loads custom "drivers" for hardware these "drivers" can display a debug screen that is docked in the calling program.
How do I write my dll for the calling application to be able to call a display panel function in my dll and return to the main program with out closing the dll displayed panel.
Currently when the app calls the dll it will wait for me to close the displayed panel before continuing. I will try to solve the docking problem later.
Solved! Go to Solution.
07-17-2009 02:56 AM
Hi PercyH,
your function should only load the display as a parallel proecess and leave then. It shouldn't wait on an event from your display.
Mike
07-17-2009 03:13 AM
Thanks Mike
I asumed that this is what I need to do But is not sure how to do this.
I have two vis in the dll at the moment to keep things simple. One that is the actual display VI and one that opens the display VI. But I am not sure about the implementation.
07-17-2009 03:19 AM
Hi PercyH,
ah ok your are writing the dll with LabVIEW. You can use the Vi Server function to start your display vi as a parallel process. Open the reference to this vi and use an invoke node to start it.
Mike
07-17-2009 03:57 AM
Thanks Mike
I tried that. It works if the vi si run seporate from the DLL, ie I ref it from the location on the disk. Is this the only/best way to do this?
It opens a new ap on the windows task bar. I don't like that. I might have 20 dll's running at a time.
07-17-2009 04:20 AM
Hi PercyH,
what do you mean with "separate from the DLL"? I thought you want to load it from inside the dll. All windows have a button in the taskbar, but i think if you really need, then you can hide them.
Mike
07-17-2009 04:41 AM
Hi Mike
I mean that I have to reference with a path to the vi on the hard drive. (see attached code on the previous post) When the program is installed the Display vi must be part of the DLL and not a VI that is also saved on the hard drive.
Thanks for your assistance I really appreciate it.
07-17-2009 04:48 AM
Hi Percy,
you have to add the display vi as always included in your build specification. Call the vi with a relative path.
See the attached picture. This works, because all vi's lie side by side in the dll.
Mike
07-17-2009 05:03 AM
Thanks mike
enjoy your day