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. The one and only instance

The one and only instance

Scheduled Pinned Locked Moved C / C++ / MFC
comhelpquestion
2 Posts 2 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
    Bill Wilson
    wrote on last edited by
    #1

    I have a full com serverwith three interfaces. A different client will access each of the three interfaces at overlapping times. I only want one instance of the .EXE to be running. As each of the client apps performs its _CreateInstance, a new instance of the app is launched. Giving me three altogether. Is this possible? How is it done? I am familiar with the technique of using FindWindow and setting the focus to the already existing window to ensure only one copy of an app runs at a time. I don't think it applies here because 1) No window, the client apps are NT services. and 2) I don't think the interface would be attached if I simply re-directed the focus and exited. Can anyone help, please? Thanks for the help, Bill

    T 1 Reply Last reply
    0
    • B Bill Wilson

      I have a full com serverwith three interfaces. A different client will access each of the three interfaces at overlapping times. I only want one instance of the .EXE to be running. As each of the client apps performs its _CreateInstance, a new instance of the app is launched. Giving me three altogether. Is this possible? How is it done? I am familiar with the technique of using FindWindow and setting the focus to the already existing window to ensure only one copy of an app runs at a time. I don't think it applies here because 1) No window, the client apps are NT services. and 2) I don't think the interface would be attached if I simply re-directed the focus and exited. Can anyone help, please? Thanks for the help, Bill

      T Offline
      T Offline
      Todd Smith
      wrote on last edited by
      #2

      Try searching http://discuss.microsoft.com/archives/atl.html for singleton

      Todd Smith

      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