Results 1 to 3 of 3

Thread: How to get process details?

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2012
    Posts
    35

    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.

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: How to get process details?

    You got code to post so we can see what you really want?

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2012
    Posts
    35

    Re: How to get process details?

    Quote Originally Posted by SamOscarBrown View Post
    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
  •  



Click Here to Expand Forum to Full Width