Solved

Processes in NT server

Posted on 2000-04-12
2
140 Views
Last Modified: 2010-05-02
How can I get informatio about current running processes ?
How can I End a process ?

I need the exact API from VB
0
Comment
Question by:nimrodg080397
2 Comments
 
LVL 1

Expert Comment

by:Gotcha007
Comment Utility
This may help you for listing all the process :


Declare Function GetParent Lib "user32" (ByVal hWnd As Long) As Long

Declare Function GetWindow Lib "user32" (ByVal hWnd As Long, ByVal wCmd As Long) As Long

Declare Function GetWindowTextA Lib "user32" (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long

Declare Function GetWindowTextLengthA Lib "user32" (ByVal hWnd As Long) As Long


And in a fonction :

GW_HwndFirst = 0
GW_HwndNext = 2

CurrWnd = GetWindow(Form1.hWnd, GW_HwndFirst)

While CurrWnd <> 0
    Parent = GetParent(CurrWnd)
    Length = GetWindowTextLengthA(CurrWnd)
    TaskName = Space$(Length + 1)
    Length = GetWindowTextA(CurrWnd, TaskName, Length + 1)
    TaskName = Left$(TaskName, Len(TaskName) - 1)
    If Length <> 0 Then
        ArraySize = ArraySize + 1
        ReDim Preserve TaskListArray$(ArraySize)
        TaskListArray$(ArraySize) = TaskName
    End If
    CurrWnd = GetWindow(CurrWnd, GW_HwndNext)
    DoEvents
Wend
0
 
LVL 1

Accepted Solution

by:
detiege earned 125 total points
Comment Utility
Got on this page to find what's you want.

I hope that's can help you !


List of processes: http://support.microsoft.com/support/kb/articles/q187/9/13.asp?FR=0

Terminate a process: http://www.thescarms.com/VBasic/StopProcess.htm
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now