Reply To: IOCTL_NDISRD_READ_PACKET without packets

Home Forums Discussions Support IOCTL_NDISRD_READ_PACKET without packets Reply To: IOCTL_NDISRD_READ_PACKET without packets

#5560
bk
Participant

    @SerpentFly wrote:

    NDIS_STATUS_FAILURE is the same as STATUS_UNSUCCESSFUL. Are you sure that you get STATUS_INVALID_PARAMETER?

    Yes, pretty sure. I’m not at work, so I cannot post the exact code, but roughly is:

    … initialize the irp structure …

    status = IoCallDriver( devObj, irp );

    if( status == STATUS_PENDING )
    WaitForSingleObject( devObj, …);
    else if ( status == STATUS_INVALID_PARAMETER ) {
    DbgPrint(“Invalid parameter”);
    }

    This code is called in a cycle: where there are packets in queue, the status is correct, but on the last cycle, where there are no more packets on queue, it prints “invalid parameter”. Sadly I’m not at work so I can’t give you the exact hex value, but if I remember correctly it’s 0xC000000D.

    The same happens with IOCTL_NDISRD_FLUSH_QUEUE on an empty queue.