Announcement

Collapse
No announcement yet.

FUNCTION NtStatusError(NtStatErrora AS LONG,.....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • FUNCTION NtStatusError(NtStatErrora AS LONG,.....

    Mike Mattias wrote this function many years ago. I use it all of the time to find error codes definitions, But I have never figured out how to invoke it in runtime. Does any one know how to use this function as part of an error trap so I can see what routine caused the error? These are always severe errors where the whole program crashes. The debugger will list the severe error but never tells you where it came from.
    ex.
    Exception: Unknown error, code = &HC000041DSeverity: Error Error Code: &HC000041D
    End Debug at 8:21:20 PM on 4/5/2021

    The function:
    FUNCTION NtStatusError(NtStatErrora AS LONG, ALARMsectTexta AS STRING, PathRootaa AS STRING ) AS STRING
    is attached.

  • #2
    Thanks for the credit (?) but I never wrote that.

    I have used this for years for system error messages... and I believe I have posted it here here before.

    This one has been updated to work with either SBCS or Wide Char apps and also has the internet extended errors included. .

    FWIW, ISTR a lot of those "NT*" functions were actually not part of the official Win API and therefore were not supported.

    sysemt.inc
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Thanks Mike. You're welcome for the credit. I stand corrected though. And thanks for the in-depth explanation.

      Comment

      Working...
      X