R
roman.muntyanu
Hi All,
I have a program that can be started as windows service or as an
windows app.
I need to avoid starting this program as an application if it is
already started as a win service.
In code when program starts as a win service I create named mutex.
Then if user tries to start program as a win application I am checking
if Mutex with the same name exists already and exit program if Mutex
found.
My problem is that Mutex that was created when program started as win
service cannot be found when program starting as a win application.
If I try to run program as a win application twice during second
attempt Mutex is found.
I would appreciate if anyone can point me how to fix this.
Thanks,
Roman
I have a program that can be started as windows service or as an
windows app.
I need to avoid starting this program as an application if it is
already started as a win service.
In code when program starts as a win service I create named mutex.
Then if user tries to start program as a win application I am checking
if Mutex with the same name exists already and exit program if Mutex
found.
My problem is that Mutex that was created when program started as win
service cannot be found when program starting as a win application.
If I try to run program as a win application twice during second
attempt Mutex is found.
I would appreciate if anyone can point me how to fix this.
Thanks,
Roman