|
在passthru种,部分代码如下:
int PacketSize;
PUCHAR pPacketContent;
PUCHAR pBuf;
UINT BufLength;
NdisQueryPacket(MyPacket,NULL,NULL,NULL,&PacketSize);
NdisAllocateMemory(&pPacketContent,2000,0,HighestAcceptableMax);
NdisZeroMemory(pPacketContent, 2000);
NdisQueryBufferSafe(MyPacket->Private.Head, &pBuf, &BufLength, 32);
NdisMoveMemory(pPacketContent, pBuf, BufLength);
报错为:
myioctl.cpp(37) : error C2440: 'initializing' : cannot convert from 'int *' to 'unsigned int *'
myioctl.cpp(38) : error C2664: 'NdisAllocateMemory' : cannot convert parameter 1 from 'unsigned char ** ' to 'void ** '
myioctl.cpp(40) : error C2664: 'NdisQueryBufferSafe' : cannot convert parameter 2 from 'unsigned char ** ' to 'void ** '
myioctl.cpp(51) : error C2664: 'NdisQueryBufferSafe' : cannot convert parameter 2 from 'unsigned char ** ' to 'void ** '
很奇怪啊,在另一个程序passthur里都可以正常通过的,x现在做代码迁移,为什么在这里就不行了呢?真是奇怪,请大侠指点
|
|