Re: New HIDE (HLA IDE) version is available
From: f0dder (f0dder_spicedham_at_flork.dk)
Date: 08/25/04
- Next message: Randall Hyde: "Re: ADK/HLA v2.0 Update"
- Previous message: The Wannabee: "Re: New HIDE (HLA IDE) version is available"
- In reply to: The Wannabee: "Re: New HIDE (HLA IDE) version is available"
- Next in thread: The Wannabee: "Re: New HIDE (HLA IDE) version is available"
- Reply: The Wannabee: "Re: New HIDE (HLA IDE) version is available"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 25 Aug 2004 16:42:49 +0200
The Wannabee wrote:
> I no longer remember where I read this, and it might be I am
> mistaken, but the reason, I think, was that in some rare cases the
> getmessage function return 0 to indicate failure (BUG). And sometimes
> return a non null error code. But anyway, I never actually had any
> problems that I know of either way. If you test for less then 1, or 0
> its is possible that the code could run into the few (buggy) states
> that return 0 = &FALSE to indicate failure. However, this is at least
> 5 years old info.
>
I'm afraid you didn't understand what I wrote :)
See, right now you're considering that a return-value of 1 is success,
keep on going, while everything else is an error. It's okay to treat
"0 and everything less than zero" as a reason to quit your program
(0 means WM_QUIT, less than zero means error).
However, your "success is equal to 1" would also abort on return
values *larger* than 1 - which is not good. Consider that in C/C++
0 is false and everything else is true. Windows is written mostly in
C, with a little C++ and assembly. Thus nothing stops parts of
windows from returning "5" to indicate success, if it feels like it...
So, better to use a (*signed*!) less-than-1 to be bulletproof.
> And I have never ran into this problem.
>
And there's a good chance you never will. But do you remember what
happened with dirty written apps that didn't return a proper value
from their dlgprocs? Worked fine on 9x in most cases, screwed up
on NT in most cases.
> Unless I am totally mistaken, I read this info, in MSDN
> Knowledgebase, while going off on one of my Win32.hlp file
> adventures using the <--- ---> page keys :-)))
Hehe, go get the PlatformSDK already ;)
- Next message: Randall Hyde: "Re: ADK/HLA v2.0 Update"
- Previous message: The Wannabee: "Re: New HIDE (HLA IDE) version is available"
- In reply to: The Wannabee: "Re: New HIDE (HLA IDE) version is available"
- Next in thread: The Wannabee: "Re: New HIDE (HLA IDE) version is available"
- Reply: The Wannabee: "Re: New HIDE (HLA IDE) version is available"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|