sumitrishi wrote:
> I have to set the auto dispose preoperty to 'true' and wait until done
> to 'false'. So if I dont have the application builder include the
> front panel ( which is what I want exactly) then would the reference
> be not closed by itself ?
You have to leave the panel in the application as otherwise you won't
even be able to open and run the VI.
> How can I prevent it from happening ? Do I have to do it
> programatically by making the VI hold a reference to itself till the
> time that running instance is required? I think I tried this but it
> does not work.
Yes leave the frontpanel in the build, open inside the VI as soon as
possible a VI refnum and you can even set Frontpanel.Open of that refnum
to False to make sure it is
really invisible. Keep the VI refnum open
inside a shift register until you are ready to shutdown, but don't close
the VI refnum until after you have properly disposed any other possible
resources. Once the internal VI refnum is gone while no front panel is
visible, (it must be present in the built nevertheless for VI server to
be able to start it up as independant task), your VI will abort
immediately even if the diagram still contains code to execute to close
files, VISA resources, etc.
> If you feel that it should have worked then I might try
> again. My program actually is a kind of server that spawns a new
> thread everytime a request comes from the client and this server needs
> to be running as a windows NT service . The hierarchy on the server
> side is that it runs a re-entrant VI (that has a control on the front
> panel that need to be set at the time of spawning).
One more reasone to NOT remove the front panel. If you remove the
frontpanel you can't use methods
such as Set Control Value to manipulate
the control value as it is really not present at all.
Rolf Kalbermatter
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390