The latest version of this topic can be found at __readcr0.

Microsoft Specific**

Reads the CR0 register and returns its value.


unsigned long __readcr0(void);  /* X86 */  
unsigned __int64 __readcr0(void);  /* X64 */  

Return Value

The value in the CR0 register.


Intrinsic Architecture
__readcr0 x86, x64

Header file <intrin.h>


This intrinsic is only available in kernel mode, and the routine is only available as an intrinsic.

END Microsoft Specific

See Also

Compiler Intrinsics