阅读:1537回复:4
关于xp ddk在xp下build passthru时,PtReceive的问题
我要拿出packet报文,于是加了下列代码:
// // Get at the packet, if any, indicated up by the miniport below. // Packet = NdisGetReceivedPacket(pAdapt->BindingHandle, MacReceiveContext); //°ÑÊý¾Ý°üÄÚÈÝ´ÓPacket¿½±´µ½pPacketContent NdisQueryPacket( Packet,NULL,NULL,NULL,&PacketSize1); Status = NdisAllocateMemory( &pPacketContent, 2000, 0,HighestAcceptableAddress); if (Status!=NDIS_STATUS_SUCCESS ) return Status; NdisZeroMemory (pPacketContent, 2000); NdisQueryBufferSafe(Packet->Private.Head, &pBuf, &BufLength, 32 ); NdisMoveMemory(pPacketContent, pBuf, BufLength); i = BufLength; pNext = Packet->Private.Head; for(;;) { if(pNext == Packet->Private.Tail)break; pNext = pNext->Next; //Ö¸ÕëºóÒÆ if(pNext == NULL) break; NdisQueryBufferSafe(pNext,&pBuf,&BufLength,32); NdisMoveMemory(pPacketContent+i,pBuf,BufLength); i+=BufLength; } //Êý¾Ý¿½±´Íê±Ï //------------------------------------------------- 但是在build时有了这样的问题: e:\\WINDDK\\src\\network\\ndis\\passthru\\driver\\protocol.c(874) : error C2065: \'HighestAcceptableAddress\' : undeclared identifier e:\\WINDDK\\src\\network\\ndis\\passthru\\driver\\protocol.c(874) : error C2115: \'function\' : incompatible types e:\\WINDDK\\src\\network\\ndis\\passthru\\driver\\protocol.c(874) : warning C4024: \'NdisAllocateMemory\' : different types for formal and actual parameter 4 在ddk2000的passthru里加这段就没事 |
|
最新喜欢:xiaoji... |
沙发#
发布于:2003-12-27 15:17
其实我只是想拿出mac addr
请问有更简单的方法么? |
|
板凳#
发布于:2003-12-27 18:14
向2k passthru学习,声明一个全局的NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress = NDIS_PHYSICAL_ADDRESS_CONST(-1, -1);
呵呵 |
|
地板#
发布于:2003-12-27 22:59
楼上的大侠能不能讲讲ddk的2k版和xp版的一些区别吗? 偶也想在xp下改驱动,但网上的一些资料都是给2k的... 很郁闷
多谢了!! |
|
地下室#
发布于:2003-12-28 12:40
行得通,谢谢arthurtu
|
|