flat assembler
Message board for the users of flat assembler.

Index > Windows > How to make only one instance of a application

Author
Thread Post new topic Reply to topic
marcelo.sabino



Joined: 10 Mar 2006
Posts: 4
marcelo.sabino
Hi all,
How to make only one instance of a application? For example using createwindowex....

thanx

Marcelo Sabino
Post 26 Apr 2007, 14:24
View user's profile Send private message Reply with quote
Ehtyar



Joined: 26 Sep 2006
Posts: 51
Ehtyar
I know it's a cliche, but google IS your friend. This is a gesture of good faith.

Ehtyar.
Post 26 Apr 2007, 20:54
View user's profile Send private message Reply with quote
rurig4n



Joined: 26 Jul 2012
Posts: 1
rurig4n
in fasm?
Post 26 Jul 2012, 20:35
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
you can manually check running processes. if you are really concerned then you could do an integrity check on the executable file.

but what if someone changed a byte? obviously this doesn't work. however you can enforce your app to run only from a specific folder then on startup check running processes if any of the said has the same path.
Post 26 Jul 2012, 21:22
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
the mutex one looks easy and sufficient enough
Post 26 Jul 2012, 21:30
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1416
Location: Toronto, Canada
AsmGuru62
@marcelo.sabino: use a named MUTEX, like Ehtyar mentioned.
Post 26 Jul 2012, 21:31
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.