AFAIK, the GetLastError is only set by an API call that fails, there is
no guarantee that a successfull API call resets the value to 0.  So
you should only check the GetLastError value if an API call actually
returned an error.   If I understand your mail correctly it seems
that you are calling GetLastError after every call to check if
something went wrong, which is not the way it works.


-----Original Message-----
From: kevin lyda [mailto:kevin@ie.suberic.net]
Sent: Wednesday, March 31, 2004 12:00 PM
To: mingw-users@lists.sourceforge.net
Subject: Re: [Mingw-users] GetLastError...

On Wed, Mar 31, 2004 at 05:52:00PM +0800, Luke Dunstan wrote:
> I haven't looked at what the cause might be, but my first thought is: so
> what? AFAIK this should have no effect on (correct) programs. You can call
> SetLastError(0) but you shouldn't need to.

the problem is that after every system call it continues to do that.


kevin@ie.suberic.net  ~  Would you put on your resume that 3,000 people
                         died due to your failure while you were in charge?

                         So why is George Bush?

This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
MinGW-users mailing list

You may change your MinGW Account Options or unsubscribe at: