![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#3
|
|||
|
|||
|
Cerramos el proceso así
function Matar_proceso(ExeFileName: string): Integer;
// uses TlHelp32 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; Última edición por SYWARE fecha: 22-05-2006 a las 13:31:05. |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Mostrar en el systray | kloud | C++ Builder | 1 | 09-02-2006 20:24:27 |
| Icono de la aplicación | SoulSoldier | C++ Builder | 2 | 06-02-2006 16:29:58 |
| Eliminar Icono en W2k | edgusano | Windows | 3 | 11-03-2005 15:20:00 |
| Como almacenar el Nombre en un fichero de Terceros | apicito | Conexión con bases de datos | 4 | 23-01-2004 13:32:47 |
| Icono aplicacion bandeja del sistema | Azor69 | Varios | 3 | 22-07-2003 09:13:24 |
|