Results 1 to 3 of 3

Thread: [PID] Process IDs

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    1

    Exclamation

    How can you find out what the process ID of a program is
    from within a VB6 program running in a Windows NT
    environment. I am writing a VB program that will need
    to find out how long certain processes are running and
    if they have been runnning too long I need to get their
    pid's and kill those processes.

    Please help!
    Manuel

  2. #2
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184
    You might find a suitable API code here: http://www.mvps.org/vb/ (perhaps Shell32).

    I think using :
    Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long will give the current PID, so may have to use another API call to loop through all open processes.

    VB6 Enterpise has a Process Viewer tool, can this be used in some way to return all open Process PIDs? I will look into it.

  3. #3
    Addicted Member
    Join Date
    Feb 2000
    Posts
    224
    If you can't pronounce my name, call me GURU

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width