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