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. C / C++ / MFC
  4. Mutex

Mutex

Scheduled Pinned Locked Moved C / C++ / MFC
c++
3 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.
  • A Offline
    A Offline
    ashokvishnu
    wrote on last edited by
    #1

    We have an application, say A which is used to start some other applications (B,C,D). That is when A starts, it also starts B,C and D. Now if any of B,C or D has been started manually, A should not start these applications. I would like to know whether we can implement such a scenario using mutex.

    C++beginer

    _ M 2 Replies Last reply
    0
    • A ashokvishnu

      We have an application, say A which is used to start some other applications (B,C,D). That is when A starts, it also starts B,C and D. Now if any of B,C or D has been started manually, A should not start these applications. I would like to know whether we can implement such a scenario using mutex.

      C++beginer

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      Yes you can use a named Mutex. If the creation fails with already exists then don't start the app. You will have to use separate names for each app (B, C and D).

      « Superman »

      1 Reply Last reply
      0
      • A ashokvishnu

        We have an application, say A which is used to start some other applications (B,C,D). That is when A starts, it also starts B,C and D. Now if any of B,C or D has been started manually, A should not start these applications. I would like to know whether we can implement such a scenario using mutex.

        C++beginer

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        Search the site for "single instance"

        --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

        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