我在编写ndis驱动的时候遇到了很奇怪的问题,在使用NdisAllocateBufferPool,NdisAllocatePacketPool,TdiCopyBufferToMdl等在ndis.h以及tdikrn.h中声明和定义的函数的时候产生了链接错误。错误如下:
ndishook.obj : error LNK2019: unresolved external symbol __imp__NdisAllocateBufferPool@12 referenced in function _DriverEntry@8
ndishook.obj : error LNK2019: unresolved external symbol __imp__NdisAllocatePacketPool@16 referenced in function _DriverEntry@8
hooked_fn.obj : error LNK2019: unresolved external symbol __imp__NdisDeregisterProtocol@8 referenced in function _new_NdisRegisterProtocol@16
hooked_fn.obj : error LNK2019: unresolved external symbol __imp__NdisFreePacket@4 referenced in function _new_ReceiveHandler@32
hooked_fn.obj : error LNK2019: unresolved external symbol __imp__NdisAllocatePacket@12 referenced in function _new_ReceiveHandler@32
hooked_fn.obj : error LNK2019: unresolved external symbol __imp__NdisAllocateBuffer@20 referenced in function _new_ReceiveHandler@32
hooked_fn.obj : error LNK2019: unresolved external symbol _TdiCopyBufferToMdl@24 referenced in function _new_TransferDataHandler@28
hooked_fn.obj : error LNK2019: unresolved external symbol _TdiCopyMdlToBuffer@24 referenced in function _send_out_packet@8