Solved

Processes in NT server

Posted on 2000-04-12
2
142 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel Vlookup to move data back to source. 4 92
SSRS expression Issue finding a string 10 79
Saving history changes to sub form 4 43
Visual Studio 2005 text editor 10 39
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

821 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