CChkSGFiles.ErrCheckDbPages function
Last modified: February 22, 2013
Applies to: Exchange Server 2003 | Exchange Server 2007 | Exchange Server 2010 | Exchange Server 2013
Validates a range of pages in a specified database.
Vitual ERRErrCheckDbPages
(
Const ULONGiDb,
Const VOID * const pvPageBuffer,
Const ULONGcbPageBuffer,
PAGE_INFOrgPageInfo[],
Const ULONGcPageInfo,
Const ULONGulFlags = NO_FLAGS
);
An error code from the ERR enumeration.
Note that you need to have specified the database in the array of databases passed to the ErrInit function. Also, ErrCheckDbHeaders must be called before ErrCheckDbPages.
The calling application must allocate a memory buffer that is large enough to hold the database pages to be checked. The application is responsible for filling the buffer with the contents of one or more such database pages.
The calling application must call ErrCheckDbHeaders before calling ErrCheckDbPages. This function can be called as many times as necessary to cover all the pages in all database files that are to be checked.
In the rgPageInfo[] parameter, each element returned contains information about the database page in a PAGE_INFO structure. If the ErrCheckDbPages function returns an error, the application should check each PAGE_INFO structure to determine on which page the error was found. For example, comparing the checksumActual and checksumExpected values will indicate whether a checksum error was detected on that database page.
If ErrCheckDbPages detects any errors in the database content, it will create a Windows Error event log entry.
The CChkSGFiles object determines whether all the databases registered with the ErrInit function were actually checked. Specifically, CChkSGFiles uses the ErrCheckDbPages function to determine whether the same number of database pages indicated by ErrCheckDbHeaders were actually verified. If the correct number of pages in each database were not successfully checked, the ErrTerm function returns an error.
If you're using CHKSGFILES in a multithreaded application, you can call the ErrCheckDbPages function in the multithreaded portion of the application. Note that ErrCheckDbPages is typically called multiple times for each database that is checked.