佚名通过本文主要向大家介绍了《WindowsWDM设备驱动程序开发指南》的wdm1例子,将cpp改成c文件,为什么就不能编译通过?等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 《Windows WDM设备驱动程序开发指南》的wdm1例子,将cpp改成c文件,为什么就不能编译通过?
描述:
描述:
就是Chris Cant 的那本《Windows WDM设备驱动程序开发指南》
采用.cpp文件是可以编译通过的。
但我作了如下修改:
1。将所以的.cpp改成.c文件
2。修改sources文件
3。去掉extern“c“
然后编译,出现如下类型的错误:
主要是在wdm.h中定义的变量非法
如:
dispatch.c(107) : error C2275: 'KIRQL' : illegal use of this type as an expression
pnp.c(42) : error C2275: 'NTSTATUS' : illegal use of this type as an expression
pnp.c(111) : error C2275: 'PIO_STACK_LOCATION' : illegal use of this type as an expression
等等