Skip to content

_KERNEL_MODE shouldn't be used to detect drivers #91

@MichalPetryka

Description

@MichalPetryka

The MSVC /kernel option says:
The /kernel option and the /driver option operate independently. They have no effect on each other.

As such, using it to detect being in a driver is invalid and causes errors due to wdk.h not being there while building with /kernel in usermode.
This should be changed to detect the need for driver headers in some other way or an opt-out option should be provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions