/KERNEL (Create kernel mode binary)
Create a binary that is suitable for running in kernel mode.
Syntax
/KERNEL
Remarks
Causes the linker to emit a warning if any object file or library linked in the binary wasn't compiled with /kernel.
Code that can run in kernel mode must be compiled with the /kernel
option. If you link a binary that contains code that wasn't compiled with /kernel
, the binary might not run correctly in kernel mode.
Code for kernel mode is compiled with a simplified set of C++ language features that are specific to code that runs in kernel mode. The compiler produces warnings for C++ language features that are potentially disruptive but can't be disabled. For more information about compiling code in kernel mode, see /kernel (Create kernel mode binary).
To set this linker option in Visual Studio
Open the project Property Pages dialog box. For more information, see Set C++ compiler and build properties in Visual Studio.
Select the Configuration Properties > Linker > Command Line property page.
In Additional Options, enter
/KERNELMODE
.