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. change single instance app to multi instance?

change single instance app to multi instance?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 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.
  • T Offline
    T Offline
    ThinkingPrometheus
    wrote on last edited by
    #1

    hiho@ll i have a prog (already compiled (.exe) and i don't have the source) i want this prog, which only runs as single instance, to have it run more instances is this possible? if yes, how? i had 2 ideas both i don't know how to do: 1. change the prog itself, that it can run more instances (well, how?) 2. change some OS settings, if the prog already runs, so that if the program checks if there is already a running instance, the windows tells the prog "no you'r alone" (how?) thx@ll

    J 1 Reply Last reply
    0
    • T ThinkingPrometheus

      hiho@ll i have a prog (already compiled (.exe) and i don't have the source) i want this prog, which only runs as single instance, to have it run more instances is this possible? if yes, how? i had 2 ideas both i don't know how to do: 1. change the prog itself, that it can run more instances (well, how?) 2. change some OS settings, if the prog already runs, so that if the program checks if there is already a running instance, the windows tells the prog "no you'r alone" (how?) thx@ll

      J Offline
      J Offline
      John R Shaw
      wrote on last edited by
      #2

      ThinkingPrometheus wrote: is this possible? unfortunately yes. BUTT, Most people who want to stop multiple instances (of their program), have a good reason for doing so. INTP "The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes." Andrew W. Troelsen

      T 1 Reply Last reply
      0
      • J John R Shaw

        ThinkingPrometheus wrote: is this possible? unfortunately yes. BUTT, Most people who want to stop multiple instances (of their program), have a good reason for doing so. INTP "The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes." Andrew W. Troelsen

        T Offline
        T Offline
        ThinkingPrometheus
        wrote on last edited by
        #3

        ;-) i know there is a reason but not everytime! sometimes there are progs, which have this feature just to have it do you know how it works? if yes, how? thx

        L 1 Reply Last reply
        0
        • T ThinkingPrometheus

          ;-) i know there is a reason but not everytime! sometimes there are progs, which have this feature just to have it do you know how it works? if yes, how? thx

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

          Without the source code I would not do it, because it requires reverse engineering at least part of its binaray code (which is normaly illegal). In Windows (code wise): 1) Win16: You just needs to check the hPrevInstance handle. 2) Win32: You call CreateMutex() and then call GetLastError(). In both cases, you need to find where the check is ocurring, in the binary, and change the result. So yes I know how it works and no I can not tell you how to do it. Signed: John R. Shaw P.S. Some thing is wrong with CP cookies again, it realy is me.

          T 1 Reply Last reply
          0
          • L Lost User

            Without the source code I would not do it, because it requires reverse engineering at least part of its binaray code (which is normaly illegal). In Windows (code wise): 1) Win16: You just needs to check the hPrevInstance handle. 2) Win32: You call CreateMutex() and then call GetLastError(). In both cases, you need to find where the check is ocurring, in the binary, and change the result. So yes I know how it works and no I can not tell you how to do it. Signed: John R. Shaw P.S. Some thing is wrong with CP cookies again, it realy is me.

            T Offline
            T Offline
            ThinkingPrometheus
            wrote on last edited by
            #5

            ok i thought it would work something like: get application handle, use some functions, ... because i thought you can nearly change everything if you have the application handle didn't really thought about reverse engineering cause i don't know how it works ;-) another question: not really about this topic, but it seems you know reverse engineering i was asking myself if it's possible to encrypt an exe i mean, wouldn't it be impossible to reverse engineer a application if the executing file is encrypted? i know it's also a performance question, but if i don't want my app to be reverse engineered, is't it possible to make it impossible ;-) regards

            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