'How detect my custom driver run in kernel-mode or user-mode?

When I write a driver (WDM), how do I know where it is running (Kernel-mode or user-mode)?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source