Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIn32 SEH is unavoidable #2

Open
DBJDBJ opened this issue Jan 2, 2022 · 0 comments
Open

WIn32 SEH is unavoidable #2

DBJDBJ opened this issue Jan 2, 2022 · 0 comments

Comments

@DBJDBJ
Copy link

DBJDBJ commented Jan 2, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant