Prevent launching more than one copy of an application using WinExec().
Posted on 2000-02-23
I have a 32 bit MFC application(e.g. MainProg.exe) which launches another executable(e.g. Download.exe) using WinExec() method. I would like to have multiple copy of my MainProg.exe but only one copy of Download.exe. The problem is everytime I start my MainProg.exe, it launches a copy of Download.exe. It does not matter whether I use a SDI, MDI, or Dialog Based application for Download.exe, my MainProg.exe always launches a copy of Download.exe using WinExec(). The same project in 16 bit works fine.
Is there a way to limit launching only one copy of Download.exe even I start multiple copis of MainProg.exe in Win32 platform? Thanks,