We'll, honestly I'm not that swift with the API's.  

If I was faced with this problem, I definitely could do it the hard way, and
maybe the only way (never say "only way" in programming, I know...)

Given You have only one instance of the app at a time...

You could write a small app in VB, VC or whatever to kill the process and
call it from the MBX (note that it is a little tricky to write and you have
to be mindful of the OS -- 9X or NT)

How to tell the app what to kill?...Just save the name from MBX to a file
and read it in from the other app.  Ugly, yes, but it would work.

Even if you had multiple instances and wanted to kill one specific instance,
you could do it, but now you need to save the ProcID first when you first
run the .exe

Arash

-----Original Message-----
From: Lavoie, Claude [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 4:02 PM
To: '[EMAIL PROTECTED]'
Cc: Pageau, Normand
Subject: MI-L Killing a program (.EXE) from within a MapBasic routine.


Hi!

>From within a .MBX,  a Run Program statement launches an .EXE application
.
Further into the .MBX, I would like to terminate this .EXE.  How can I do
that? The TERMINATE APPLICATION statement halts the execution of an other
.MBX, not an .EXE.

Can it be done with a function of the Windows API? If so, which one?

Thanks in advance for your time and ideas.


_____________________________________________

Claude Lavoie, a.g.
Service de la g�omatique
Direction de la recherche et de l'innovation en transport
Minist�re des Transports du Qu�bec
35, rue de Port-Royal Est, salle 4.00c
Montr�al (Qu�bec)
H3L 3T1

T�l�phone:      (514) 873-2179
T�l�copieur:    (514) 873-7630
Courriel:       mailto:[EMAIL PROTECTED]
_____________________________________________





_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to