Implement Persistent Storage for Dump Files (Compact 7)
3/12/2014
By default, Windows Embedded Compact Error Reporting creates dump files in reserved memory. The reserved memory is in RAM and will not persist if the device is turned off.
However, you can implement Error Reporting so that dump files persist in storage even after a complete power loss. In its default state, Error Reporting uses a number of functions to access the reserved memory. To implement persistent storage for your dump files, you override the default function pointers so they point to your OEM-specific Error Reporting support functions.
The following table shows Error Reporting function pointers and the default OS functions that are assigned to them.
Important
Your OEM-specific functions must not make use of any system functions, because that may make the system crash. Also, if you choose to override these functions, do not set dwNKDrWatsonSize, because dwNKDrWatsonSize reserves RAM only for the default implementation of these functions.
Function pointer | Default OS function | Description |
---|---|---|
pfnNKDrWatsonFlush |
Flushes the Error Reporting dump data to the underlying storage |
|
pfnNKDrWatsonClear |
Clears the Error Reporting dump storage by zeroing the whole Error Reporting dump area |
|
pfnNKDrWatsonRead |
Reads data from the Error Reporting dump area |
|
pfnNKDrWatsonWrite |
Writes data to the Error Reporting dump area |
|
None |
Retrieves the size of the dump area |
To implement persistent storage for dump files
Override the following function pointers so they point to your OEM-specific Error Reporting support functions:
- pfnNKDrWatsonFlush
- pfnNKDrWatsonClear
- pfnNKDrWatsonRead
- pfnNKDrWatsonWrite
Create a function to replace the functionality of DrWatsonGetSize, which retrieves the size of the dump area.