LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using LaunchExecutableEx: the same command doesn't "always" work

Hi,

Can someone help me?

I use the function LaunchExecutableEx like this:

LaunchExecutableEx (commande, LE_SHOWNORMAL, &(S_camera[iter].handle_executable)) ;
 where commande is "pcm_cam2.exe -S Cam1 -D"  .
Cam1 and -D are arguments for my exe pcm_cam2.exe.

this line is called in a dll used by a sequence of TestStand.

When I first run the sequence, my executable pcm_cam2.exe is successfully launched. And at the end of my sequence the executable ends properly.
Whitout closing my window TestStand I run the sequence a second time. LaunchExecutableEx doesn't indicate any error but my executable is not launched.
To run my sequence properly several times I must close my window TestStand between each run.

Can someone tell me why?
And what can I do to run my sequence several times without closing TestStand?


Thank you for your reply.

0 Kudos
Message 1 of 3
(3,119 Views)
patpanik,

i asume that there occurs a problem with the application handle. i copied a part of the help of LaunchExecutableEx:
When you launch several processes with LaunchExecutableEx but do not call RetireExecutableHandle on them, you might reach the limit for the maximum number of processes the system imposes. This happens even if the processes terminate; the program does not recognize that the processes have terminated until you call RetireExecutableHandle.
therefore please make sure that you free all resources in your application.

Norbert B.
NI - Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 3
(3,109 Views)
Hi,

thank for your reply. We 've just  test it  and it worked!

It will avoid us a lot of useless clicks.


Bye


0 Kudos
Message 3 of 3
(3,087 Views)