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. Stop Multiple Instances

Stop Multiple Instances

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • P Offline
    P Offline
    Peter Liddle
    wrote on last edited by
    #1

    Hey Guys How do i check for whether an instance of my program is already running so that i can then stop another one being started. Cheers Peter

    L M N R 4 Replies Last reply
    0
    • P Peter Liddle

      Hey Guys How do i check for whether an instance of my program is already running so that i can then stop another one being started. Cheers Peter

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

      There are many examples here at cp.com. Just take a look at the articles and use the search engine :) regards

      1 Reply Last reply
      0
      • P Peter Liddle

        Hey Guys How do i check for whether an instance of my program is already running so that i can then stop another one being started. Cheers Peter

        M Offline
        M Offline
        Mazdak
        wrote on last edited by
        #3

        I think one way is to use FindWindow() and use your window class,if it find it then do not attempt your application to proceed. Mazy "The path you tread is narrow and the drop is shear and very high, The ravens all are watching from a vantage point near by, Apprehension creeping like a choo-train uo your spine, Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd

        1 Reply Last reply
        0
        • P Peter Liddle

          Hey Guys How do i check for whether an instance of my program is already running so that i can then stop another one being started. Cheers Peter

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          Short Solution – Use a mutex Long Solution – Joe Newcomer’s brilliant article


          The posting stats are now in PDF:- http://www.busterboy.org/codeproject/ Feel free to make your comments. Updated - May 04th, Saturday

          1 Reply Last reply
          0
          • P Peter Liddle

            Hey Guys How do i check for whether an instance of my program is already running so that i can then stop another one being started. Cheers Peter

            R Offline
            R Offline
            Ravi Bhavnani
            wrote on last edited by
            #5

            See this article. /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

            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