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 / C++ / MFC
  4. Some MFC Process Checking ???

Some MFC Process Checking ???

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++sysadmin
8 Posts 4 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.
  • A Offline
    A Offline
    Ariel
    wrote on last edited by
    #1

    Hi there, Some MFC Process Checking : 1. How can i check if a process is running in the same machine already ? (I mean i want to run the same process/App. only once in the machine - how can i check if the process is already running on the machine ?) 2. How can i do the same to check if the process is running in the network ? (I have a Lan Network of Lan and i want to check if the process/App. is already running on one of the machines (pc) is this possible ?) Thank you alot, Ariel.

    L L M 3 Replies Last reply
    0
    • A Ariel

      Hi there, Some MFC Process Checking : 1. How can i check if a process is running in the same machine already ? (I mean i want to run the same process/App. only once in the machine - how can i check if the process is already running on the machine ?) 2. How can i do the same to check if the process is running in the network ? (I have a Lan Network of Lan and i want to check if the process/App. is already running on one of the machines (pc) is this possible ?) Thank you alot, Ariel.

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      use EnumProcesses to get a list of running processes and look for the one you are interested in to detect on a network machine i would build a small messaging system into the app that responds to a ping on a specified port ... as the app starts up try pinging the port on each machine and see if you get response ... if not u night be able to assume it isnt running ... security allowing and all "every year we invent better idiot proof systems and every year they invent better idiots"

      A 1 Reply Last reply
      0
      • A Ariel

        Hi there, Some MFC Process Checking : 1. How can i check if a process is running in the same machine already ? (I mean i want to run the same process/App. only once in the machine - how can i check if the process is already running on the machine ?) 2. How can i do the same to check if the process is running in the network ? (I have a Lan Network of Lan and i want to check if the process/App. is already running on one of the machines (pc) is this possible ?) Thank you alot, Ariel.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Check this: The TList sample is a task list application. It is SDK based, but you gonna surely get good ideas from it for start!

        A 1 Reply Last reply
        0
        • L l a u r e n

          use EnumProcesses to get a list of running processes and look for the one you are interested in to detect on a network machine i would build a small messaging system into the app that responds to a ping on a specified port ... as the app starts up try pinging the port on each machine and see if you get response ... if not u night be able to assume it isnt running ... security allowing and all "every year we invent better idiot proof systems and every year they invent better idiots"

          A Offline
          A Offline
          Ariel
          wrote on last edited by
          #4

          Hi there, Firstly, Thank you very much for the answer. I would like 2 ask 2 more favours if you can : 1. Can you show me a small example of the EnumProcesses - how to catch the processes ? 2. On a Network if i'm actually running all the processes on a disk of one machine (which means i access \\AnotherComp\c\APP\MyApp.exe and thats the only place where the source is. Does this change the answer you gave for Network pinging ? Can you explain a bit more about it ? (Code headers will be apritiated here too) Thanks again for your answer, Ariel.

          L 1 Reply Last reply
          0
          • L Lost User

            Check this: The TList sample is a task list application. It is SDK based, but you gonna surely get good ideas from it for start!

            A Offline
            A Offline
            Ariel
            wrote on last edited by
            #5

            Thank you alot for this - i think its very usefull - i'll give it a better look soon. Just wanted to thank you, Ariel.

            L 1 Reply Last reply
            0
            • A Ariel

              Hi there, Firstly, Thank you very much for the answer. I would like 2 ask 2 more favours if you can : 1. Can you show me a small example of the EnumProcesses - how to catch the processes ? 2. On a Network if i'm actually running all the processes on a disk of one machine (which means i access \\AnotherComp\c\APP\MyApp.exe and thats the only place where the source is. Does this change the answer you gave for Network pinging ? Can you explain a bit more about it ? (Code headers will be apritiated here too) Thanks again for your answer, Ariel.

              L Offline
              L Offline
              l a u r e n
              wrote on last edited by
              #6

              when you run an app from a network drive the app gets copied to the local machine and executes there so it makes no difference where it is stored ... the tlist example is a good place to look at process enumeration ... there are several chat and ping utilities here also that will do all you need for network communication between machines :) "every year we invent better idiot proof systems and every year they invent better idiots"

              1 Reply Last reply
              0
              • A Ariel

                Hi there, Some MFC Process Checking : 1. How can i check if a process is running in the same machine already ? (I mean i want to run the same process/App. only once in the machine - how can i check if the process is already running on the machine ?) 2. How can i do the same to check if the process is running in the network ? (I have a Lan Network of Lan and i want to check if the process/App. is already running on one of the machines (pc) is this possible ?) Thank you alot, Ariel.

                M Offline
                M Offline
                markkuk
                wrote on last edited by
                #7

                > 1. How can i check if a process is running in the same machine already ? (I mean i want to run > the same process/App. only once in the machine - how can i check if the process is already > running on the machine ?) See: Q243953 - HOWTO: Limit 32-bit Applications to One Instance Using C++

                1 Reply Last reply
                0
                • A Ariel

                  Thank you alot for this - i think its very usefull - i'll give it a better look soon. Just wanted to thank you, Ariel.

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Glad it helped. :) Any time, Most welcome! :-D

                  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