Re: SetMenu & GetLastError
From: Gary Chanson (gchanson_at_No.Spam.TheWorld.net)
Date: 07/20/04
- Next message: che zhu lin: "Re: what is a "computer-based training window"?"
- Previous message: Tassilo: "Re: SetMenu & GetLastError"
- In reply to: Tassilo: "Re: SetMenu & GetLastError"
- Next in thread: Tassilo: "Re: SetMenu & GetLastError"
- Reply: Tassilo: "Re: SetMenu & GetLastError"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Jul 2004 20:13:00 -0400
"Tassilo" <nix@nothing.net> wrote in message
news:OKze6JebEHA.2908@TK2MSFTNGP10.phx.gbl...
> Well, thank you for the simple answer !
> It is perfectly clear that the value of GetLastError() is undefined if
> everything seems to be ok (and the function didn't return an error). But
> inside SetMenu, there is something setting a new error value on the error
> stack (in the case mentioned in the original post), and I would like to
know
> why.
>
> Can you tell me perhaps if it is for sure, that the value of GetLastError
is
> undefined as long as a function returns success ? I can't find such a
> statement in the MSDN, so I am a bit sceptical about this.
From MSDN:
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error
information, call GetLastError.
The value of GetLastError is not defined for the success case. This is
the way MSDN always documents such cases.
It's irrelevant that a low level function might return an error as long
as it doesn't prevent SetMenu from succeeding.
-- -GJC [MS Windows SDK MVP] -Software Consultant (Embedded systems and Real Time Controls) - http://www.mvps.org/ArcaneIncantations/consulting.htm -gchanson@mvps.org
- Next message: che zhu lin: "Re: what is a "computer-based training window"?"
- Previous message: Tassilo: "Re: SetMenu & GetLastError"
- In reply to: Tassilo: "Re: SetMenu & GetLastError"
- Next in thread: Tassilo: "Re: SetMenu & GetLastError"
- Reply: Tassilo: "Re: SetMenu & GetLastError"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|