Jump to content
Tuts 4 You

Running same program many times difficult?


goatrance

Recommended Posts

Hello i have a little problem with 1 app

i can't start it more than 1 times

1st window start

2nd time start new window

and 2nd dont open just 1st window got top screen and nothing happes with second one

the app was written in C++

my qestion is where to start

^_^

Link to comment
Share on other sites

Hello i have a little problem with 1 app

i can't start it more than 1 times

1st window start

2nd time start new window

and 2nd dont open just 1st window got top screen and nothing happes with second one

the app was written in C++

my qestion is where to start

^_^

Check Taskmanager to see if the app is in memory. A lot of applications check to see if they are already in memory. It sounds like the app doesn't exit cleanly in the first instance and then it thinks it is still loaded in memory at which point it calls the exit procedure, which isn't working correctly in the first instance.

Maybe :D

Link to comment
Share on other sites

you ask about app bug or as i understand to run it in many instances(like use 4 cores for single threaded apps)

for this you can debug app and look where is checks if its already running.

start with openprocess,findwindow,openmutex.

Link to comment
Share on other sites

Probably as human says - best bet is if it creates a mutex (perhaps with app name or something) then subsequent apps check if it already exists.

I'd go with CreateMutex/OpenMutex.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...