Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > API de Windows
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 13-09-2004
images images is offline
Miembro
 
Registrado: ago 2004
Posts: 23
Poder: 0
images Va por buen camino
"enditall" finalizar aplicacs y procesos innecesarios para por ejemplo...editar video

Hola

Resulta que ademas de la programacion en mis ratos libres estoy aprendiendo edicion de video con mi "flamante" movie box de pinnacle :P

En el manual que me estoy leyendo ahora mismo trae varios consejos, entre ellos uno que dice que en Windows 98 mediante Ctrl+Alt+Supr se finalicen todas las aplicaciones except Explorer y Systray. Y en Windows XP indica la direccion de una pagina desde la cual bajarse un software llamado EndItAll:
http://home.ptd.net/~don5408/toolbox/enditall/

Pero el programita en cuestion ya no esta disponible

Entonces he pensado en hacerme yo uno ¿como?...pues no tengo ni pajolera idea.

Hace ya unos meses busque aqui en el foro y con google informacion acerca de como finalizar procesos. Pero habia procesos que no me los finalizaba, pero si se finalizan si lo hago manualmente

Cuando busque esta informacion fue por que cuando cierro el Windows XP me sale un error de la conexion adsl. Parece ser que no se puede finalizar un proceso llamado "WROS.exe" y si antes de cerrar Windows voy y finalizo a mano el proceso pues entonces todo bien. Pues aqui buscaba lo mismo, poder poner un acceso directo a apagar pc hecho por mi.

Bueno, pues lo que necesito saber es como finalizar correctamente un proceso, aplicacion. Y como saber los que se deben mantener activos para no cagarla.

El tema de este hilo es el asunto de finalizar procesos y aplicaciones con un programa hecho en Delphi. Y saber los que se pueden finalizar y los que no.

Ah! se me olvidaba: Todo esto en Windows XP y con Delphi 6 Enterprise

Saludos !
Responder Con Cita
  #2  
Antiguo 14-09-2004
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Poder: 28
Lepe Va por buen camino
El enditall lo estoy bajando de http://www.compu-docs.com/links.htm

Saludos y gracias por comentar la existencia de este programa
Responder Con Cita
  #3  
Antiguo 14-09-2004
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Poder: 28
Lepe Va por buen camino
EnditAll 2 desde aqui http://www.xstudio.ca/pcsupport/syst...anagement.html

Ups, esto no me lo esperaba, viene con los fuentes en delphi y compila

Habrá que leerse la licencia letra a letra. Para aprender si vale

Última edición por Lepe fecha: 14-09-2004 a las 14:15:07.
Responder Con Cita
  #4  
Antiguo 14-09-2004
Avatar de weke
weke weke is offline
Miembro
 
Registrado: may 2004
Ubicación: Valencia
Posts: 170
Poder: 20
weke Va por buen camino
Buenas!
En una aplicación necesitaba arrancar una serie de servicios antes de ejecutarla y matarlos al finalizarla.
Buscando en el foro encontre este código que pongo a continuación:
Código:
procedure TForm1.Button2Click(Sender: TObject);
begin
// el nombre que se le pasa a la función es el nombre del ejecutable que 
// se quiere matar
  matar_proceso('events.exe');
end;
 
function TForm1.matar_proceso(ExeFileName: string): Integer;
const 
  PROCESS_TERMINATE = $0001; 
var
  ContinueLoop: BOOL; 
  FSnapshotHandle: THandle; 
  FProcessEntry32: TProcessEntry32; 
begin 
  Result := 0; 
  FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); 
  FProcessEntry32.dwSize := SizeOf(FProcessEntry32); 
  ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32); 
  while Integer(ContinueLoop) <> 0 do 
  begin 
	if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) =
	  UpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) =
	  UpperCase(ExeFileName))) then 
	  Result := Integer(TerminateProcess( 
						OpenProcess(PROCESS_TERMINATE, 
									BOOL(0), 
									FProcessEntry32.th32ProcessID), 
									0)); 
	 ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32); 
  end; 
  CloseHandle(FSnapshotHandle); 
end;
De esta manera hice una aplicación con 2 botones, uno para arrancar los procesos y otro para matarlos. Muy sencillita.
Espero que con esto puedas hacer lo que buscas.

Saludos!!
__________________
De lo bueno lo mejor, de lo mejor lo superior.
Responder Con Cita
  #5  
Antiguo 14-09-2004
images images is offline
Miembro
 
Registrado: ago 2004
Posts: 23
Poder: 0
images Va por buen camino
Gracias

Que casualidad que este hecho en Delphi y venga con los fuentes!

Pero ¿que pone en la licencia exactamente? ¿Me lo puede explicar alguien?
Tampoco entiendo lo que quieren decir en la Web, en lo de SORRY!

En la licencia creo entender que los fuentes solo estan ahi para educacion. Si lo utilizo para aprender junto con lo que ha puesto weke y mas que me documente ¿Hasta que punto se puede considerar que he copiado el EndItAll?

Esto me trae a la mente otra vez el tema de las patentes de la porra, que por cierto no se como anda el asunto. Me dare una vuelta por www.internautas.org y por www.hispalinux.com a ver.

Saludos!
Responder Con Cita
  #6  
Antiguo 14-09-2004
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Poder: 28
Lepe Va por buen camino
Cita:
Empezado por autor del programa
Ziff-Davis grants you a non-exclusive, non-transferable license to use
the source code distributed with PC Magazine utilities for educational,
non-commercial purposes only. Under no circumstances may you distribute
any unaltered or altered version of the Software through any means.
Ziff-Davis te proporciona una licencia no exclusiva, no transferible del codigo fuente distribuido en PC magazine para uso solámente educacional, no comercial. No puedes distribuir bajo ninguna circunstancia una version alterada o inalterada del programa. Esto se aplica en todos los sentidos.

Mas u menos.... más menos que más eso es lo que dice.

Lo de Sorry ! en la web es porque el programa ahora es de pago, aunque existen varias copias circulando por internet.

Última edición por Lepe fecha: 14-09-2004 a las 18:53:21.
Responder Con Cita
  #7  
Antiguo 19-09-2004
images images is offline
Miembro
 
Registrado: ago 2004
Posts: 23
Poder: 0
images Va por buen camino
Gracias Lepe

Pero no respoondes a mi pregunta principal. No se si me explicado bien.

Si yo hago un programa en Delphi que haga lo mismo. No utilizando el mismo codigo que el EndItAll. Pero si esta hecho en Delphi tambien, pues sera muy parecido.

Osea, si hay un programa que muestra en pantalla un ShowMessage que te dice lo que sea y se llama "YaTeDigo" y yo tambien quiero hacer un programa que muestre un mensaje en pantalla y lo llamo "TeLoDiceAdela". El que hizo el "YaTeDigo" utiliza este codigo:

Código Delphi [-]
 ShowMessage('LO QUE SEA, EN UNA VARIABLE, POR EJEMPLO');

y el mio utiliza:

Código Delphi [-]
 ShowMessage('LO QUE SEA, EN DONDE SEA');

o un programa que liste las impresoras que tienes o todo tu hardware. Los programas coincidiran en el 90% del codigo por que estan hechos en delphi los dos y hacen lo mismo y ambos programadores recurirran a las mismas tecnicas y herramientas y busquedas en Google, Club Delphi etc.....

Entonces, ¿Yo no puedo hacer un programa que finalice procesos y aplicaciones?
Responder Con Cita
  #8  
Antiguo 20-09-2004
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Poder: 28
Lepe Va por buen camino
Es que no sé como responderte

No sé hasta que punto pueden decir que has plagiado un programa .

Lo que sí es cierto es que, al haber obtenido este programa por medios distintos a PcMagazine,ya es ilegal, ya que no permite la difusion en ftp, webs ni otro tipo de almacenamiento.

Este es el archivo completo de la licencia, por si algún compañero del foro puede deducir algo más que yo:

Cita:
LICENSE AGREEMENT FOR PC MAGAZINE UTILITIES

READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE EMBODIED IN THE
DISC OR CD-ROM DISTRIBUTED WITH THIS LICENSE AGREEMENT OR, IF
DOWNLOADED OR IF PROVIDED AS PART OF A COLLECTION, THE DOWNLOADED OR
COLLECTED FILE(S) (the "Media"). Embodied in the Media is a PC Magazine
Utility computer program, its source code, and related documentation
(the "Software"). Ziff Davis Media Inc. ("Ziff-Davis") is the licensor
under this Agreement and you are the licensee. By using the Software, in
whole or in part, you agree to be bound by the terms of this Agreement.
If you do not agree to the terms of this Agreement, promptly return the
Software to the fulfillment house from whom you received the disc or
CD-ROM (or, if downloaded, delete the Software, or if provided as part
of a collection, cease use of the Software). Title to the Software and
all copyrights and other proprietary rights therein are owned by Ziff-
Davis. All rights therein, except those expressly granted to you in
this Agreement, are reserved by Ziff-Davis.

1. Limited License
Ziff-Davis grants you a non-exclusive, non-transferable license to
install and use the Software in a single location on a hard disk or
other storage device, and to make a single archival copy of the Software.

Ziff-Davis grants you a non-exclusive, non-transferable license to use
the source code distributed with PC Magazine utilities for educational,
non-commercial purposes only. Under no circumstances may you distribute
any unaltered or altered version of the Software through any means,
including, without limitation, personal bulletin boards, ftp sites,
CompuServe, the Web, floppy disk or other storage device, or under any
name, including without limitation, your name, Ziff-Davis' name or any
third party's name, nor may you distribute or market programs that
contain altered or unaltered portions of the Software's source code. In
no event shall Ziff-Davis' distribution of the source code with the
Software imply or result in a diminishment or impairment of Ziff-Davis'
rights in the Software or the source code of the Software, including,
without limitation, Ziff-Davis' copyright in the Software or the source
code of the Software.

This Agreement and your rights hereunder shall automatically terminate
if you fail to comply with any provision of this Agreement. Upon such
termination, you shall cease all use of the Software. Further you shall
delete the Software and destroy any archival copies of the Software and
other materials related to the Software in your possession or under
your control, or, if downloaded or if provided as part of a collection,
you shall cease use of and destroy any and all copies of the Software
in your possession or under your control.

2. Additional Restrictions
A. You shall not copy the Software or any component thereof, except
for a single archival copy pursuant to paragraph 1 above. You shall
not rent, lease, sell or sublicense the Software. Any attempt to do so
shall be void and of no effect. To obtain additional copies of the
Software, refer to the PC Magazine Web site located at
http://www.pcmag.com or PC Magazine's Utilities column.

B. You shall not (and shall not permit other persons or entities to)
merge, modify, include in other software or translate the Software or
any component thereof.

C. You shall not (and shall not permit other persons or entities to)
remove or obscure Ziff-Davis' copyright, trademark or other proprietary
notices or legends from any of the materials contained in this package
or downloaded.

3. Disclaimer of Warranty
THE SOFTWARE AND THE MEDIA ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY
WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO
EVENT SHALL ZIFF-DAVIS OR ITS AUTHORIZED DISTRIBUTORS BE LIABLE FOR ANY
DIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE SOFTWARE OR THE MEDIA, EVEN IF ZIFF-DAVIS
OR ITS AUTHORIZED DISTRIBUTORS HAVE BEEN ADVISED OF THE LIKELIHOOD OF
SUCH DAMAGES OCCURRING. ZIFF-DAVIS AND ITS AUTHORIZED DISTRIBUTORS
SHALL NOT BE LIABLE FOR ANY LOSS, DAMAGES OR COSTS, ARISING OUT OF, BUT
NOT LIMITED TO, LOST PROFITS OR REVENUE, LOSS OF USE OF THE SOFTWARE OR
THE MEDIA, LOSS OF DATA OR EQUIPMENT, THE COSTS OF RECOVERING SOFTWARE,
THE MEDIA, DATA OR EQUIPMENT, THE COST OF SUBSTITUTE SOFTWARE OR THE
MEDIA, DATA OR EQUIPMENT OR CLAIMS BY THIRD PARTIES, OR OTHER SIMILAR
COSTS.

SOME STATES DO NOT ALLOW EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES
OR LIMITATION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
THE ABOVE LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO YOU.

4. U.S. Government Restricted Rights
The Software is licensed subject to RESTRICTED RIGHTS. Use, duplication
or disclosure by the Government or any person or entity acting on its
behalf is subject to restrictions as set forth in subdivision
(c)(1)(ii) of the Rights in Technical Data and Computer Software Clause
at DFARS (48 CFR 252.227-7013) for DoD contracts, in paragraphs (c)(1)
and (2) of the Commercial Computer Software-Restricted Rights clause in
the FAR (48 CFR 52.227-19) for civilian agencies, or in the case of
NASA, in Clause 18-52.227-86(d) of the NASA Supplement to the FAR, or
in other comparable agency clauses.

Última edición por Lepe fecha: 20-09-2004 a las 10:58:48.
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 14:35:21.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi