Reading errno from msvcrt.dll
- Posted by Jason Gade <jaygade at yahoo.com> Feb 12, 2006
- 525 views
How do I get the value of errno and _doserrno from msvcrt.dll? I'm using define_c_var()(using "_errno" and "__doserrno") to get the addresses. I then use peek4s() to see what their values are. No matter what, I am getting 28075240 and 28071656 decimal respectively. These are invalid error numbers (I've verified that by using strerror). I know I am getting the error that I am intentionally causing because I can use perror to print the error message. I might not need this, but I would like to rely on more information than just -1 returned from an IO function. Anyone have experience in this?