Re: Run App only once
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Sun, 22 Apr 2007 20:29:32 -0400
The code was not correct and could not work right in any version of Win32. Any opinions
that it could work are merely delusional rantings. All the OP claims is that nobody saw
the actual, fundamental, bug occur in ten years, so therefore it must not exist. I,
however, have not only seen it, I've demonstrated why it is a bug, and why the code is
wrong. Therefore, any views that the FindWindow method will stop multiple instances from
occurring is erroneous. Furthermore, trying to act upon the window which may not yet
exist and expecting something will happen is depending upon impossible behavior (remember
that my article points out that the code only works because you are NOT trying to act upon
the window of the other app that is still coming up but hasn't created its window yet).
But I agree: taking incorrect code and modifying it and expecting it will work is relying
on too many optimistic scenarios.
joe
On Mon, 16 Apr 2007 09:21:45 -0700, "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx> wrote:
Joseph M. Newcomer [MVP]
"GT" <ContactGT_remove_@xxxxxxxxxxx> wrote in message
news:46232bc0$0$26163$c3e8da3@xxxxxxxxxxxxxxxxxxxx
the above code is lifted from an application and has been working
perfectly for over 10 years. However, when I inserted the code into my
application and changed the register and findwindow text label, it does't
work in my app! Strange.
This is what differs correct code from the code that just happened to work
in some particular conditions and some particular OS.
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- Run App only once
- From: GT
- Re: Run App only once
- From: Joseph M . Newcomer
- Re: Run App only once
- From: GT
- Re: Run App only once
- From: Alexander Grigoriev
- Run App only once
- Prev by Date: Re: Run App only once
- Next by Date: Re: _DEBUG_NEW VC6 -> VC2005 ?
- Previous by thread: Re: Run App only once
- Next by thread: Does warning RC4005 matter?
- Index(es):
Relevant Pages
|