MiroKaku / Musa.Veil

Collection of undocumented Windows API declarations.
MIT License
291 stars 49 forks source link

Header file inclusion issue caused by __has_include #11

Closed nsky99 closed 2 months ago

nsky99 commented 2 months ago

if __has_include()

define WIN32_LEAN_AND_MEAN

define NTOS

define DEVIOCTL

define NTSECAPI

include "Veil/Veil.System.WinNT.h"

include

include

endif

In kernel mode, it will include Windows. h and introduce some structural information of user mode

In some header files, there are also many function declarations in Windows user mode, which may cause link issues if used because this function is not available in kernel mode,RtlFlsAlloc,RtlFlsFree,RtlProcessFlsData..........

MiroKaku commented 2 months ago

This is a feature, used by Musa.Core

nsky99 commented 2 months ago

thanks, Does Musa. core need to include header files for user mode in kernel mode? I just don't think it's reasonable to include user header files in kernel mode. The library written by the author is indeed very useful👍

MiroKaku commented 2 months ago

Musa.Core can use some Ring-3 APIs in the kernel.