根据某位著名的驱动大师的说法:IoDriverObjectType是一个全局变量,只需要声明即可使用。但是声明后提示错误:
extern POBJECT_TYPE IoDriverObjectType;
1>driver2005.obj() : error LNK2001: unresolved external symbol "struct _OBJECT_TYPE * IoDriverObjectType" (?IoDriverObjectType@@3PAPAU_OBJECT_TYPE@@A)
提示该变量无法链接。谁帮个忙那?
IoDriverObjectType 的 类型是 "POBJECT_TYPE*" 不是 "POBJECT_TYPE"
改为
extern POBJECT_TYPE* IoDriverObjectType;