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
  1. Home
  2. General Programming
  3. C#
  4. How to get the instance of a running process ?

How to get the instance of a running process ?

Scheduled Pinned Locked Moved C#
tutorialquestion
5 Posts 5 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.
  • M Offline
    M Offline
    Mr Perfect
    wrote on last edited by
    #1

    I want to get an instance of a running process and thruogh that instance I want to call its members in my application. Noor

    S S W M 4 Replies Last reply
    0
    • M Mr Perfect

      I want to get an instance of a running process and thruogh that instance I want to call its members in my application. Noor

      S Offline
      S Offline
      Sandeep Akhare
      wrote on last edited by
      #2

      Play with System.Diagnostics i think you will get from this namespace

      Thanks and Regards Sandeep

      1 Reply Last reply
      0
      • M Mr Perfect

        I want to get an instance of a running process and thruogh that instance I want to call its members in my application. Noor

        S Offline
        S Offline
        Sven Cipido
        wrote on last edited by
        #3

        You could use the mutex object. An example to check if you have already running an instance of your application can be found here : http://blog.svencipido.be/Blog/PermaLink,guid,49328c9e-45d5-4dc2-be61-081f13bf4f95.aspx

        1 Reply Last reply
        0
        • M Mr Perfect

          I want to get an instance of a running process and thruogh that instance I want to call its members in my application. Noor

          W Offline
          W Offline
          wasife
          wrote on last edited by
          #4

          You can get the instance of currently running thread through System.Threading.Thread.CurrentThread but i dont think you can call its members a thread may contain several classes, functions etc. So i am not very much optimistic. You can dig deeper into that... Regards, Wasif Ehsan.

          1 Reply Last reply
          0
          • M Mr Perfect

            I want to get an instance of a running process and thruogh that instance I want to call its members in my application. Noor

            M Offline
            M Offline
            Martin 0
            wrote on last edited by
            #5

            Hello!

            wrote:

            I want to get an instance of a running process

            using System.Diagnostics; Your process would be: Process myprocess = Process.GetCurrentProcess() Process where you know the name: Process[] someprocesspername = Process.GetProcessesByName("xxx");

            wrote:

            and thruogh that instance I want to call its members in my application

            Don't think this is posible that way! All the best, Martin

            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