PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Killing the 16-bit tasks
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Ends the execution of a 32-bit or 64-bit application on the current computer: all the instances of the executable are killed. The application can be identified by its name or by its PID.
Notes: To use this function in Windows NT/2000, the PSAPI.DLL library must be found on the system (this DLL is supplied with Windows NT or 2000 but it is not necessarily installed).
Example
WINDEVReports and QueriesWindowsUser code (UMC)
bRes is boolean
bRes = ExeTerminate("C:\Draw\psp\psp.exe")
Windows Mobile
bRes is boolean
bRes = ExeTerminate("psp.exe")
Syntax

Terminating an application identified by its name Hide the details

<Result> = ExeTerminate(<Executable Name>)
<Result>: Boolean
  • True if all the instances of the program have been deleted,
  • False if a problem occurred. This function may fail:
    • if the executable is not instantiated (the executable is not run).
    • if the user has no sufficient rights to destroy one of the instances.
  • if the PSAPI DLL is not available in Windows NT or 2000.
<Executable Name>: Character string (with quotes)
Name and full (or relative) path of the executable (up to 260 characters).
Windows Mobile Name of the executable (up to 260 characters). If this parameter contains the full path of the executable, this path is ignored.

Terminating an application identified by its process ID (PID) Hide the details

<Result> = ExeTerminate(<Process ID>)
<Result>: Boolean
  • True if all the instances of the program have been deleted,
  • False if a problem occurred. This function may fail:
    • if the executable is not instantiated (the executable is not run).
    • if the user has no sufficient rights to destroy one of the instances.
  • if the PSAPI DLL is not available in Windows NT or 2000.
<Process ID>: Integer
Process ID (PID) of the application. This identifier is returned by ExeRun (associated with the exePID constant) or by ExeGetPID.
Remarks
WINDEVReports and QueriesWindowsUser code (UMC)

Killing the 16-bit tasks

In Windows NT or 2000, you have the ability to end a 16-bit application by "killing" the executable named "ntvdm.exe" (the virtual machine that runs the 16-bit sub-system).
Caution: All the 16-bit tasks are killed.
The 16-bit tasks cannot be interrupted in Windows 98 and Me.
Components
WINDEVReports and Queries wd230std.dll
Windows Mobile wp230std.dll
Linux wd230std.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Novo Exemplo ExeTerminate
Novo Exemplo ExeTerminate

ExeTerminate(TABLE_processos1.COL_exelongname)

//Blog Com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/08/curso-windev-funcoes-exe-windows-009.html
https://www.youtube.com/watch?v=cxvXzTSMazU
De matos AMARILDO
Aug. 15 2016
Exemplo ExeTerminate
//Finaliza Um programa

EDT_ProgramaAFinalizar="\Programas\Notepad++\notepad++.exe"
b_finaliza is boolean
b_finaliza = ExeTerminate(EDT_ProgramaAFinalizar)
Info("Programa Finalizado")

//Blog com Video e exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/05/curso-windev-funcoes-exe-windows-001.html
https://www.youtube.com/watch?v=PgBTG-RX4eM
De matos AMARILDO
May 29 2016