on 05-22-2015 7:04 PM
Does anyone know of an example of getting the Application Task description from the Applications tab in the Task Manager?
As always thank you for your time!
Kyle
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It looks like it is "File Description" from the exe file version info. I have an example that shows how to extract version info:
Hi,
There in an example comes with pb 12.6 code Examples.
See: Functions-- > External --- > Windows SDK Functions.
Open this example, and see the 'Tasks' button.
I hope it helps you.
Yosi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The following will return the exe filename of all the running processes. You should be able to use this as a jumping off point to return more information about the processes.
First you need this structure:
type processentry32 from structure
unsignedlong dwsize
unsignedlong cntusage
unsignedlong th32processid
unsignedlong th32defaultheapid
unsignedlong th32moduleid
unsignedlong cntthreads
unsignedlong th32parentprocessid
unsignedlong pcpriclassbase
unsignedlong dwflags
character szexefile[260]
end type
Then these external function declarations:
Function ulong CreateToolhelp32Snapshot ( &
ulong dwFlags, ulong th32ProcessID ) Library "kernel32.dll"
Function boolean CloseHandle ( &
ulong hObject ) Library "kernel32.dll"
Function boolean Process32First ( &
ulong hSnapshot, Ref processentry32 lppe &
) Library "kernel32.dll" Alias For "Process32FirstW"
Function boolean Process32Next ( &
ulong hSnapshot, Ref processentry32 lppe &
) Library "kernel32.dll" Alias For "Process32NextW"
Then this code:
Constant ULong TH32CS_SNAPPROCESS = 2
PROCESSENTRY32 lstr_pe32
ULong lul_SnapShot
String ls_ExeFile
lul_SnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)
If lul_SnapShot > 0 Then
lstr_pe32.dwSize = 36 + (260 * 2)
If Process32First(lul_SnapShot, lstr_pe32) Then
Do
If lstr_pe32.th32ProcessID > 0 Then
ls_ExeFile = String(lstr_pe32.szExeFile)
End If
Loop While Process32Next(lul_SnapShot, lstr_pe32)
End If
CloseHandle(lul_SnapShot)
End If
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.