Or - 

Use DDE? Kick off the EXE from the MBX and then establish a DDE conversation
with it. In your EXE have a remote message handler which can shut the EXE
down on receipt of a specific message. When you are ready, send the message
down the DDE channel and then close the channel from the MBX.

It keeps you out of the API - DDE is 'old technology' but as long as you
make sure you tidy up the channels it seems to be pretty stable.

Paul Crisp
Syntegra

Direct:  0191 461 4522 
Mobile: 0776 414 3762
Fax: (0191) 461 1959

Innovation Place Metro Riverside Park
Delta Bank Road Gateshead Tyne & Wear NE11 9DJ


-----Original Message-----
From: Vakili, Arash [mailto:[EMAIL PROTECTED]]
Sent: 24 October 2001 00:15
To: 'Lavoie, Claude'; '[EMAIL PROTECTED]'
Cc: Pageau, Normand
Subject: RE: MI-L Killing a program (.EXE) from within a MapBasic
routine.


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.


********************************************************************

This email may contain information which is privileged or confidential. If you are not 
the intended recipient of this email, please notify the sender immediately and delete 
it without reading, copying, storing, forwarding or disclosing its contents to any 
other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************



_______________________________________________________________________
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