Windows Driver Kit: Kernel-Mode Driver Architecture
ZwXxx Routines
The ZwXxx routines provide a set of system entry points that parallel some of the executive's system services. Calling a ZwXxx routine from kernel-mode code results in a call to the corresponding system service. Calling a ZwXxx routine from user mode is not supported; instead, native applications (applications that bypass the Microsoft Win32 subsystem) should use the NtXxx equivalent of the ZwXxx routine.
The system does not check the caller's access rights, nor does it set the previous processor mode to UserMode. Furthermore, before calling a ZwXxx routine, the kernel-mode code must check all the user-supplied parameters for validity.
For more information about the relationship between NtXxx and ZwXxx routines, see Using Nt and Zw Versions of the Native System Services Routines. For a list of the ZwXxx routines in each major functional category, see Summary of Kernel-Mode Support Routines.
The following routines are reserved for system use. Do not use them in your driver.