O'Reilly logo

Windows® via C/C++, Fifth Edition by Christophe Nasarre, Jeffrey Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizing All Problem Reports Within a Process

Sometimes, you might want your application to perform custom error reporting by calling various WER functions. Here are three examples of when you want to take advantage of this:

  • You are writing your own unhandled exception filter.

  • You want your application to generate a report even though an unhandled exception hasn’t occurred.

  • You want to add more information to the report.

A simple way to customize all problem reports is to indicate what data blocks or arbitrary files you want added to every problem report generated for your process. To add an arbitrary data block, you simply call

HRESULT WerRegisterMemoryBlock(PVOID pvAddress, DWORD dwSize);

You pass the address of your memory block for the pvAddress ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required