вторник, 4 октября 2011 г.

ViErrorDescriptions

и вот еще на сладкое - диагностические сообщения, которые driver verifier может выдать в ф-ции ViErrorDisplayDescription (в квадратных скобках внутренний код сообщения). По моему дают весьма наглядное представление о технологии

[201] A device is deleting itself while there is another device beneath it in
the driver stack. This may be because the caller has forgotten to call
IoDetachDevice first, or the lower driver may have incorrectly deleted
itself.
[202] Driver has attempted to detach from a device object which is not
attached to anything. This may occur if detach was called twice on the
same device object.
[203] A driver has called IoCallDriver without setting the CancelRoutine in
the Irp to NULL.
[204] Caller has passed in NULL as a DeviceObject.
[205] Caller is forwarding an IRP that is currently queued beneath it! The
code handling IRPs returning STATUS_PENDING in this driver appears to
be broken.
[207] Caller has manually copied the stack and has inadvertantly copied the
upper layer's completion routine. Please use
IoCopyCurrentIrpStackLocationToNext.
[208] This IRP is about to run out of stack locations. Someone may have
forwarded this IRP from another stack.
[209] Caller is completing an IRP that is currently queued beneath it! The
code handling IRPs returning STATUS_PENDING in this driver appears to be
broken.
[20B] Caller of IoFreeIrp is freeing an IRP that is still in use!
[20C] Caller of IoFreeIrp is freeing an IRP that is still queued to a
thread!
[20D] Caller of IoInitializeIrp has passed an IRP that was allocated with
IoAllocateIrp. This is incorrect and unneccessary, and has caused a quota
leak. Check the documentation for IoReuseIrp if this IRP is being
recycled.
[20E] Any PNP IRP must have status initialized to STATUS_NOT_SUPPORTED.
[20F] Any Power IRP must have status initialized to STATUS_NOT_SUPPORTED.
[210] Any WMI IRP must have status initialized to STATUS_NOT_SUPPORTED.
[211] Caller has forwarded an Irp while skipping a device object in the stack.
The caller is probably sending IRPs to the PDO instead of to the device
returned by IoAttachDeviceToDeviceStack.
[212] Caller has trashed or has not properly copied IRP's stack.
[213] Caller has changed the status field of an IRP it does not understand.
[214] Caller has changed the information field of an IRP it does not understand.
[215] Non-successful non-STATUS_NOT_SUPPORTED IRP status for IRP_MJ_PNP is
being passed down stack. Failed PNP IRPs must be completed.
[216] Previously set IRP_MJ_PNP status has been converted to
STATUS_NOT_SUPPORTED. This failure status is reserved for use of the OS
- drivers cannot fail a PnP IRP with this value.
[217] The driver has not handled a required IRP. The driver must update the
status of the IRP to indicate whether it's been handled or not.
[218] The driver has responded to an IRP that is that is reserved for other
device objects elsewhere in the stack.
[219] Non-successful non-STATUS_NOT_SUPPORTED IRP status for IRP_MJ_POWER is
being passed down stack. Failed POWER IRPs must be completed.
[21A] Previously set IRP_MJ_POWER status has been converted to
STATUS_NOT_SUPPORTED. This failure status is reserved for use of the OS
- drivers cannot fail a Power IRP with this value.
[21D] An IRP dispatch handler has not properly detached from the stack below
it upon receiving a remove IRP.
[21F] This driver has not filled out a dispatch routine for a required IRP
major function.
[220] IRP_MJ_SYSTEM_CONTROL has been completed by someone other than the
ProviderId. This IRP should either have been completed earlier or
should have been passed down.
[221] An IRP dispatch handler for a PDO has deleted it's device object, but
the hardware has not been reported as missing in a bus relations query.

[223] An IRP dispatch handler for a bus filter has deleted it's device object,
but the PDO is still present! Bus filters must clean up in FastIoDetach
callbacks.
[224] An IRP dispatch handler has returned a status that is
inconsistent with the Irp's IoStatus.Status field.
[225] An IRP dispatch handler has returned a status that is incorrect
(0xFFFFFFFF). This is probably due to an uninitialized stack variable.
[226] An IRP dispatch handler has returned without passing down or completing
this Irp or someone forgot to return STATUS_PENDING.
[227] IRP completion routines must be in nonpagable code, and this one is not.
[228] A driver's completion routine has not marked the IRP
pending if the PendingReturned field was set in the IRP passed to it.
This may cause the OS to hang, especially if an error is returned by the
 stack.
[22A] PDO has not responded to a required IRP.
[22B] PDO has forgotten to fill out the device relation list with the PDO for
the TargetDeviceRelation query.
[22D] Caller has completed a IRP_MJ_PNP it didn't understand instead of
passing it down.
[22E] Caller has completed successful IRP_MJ_PNP instead of passing it down.
[22F] Caller has completed untouched IRP_MJ_PNP (instead of passing the irp
down) or non-PDO has failed the irp using incorrect value of
STATUS_NOT_SUPPORTED.
[233] The version field of the query capabilities structure in a query
capabilities IRP was not properly initialized.
[234] The size field of the query capabilities structure in a query
capabilities IRP was not properly initialized.
[235] The address field of the query capabilities structure in a query
capabilities IRP was not properly initialized to -1.
[236] The UI Number field of the query capabilities structure in a query
capabilities IRP was not properly initialized to -1.
[23B] Caller has changed the status field of an IRP it does not understand.
[23D] A driver has returned STATUS_PENDING but did not mark the IRP pending
via a call to IoMarkIrpPending.
[23E] A driver has marked an IRP pending but didn't return STATUS_PENDING.
[240] A driver is attempting to delete a device object that has already been
deleted via a prior call to IoDeleteDevice.
[241] A driver has detached it's device object during a surprise remove IRP.
[242] A driver has deleted it's device object during a surprise remove IRP.
[248] A driver has added a device object that is not a PDO to a device
relations query.
[249] A driver has enumerated two child PDO's that returned identical Device
ID's.
[24A] A driver has mistakenly called a file I/O function at an IRQL other
than PASSIVE_LEVEL.
[24B] A driver has succeeded IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS(TargetRelations)
but didn't properly fill out the request or forward the IRP to the
underlying hardware stack.
[24C] A driver has returned STATUS_PENDING but did not mark the IRP pending
via a call to IoMarkIrpPending.
[24D] A driver has passed an invalid device object to a function that requires
a PDO.
[300] Driver has returned a suspicious status. This is probably due to an
uninitialized variable bug in the driver.
[301] A driver has forwarded an IRP at IRQL > DISPATCH_LEVEL.
[302] A driver has forwarded an IRP at IRQL >= APC_LEVEL.
The I/O Completion APC routine will not be able to run for this IRP.
[306] The driver is completing an IRP_MJ_PNP.IRP_MN_REMOVE_DEVICE
request with a failure status code.

Комментариев нет:

Отправить комментарий