【发布时间】:2016-01-18 04:53:41
【问题描述】:
#include <ntddk.h>
#include <string.h>
.....
PWCHAR tmpBuf = NULL, pwBuf = NULL;;
tmpBuf = ExallocatePoolWithTag(NonPagePool, (MAX_SIZE + 1) * sizeof(WCHAR), BUFFER_TAG);
pwBuf = ExAllocatePoolWithTag(NonPagedPool, (MAX_SIZE + 1) * sizeof(WCHAR), BUFFER_TAG);
RtlStringCchPrintfW(tmpBuf, MAX_SIZE + 1, L"ws", ProcName);
pwBuf = wcstok(tmpBuf, L"\\");
...
错误信息:
错误 LNK2019:未解析的外部符号 _wcstok 在函数中引用
但是。 wcslen 有效
【问题讨论】:
-
什么版本的编译器/ddk/etc?看看Breaking Changes in Visual C++ 2015 是否适用 - 查找
wcstok部分。 -
内核中可用的库与用户模式不同。 wcstok 可能不完全
-
Visual Studio 2013,WDK 8.1
-
你是用C还是C++模式编译?
标签: c windows kernel driver windows-kernel