NDIS,HOOK了那个receivepacket函数,就蓝屏.为什么呢?代码如下:
- pOpenBlock = ((PNDIS_OPEN_BLOCK *)pProtocolBlock)[0];
- m_pReceivePacket=pOpenBlock->ReceivePacketHandler;
- pOpenBlock->ReceivePacketHandler=MyReceivePackets;
MyReceivePackets
- int MyReceivePackets(IN NDIS_HANDLE ProtocolBindingContext,IN PNDIS_PACKET Packet)
- {
- DbgPrint("receive packets");
- return m_pReceivePacket(ProtocolBindingContext,Packet);
- }
我没有做任何更改,直接交回给原来的函数去处理的.不知道为什么会蓝屏?不HOOK这个函数就不会蓝屏。恳请各位赐教.