-
Sep 19th, 2012, 11:36 AM
#1
Thread Starter
Member
How to get process details?
In my app, I can get a list of process names using some API functions.
But some process appears only as "Rundll32.exe".
How can I get more details about this kind of process (i.e. target dll, command line, etc.)
Thanks.
-
Sep 19th, 2012, 01:24 PM
#2
Re: How to get process details?
You got code to post so we can see what you really want?
-
Sep 19th, 2012, 01:58 PM
#3
Thread Starter
Member
Re: How to get process details?
Originally Posted by SamOscarBrown
You got code to post so we can see what you really want?
Ok.
With the code below you can show the name of the processes running on Windows in a RichTextBox (rtb1).
If you run timedate.cpl and mmsys.cpl for example and run the code again you will see two Rundll32 entries, but no information about cpl files.
That's the information I need. Any help?
Code:
Public Sub ShowProcesses()
Dim hSnapshot As Long
Dim uProcess As PROCESSENTRY32
hSnapshot = apiCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0&)
If hSnapshot = -1 Then Exit Sub
rtb1.Text = ""
uProcess.dwSize = Len(uProcess)
If apiProcess32First(hSnapshot, uProcess) = 1 Then
Do
rtb1.Text = rtb1.Text + LCase(Left(uProcess.szExeFile, InStr(1, uProcess.szExeFile, vbNullChar) - 1)) + vbCrLf
Loop While apiProcess32Next(hSnapshot, uProcess)
End If
Call apiCloseHandle(hSnapshot)
End Sub
Last edited by jalexm; Sep 19th, 2012 at 02:05 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|