勘误:HidRegisterMinidriver应在hidclass.lib而非hid.lib

参考msdn:http://msdn.microsoft.com/en-us/library/ff539835

Version

Available in Windows 2000 and later versions of Windows.

Header

Hidport.h (include Hidport.h)

Library

Hid.lib

IRQL

<= DISPATCH_LEVEL

实际编译仍然缺少外部符号,经查在hidclass.lib中发现该符号:

_HidRegisterMinidriver@4

__imp__HidRegisterMinidriver@4

勘误:HidRegisterMinidriver应在hidclass.lib而非hid.lib_第1张图片

然而我还不明白为什么不能使用#pragma引用,只能在工程设置中添加:

勘误:HidRegisterMinidriver应在hidclass.lib而非hid.lib_第2张图片

而不能使用:

//#pragma comment(lib, "hidclass.lib")

有些教程只引用ntoskrnl.lib,如果没有hal.lib又会缺少一个外部符号__imp__KeGetCurrentIrql@0


编译成功:

勘误:HidRegisterMinidriver应在hidclass.lib而非hid.lib_第3张图片

特此勘误

did anyone report this to Microsoft?


2014-11-24 03:46:11


你可能感兴趣的:(勘误:HidRegisterMinidriver应在hidclass.lib而非hid.lib)