NKForceCleanBoot (Windows Embedded CE 6.0)
1/5/2010
This function forces the operating system (OS) to boot from a clean object store file system when called from the OEMInit function.
This function can also be called after the OS has started to force the next boot process to start from a clean object store file system.
Syntax
VOID NKForceCleanBoot(void);
Parameters
None.
Return Value
None.
Remarks
The hardware on some devices accidentally preserves RAM contents after brief power losses due to capacitance.
Unless these devices are intentionally preserving RAM contents using self-refresh, these devices should always call NKForceCleanBoot so the object store does not appear valid at boot time. Otherwise, devices are likely to experience crash problems during boot.
Code Example
Description
The following example code shows how to use NKForceCleanBoot inside the OEMInit function implementation.
Code
// Check clean boot flag in BSP Args area
//
{
// Set the global shared Args flag
BOOL *bCleanBootFlag = (BOOL*) OALArgsQuery(BSP_ARGS_QUERY_CLEANBOOT);
if(*bCleanBootFlag)
{
OALMSG(1, (TEXT("OEM: Force clean boot.\r\n")));
// Clear the flag so that code doesn't enter this if statement in the next boot unless the flag is set again.
*bCleanBootFlag = FALSE;
// Notify filesys.exe that you want a clean boot.
NKForceCleanBoot();
}
}
Requirements
Header | pkfuncs.h |
Library | Nkstub.lib |
Windows Embedded CE | Windows CE .NET 4.2 and later |