Share via


SetKMode

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This function switches between kernel and user modes.

This function is no longer supported as of CE 6.0.

Syntax

BOOL SetKMode(
  BOOL fMode
);

Parameters

  • fMode
    [in] Setting to TRUE enters kernel mode. Setting to FALSE enters user mode.

Return Value

Returns the mode prior to the current call to SetKMode. TRUE if the previous mode was kernel mode; FALSE if the previous mode was user mode.

Remarks

Only the calling thread is affected by SetKMode.

To allow nested operation, set fMode to the value returned from an initial call to SetKMode to return to the original state.

Requirements

Header pkfuncs.h
Library coredll.lib
Windows Embedded CE Windows CE 2.10 and later

See Also

Reference

Kernel Functions

Concepts

Unsupported Kernel APIs

Other Resources

dwOEMCleanPages
Privileged APIs