Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Looking for werid Task Manager.

  • 23-05-2000 12:42am
    #1
    Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭


    Actually I'm looking for a proggie which will work on NT and will just dump the process list to a text file when it's run.

    Anyone know of a program like this?


Comments

  • Registered Users, Registered Users 2 Posts: 11,446 ✭✭✭✭amp


    dr watson??? probably not, maybe with some parameters or something.

    Lunacy Abounds! Play GLminesweeper!


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Someone mailed me this code (it's public domain)....
    Option Explicit
    Public Const TH32CS_SNAPPROCESS As Long = 2&
    Public Const MAX_PATH As Integer = 260
    Public Type PROCESSENTRY32
    dwSize As Long
    cntUsage As Long
    th32ProcessID As Long
    th32DefaultHeapID As Long
    th32ModuleID As Long
    cntThreads As Long
    th32ParentProcessID As Long
    pcPriClassBase As Long
    dwFlags As Long
    szExeFile As String * MAX_PATH
    End Type
    Public Declare Function CreateToolhelpSnapshot Lib "Kernel32" _
    Alias "CreateToolhelp32Snapshot" _
    (ByVal lFlags As Long, ByVal lProcessID As Long) As Long
    
    Public Declare Function ProcessFirst Lib "Kernel32" _
    Alias "Process32First" _
    (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
    
    Public Declare Function ProcessNext Lib "Kernel32" _
    Alias "Process32Next" _
    (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
    
    Public Declare Sub CloseHandle Lib "Kernel32" _
    (ByVal hPass As Long)
    
    Sub Main
        Dim hSnapShot As Long
        Dim uProcess As PROCESSENTRY32
        Dim r As Long
        hSnapShot = CreateToolhelpSnapshot(TH32CS_SNAPPROCESS, 0&)
        If hSnapShot = 0 Then
            Exit Sub
        End If
        uProcess.dwSize = Len(uProcess)
        r = ProcessFirst(hSnapShot, uProcess)
        Do While r
        
     Debug.Print uProcess.szExeFile
           
            r = ProcessNext(hSnapShot, uProcess)
        Loop
        Call CloseHandle(hSnapShot)
    
       		 
    End Sub
    

    Thing is I think it only works for W2K (I was tired when I was checking). Need to check the API's.

    *sigh* have to dig out MSDN



    [This message has been edited by Hobbes (edited 23-05-2000).]


  • Closed Accounts Posts: 91 ✭✭koloth


    w2k resource kit contains vbs files that list all process on local/remote systems running NT/Win2k. Can output to a text file.


Advertisement