Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Please tell me how to use the API Function to get the ProcessId of the appointed process

Please tell me how to use the API Function to get the ProcessId of the appointed process

Scheduled Pinned Locked Moved Visual Basic
jsontutorial
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Billypon
    wrote on last edited by
    #1

    Please tell me how to use the API Function to get the ProcessId of the appointed process

    Richard Andrew x64R D 2 Replies Last reply
    0
    • B Billypon

      Please tell me how to use the API Function to get the ProcessId of the appointed process

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      DWORD ProcessId = GetCurrentProcessId(); ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸

      B 1 Reply Last reply
      0
      • Richard Andrew x64R Richard Andrew x64

        DWORD ProcessId = GetCurrentProcessId(); ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸

        B Offline
        B Offline
        Billypon
        wrote on last edited by
        #3

        No! It's wrong. I want to get the ProcessId of the appointed process,no current ProcessId

        Richard Andrew x64R 1 Reply Last reply
        0
        • B Billypon

          No! It's wrong. I want to get the ProcessId of the appointed process,no current ProcessId

          Richard Andrew x64R Offline
          Richard Andrew x64R Offline
          Richard Andrew x64
          wrote on last edited by
          #4

          This might be what you are looking for: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/taking_a_snapshot_and_viewing_processes.asp ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸

          B 1 Reply Last reply
          0
          • B Billypon

            Please tell me how to use the API Function to get the ProcessId of the appointed process

            D Offline
            D Offline
            Duncan Edwards Jones
            wrote on last edited by
            #5

            use the "process" class instead of the API

            Dim procs() AS System.Diagnostics.process = System.Diagnostics.process.GetprocessesByName("notepad")

            Trace.WriteLine(procs(0).Id)

            '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

            1 Reply Last reply
            0
            • Richard Andrew x64R Richard Andrew x64

              This might be what you are looking for: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/taking_a_snapshot_and_viewing_processes.asp ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸

              B Offline
              B Offline
              Billypon
              wrote on last edited by
              #6

              Oh! Thanks eveybody! It has been done!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups