Solved

Processes in NT server

Posted on 2000-04-12
2
143 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
ID: 2707299
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
ID: 2707315
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

830 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