CloseHandle
-
Hey Guys I am using closehandle to close a file handle and it returns FALSE so therefore means its failed but when i do get last error it says operation completed successsfully. Any ideas? Im don't think a later function overwrites the lasterror either since it is only closing a handle. I might be wrong Peter
-
Hey Guys I am using closehandle to close a file handle and it returns FALSE so therefore means its failed but when i do get last error it says operation completed successsfully. Any ideas? Im don't think a later function overwrites the lasterror either since it is only closing a handle. I might be wrong Peter
Use
GetLastError()
andFormatMessage()
. If you want, just make your code display the result ofGetLastError()
and use Error Lookup to see the corresponding message. Michel It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard -
Hey Guys I am using closehandle to close a file handle and it returns FALSE so therefore means its failed but when i do get last error it says operation completed successsfully. Any ideas? Im don't think a later function overwrites the lasterror either since it is only closing a handle. I might be wrong Peter
Was it a successfully opened handle? Nish
Check out last week's Code Project posting stats presentation from :- http://www.busterboy.org/codeproject/ Feel free to make your comments.
-
Was it a successfully opened handle? Nish
Check out last week's Code Project posting stats presentation from :- http://www.busterboy.org/codeproject/ Feel free to make your comments.
Yeah, and i used it to write to a file with no problems. I also formated the message and viewed the last error and it says operation completed successfully Peter