|
Theme: Solve the problem of missing "intrin.h" in WDK7.
Thema: Lösen das Problem des fehlenden "intrin.h" in WDK7.
WDK7有个奇怪的BUG,如果在C语言的驱动程序里调用__readmsr,则毫无问题,但如果在C++语言的驱动程序里调用__readmsr,则在编译时报错。
__readmsr之类的“指令函数”(把汇编指令封装成的C风格函数)都在intrin.h里,但WDK7的CRT库里没有intrin.h。
如果直接从VS2010的CRT库里把这个文件复制过去,你会发现编译时报告的错误更多了。
解决方案是要魔改VS2010的intrin.h。把上述内容保存到C:\WinDDK\7600.16385.1\inc\crt\intrin.h,即可解决编译报错的问题。 |
|