使用vs2019/vs2022
2026-05-26
Written by: tdtc
wdk path: Sandbox32.props and Sandbox64.props:
<WDKPATH>\Program Files (x86)\Windows Kits\10</WDKPATH>
10.0.19041.0
10.0.26100.0
$(WDKPATH)\Include\10.0.19041.0\km
$(WDKPATH)\Include\10.0.19041.0\ucrt
$(WDKPATH)\Include\10.0.19041.0\um
$(WDKPATH)\lib\10.0.19041.0\km\x86
$(WDKPATH)\lib\10.0.19041.0\km\x64
Error C2365 'TokenIsAppContainer': redefinition; previous definition was 'enumerator'
my_winnt.h:
#ifdef OLD_DDK
typedef enum _TOKEN_INFORMATION_CLASS2 {
TokenIsAppContainer = 29,
TokenCapabilities,
TokenAppContainerSid,
TokenAppContainerNumber,
TokenUserClaimAttributes,
TokenDeviceClaimAttributes,
TokenRestrictedUserClaimAttributes,
TokenRestrictedDeviceClaimAttributes,
TokenDeviceGroups,
TokenRestrictedDeviceGroups,
TokenSecurityAttributes,
TokenIsRestricted,
TokenProcessTrustLevel,
TokenPrivateNameSpace//,
//MaxTokenInfoClass // MaxTokenInfoClass should always be the last enum
} TOKEN_INFORMATION_CLASS2;
#endif // OLD_DDK
Warning C4996 'wcsnicmp': The POSIX name for this item is deprecated.
Instead, use the ISO C and C++ conformant name: _wcsnicmp.
key_flt.c:
_wcsnicmp
Error LNK2001 unresolved external symbol ___stdio_common_vswprintf
add it to the compiler’s command line:
/D_NO_CRT_STDIO_INLINE
Error LNK2001 unresolved external symbol __wcsnicmp
vcruntime.lib
ucrt.lib
Move the declaration of Common_RunStartExe() to a new header file.
apps/common/CommonUtils.h
apps/common/RunStartExe.h:
#include "apps/common/RunStartExe.h"
Error C2065 'HINSTANCE': undeclared identifier
#include <windows.h>