CSHARP API

13/01/2005 - 19:10 por Andy | Informe spam
Friends,

I have a question, I would like to write a Windows service to check if
executable is started. I have a executable, when the user start it for
second time, I have tell user that they have started it already and
close the second instance. I have the application executable, but not
source code.

For example,

Let use assume, Calc.exe whenever I start a Calc.exe I have to check if
the Calc.exe already open if opened I have give user information that
Calc already open and close the second instance started.
It is urgent. Please help asap.

Thanks.
Andy
 

Leer las respuestas

#1 Guillermo guille
13/01/2005 - 19:36 | Informe spam
La respuesta en castellano que este es un grupo".es." / The answer in Spanish,
because we're ins a Spanish group.

Puedes usar la clase Process y comprobar los procesos activos, comprobar si
alguno está duplicado (y que sea de los que quieres que no haya duplicidad o
bien comprobar sólo los que tengan título en la ventana) y detener el que se
haya iniciado con postrioridad.

Aquí tienes un ejemplo que te pude ser de utilidad:
http://www.elguille.info/NET/dotnet...sos.htm#cs

Nos vemos.
Guillermo
Microsoft VB MVP desde 1997
Te invito a mi sitio dedicado al VB y más...
http://www.elguille.info/
http://www.mundoprogramacion.com/
(puede que el correo usado sea anti-spam)


"Andy" wrote in message
news:
Friends,

I have a question, I would like to write a Windows service to check if
executable is started. I have a executable, when the user start it for
second time, I have tell user that they have started it already and
close the second instance. I have the application executable, but not
source code.

For example,

Let use assume, Calc.exe whenever I start a Calc.exe I have to check if
the Calc.exe already open if opened I have give user information that
Calc already open and close the second instance started.
It is urgent. Please help asap.

Thanks.
Andy

Preguntas similares