Solved

Processes in NT server

Posted on 2000-04-12
2
144 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

710 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