ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Executable functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns the list of applications currently run. These applications can correspond to WINDEV or WINDEV Mobile applications, or to other applications.
For each application found, you have the ability to find out:
  • its identifier.
  • the identifier of parent process (the one that started the application).
  • the name and extension of its executable.
  • the name and full path of its executable.
  • the current amount of memory used.
  • the maximum amount of memory used.
  • the command line used by the executable.
Example
// Add the applications currently run into the "LIST_App" control
ListAdd(LIST_App, ExeListProcess(exePID, exeShortName))
Syntax
<Result> = ExeListProcess([<First information> [... [, <Seventh information>]]])
<Result>: Character string
List of applications currently run. The different applications are separated by CR characters (Carriage Return).
The list has the following format:
<1st information> + TAB + <2nd information> + CR +...

If no information is requested, the list has the following format: <Name and extension of the application executable>.
<First information>: Optional Integer constant
First information that will be returned for each application currently run:
exeCommandLineCommand line of application executable.
Caution:
  • The current user must have sufficient rights to read the content of the memory linked to the process.
  • The 32-bit applications cannot access the information of 64-bit processes.
exeMemoryAmount of memory currently consumed by the application.
This constant is available for Windows NT, 2000 and XP. In the other cases, an empty string ("") is returned.
exeMaxMemoryMaximum amount of memory consumed by the application.
This constant is available for Windows NT, 2000 and XP. In the other cases, an empty string ("") is returned.
exeShortName
(Default value)
Name and extension of application executable.
exeLongNameName and full path of application executable.
exePIDApplication identifier.
exeParentPIDIdentifier of parent process (the one that started the application).
<Seventh information>: Optional Integer constant
Seventh information that will be returned for each application currently run:
exeCommandLineCommand line of application executable.
Caution:
  • The current user must have sufficient rights to read the content of the memory linked to the process.
  • The 32-bit applications cannot access the information of 64-bit processes.
exeMemoryAmount of memory currently consumed by the application.
This constant is available for Windows NT, 2000 and XP. In the other cases, an empty string ("") is returned.
exeMaxMemoryMaximum amount of memory consumed by the application.
This constant is available for Windows NT, 2000 and XP. In the other cases, an empty string ("") is returned.
exeShortName
(Default value)
Name and extension of application executable.
exeLongNameName and full path of application executable.
exePIDApplication identifier.
exeParentPIDIdentifier of parent process (the one that started the application).
Remarks
ExeListProcess returns no error code. To determine if this function generated an error, use the ErrorOccurred variable. If an error occurs, you can get more details on the error with ErrorInfo.
Component: wd290std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Video ExeListProcess
https://youtu.be/6KWxwCIZCIw
https://windevdesenvolvimento.blogspot.com/2019/09/dicas-2272-windev-webdev-mobile.html
// BTN_ExeListProcess - ExeListProcess - Lista Processos
sLista_processos is string
sLista_processos_linha is string
TableDeleteAll(TVT_PROCESSOS)
sLista_processos=ExeListProcess(exePID,exeShortName,exeLongName,exeCommandLine,exeMemory,exeMaxMemory)
FOR EACH STRING sLista_processos_linha OF sLista_processos SEPAREE BY CR
nPosicao is int=TVT_PROCESSOS.AddLine()
programa_memoria is string=ExtractString(sLista_processos_linha, 2, TAB)
versao is string=ExeInfo(exeVersion,ExtractString(sLista_processos_linha, 3, TAB))
id is int=ExtractString(sLista_processos_linha, 1, TAB)
diretorio is string=fExtractPath(ExtractString(sLista_processos_linha, 3, TAB), fDrive+fDirectory)
sComando_linha is string=fExtractPath(ExtractString(sLista_processos_linha, 3, TAB), fDrive+fDirectory)
comando_linha is string=ExtractString(sLista_processos_linha, 4, TAB)
memoria
amarildo
04 Sep. 2019
Video Windows Processos
https://youtu.be/7fMt3B5D6as

https://windevdesenvolvimento.blogspot.com/2019/05/dicas-2114-windev-webdev-mobile-windows.html

// Video sobre Processos Windows, como terminar processos, tabela e grafico
amarildo
18 May 2019
Novo Exemplo Lista Processos Tabela e Grafico
Novo Exemplo Lista Processos Tabela e Grafico

s_teste is string=ExeListProcess(exePID,exeShortName,exeLongName,exeMemory)
TableDeleteAll(TABLE_processos1)
FOR EACH STRING s_nome_arquivo OF s_teste SEPAREE BY CR
s_exepid is string=""
s_exeshortname is string=""
s_exelongname is string=""
s_exememory is string=""
n_contador is int=0
FOR EACH STRING s_colunas OF s_nome_arquivo SEPAREE BY TAB
n_contador++
SWITCH n_contador
CASE 1
s_exepid=s_colunas
CASE 2
s_exeshortname=s_colunas
CASE 3
s_exelongname=s_colunas
CASE 4
s_exememory=s_colunas
OTHER CASE
END
END TableAddLine(TABLE_processos1,s_exepid,s_exeshortname,s_exelongname,s_exememory)
END
TableSort(TABLE_processos1,"-COL_Exememory")
grDraw(CHART_processos1)


//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/08/curso-windev-funcoes-exe-windows-008_13.html
https://www.youtube.com/watch?v=k26SDt9JNCc



De matos AMARILDO
15 Aug. 2016
Exemplo ExeListProcess
Exemplo ExeListProcess

ListAdd(LIST_processo,ExeListProcess(exePID,exeLongName,exeMemory))
ListeAjoute(LIST_processo,ExeListeProcessus(exePID,exeNomLong,exeMémoire))

//exePID - identificador aplicacao // identifier application // l'application d'identificateur
//exeLongName - caminho do aplicativo // application path // chemin d'application
//exeMemory - Quantidade de memoria consumida // memory amount consumed// quantité de mémoire consommée
// exeCommandLine - linha de comando // Command Line // ligne de commande
//exeMaxMemory - quantidade maxima de memoria consumida // Maximum amount of memory consumed
// Montant maximum de mémoire consommée
//exeShortName - nome aplicativo // application name// nom de l'application

//Blog Com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/08/curso-windev-funcoes-exe-windows-008.html
https://www.youtube.com/watch?v=qPyq9sXmRkE
De matos AMARILDO
13 Aug. 2016

Last update: 05/26/2022

Send a report | Local help