NTSTATUS
DriverEntry (IN PDRIVER_OBJECT p_DriverObject,
IN PUNICODE_STRING p_RegistryPath){
NDIS_STATUS l_Status = NDIS_STATUS_FAILURE;
NDIS_MINIPORT_CHARACTERISTICS *l_Properties = NULL;
//========================================================
// Notify NDIS that a new miniport driver is initializing.
//========================================================
//==========================================
// Inform the NDIS library about significant
// features of our virtual NIC.
//==========================================
//==================================
// Allocate spinlock for controlling
// access to multicast address list.
//==================================
NdisAllocateSpinLock (&l_Adapter->m_MCLock);
l_Adapter->m_MCLockAllocated = TRUE;
//====================================================
// Register a shutdown handler which will be called
// on system restart/shutdown to halt our virtual NIC.
//====================================================
//======================================================================
// Hooks for catching TAP device IRP's.
//======================================================================
switch (l_IrpSp->MajorFunction)
{
//===========================================================
// User mode thread issued a read request on the tap device
// If there are packets waiting to be read, then the request
// will be satisfied here. If not, then the request will be
// queued and satisfied by any packet that is not used to
// satisfy requests ahead of it.
//===========================================================
case IRP_MJ_READ:
{
.....
}
//==============================================================
// User mode issued a WriteFile request on the TAP file handle.
// The request will always get satisfied here. The call may
// fail if there are too many pending packets (queue full).
//==============================================================
case IRP_MJ_WRITE:
{
}
//--------------------------------------------------------------
// User mode thread has called CreateFile() on the tap device
//--------------------------------------------------------------
case IRP_MJ_CREATE:
{
}
}
请教出现这个结果该如何着手分析?
用IRPTracer捕获: Read
---------------------------------------------------------------- IRP
Major function IRP_MJ_READ
state Completed
status Error: STATUS_NOT_SUPPORTED
---------------------------------------------------------------- Sent
Process CommTest.exe(F80H)
---------------------------------------------------------------- Completed
by NDIS.SYS!NdisFreeToBlockPool+1C8C
(F72A2232)