Skip to content

WIn32 SEH is unavoidable #2

@DBJDBJ

Description

@DBJDBJ

SEH: There is no way around it.

"...The structured exception handling and termination handling mechanisms are integral parts of the system; they enable the system to be robust. You can use these mechanisms to create consistently robust and reliable applications..."

In case one has to deliver Windows professional solutions, the precondition of using this lib is: this lib must NOT throw C++ exceptions.

  1. For some reason, MS DOCS are economical with the truth but one has no other source of info.
  2. /kernel switch is the "hidden key". Start here please.
    1. MS STL works quite brilliantly with the /kernel switch.
    2. The resulting code is smaller and faster vs. not using the /kernel switch
    3. We deliver every app built and developed using the /kernel switch
    4. That confuses Windows C++ users and very often renders them in a state of denial; at first.

WIN32

  1. Written in ANSI C, aka "C API"
  2. Was not designed to use C++ exceptions.
  3. Uses Windows native exceptions; aka SEH
    6. That means: Windows native core DLL's do throw SEH exceptions.
    7. That means: you catch software AND hardware errors in your code by processing SEH exceptions.
  4. App must at the top-level catch any possible SEH exceptions and create a minidump file on that occasion.
    1. Use Visual Studio to open the dmp file. It will allow you to pinpoint the source location where an error has happened. Like e.g. "stack overflow".

ps: Above predates WER, DbgHelp and other complications added by the Vista disaster on top of SEH. Those are rabbit holes. Be careful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions