I have captured my driver's KdPrints:
00000000 0.00000000 PCIDEMO - Enter DispatchCreate: DeviceObject
825918E0
00000001 0.00018913 PCIDEMO - Enter DispatchClose: DeviceObject
825918E0
00000002 0.00021008 PCIDEMO - Exit DispatchClose
that is in reponse to my Usermode program:
main()
{
..
CreateFile(..);
WriteFile(...);
ReadFile(..);
}
my question is why does Windows didn't called my DispatchRead or
DispatchWrite
in reponse to ReadFile/WriteFile?
the fact that i have made a dispactch routine for IRP_MJ_READ and
IRP_MJ_WRITE:
NTSTATUS DispatchRead (IN PDEVICE_OBJECT device, IN PIRP Irp)
{
KdPrint((DRIVERNAME" - Enter DispatchRead: DeviceObject %8.8lX\n",
device));
KdPrint((DRIVERNAME" - Exit DispatchRead: DeviceObject %8.8lX\n",
device));
return STATUS_SUCCESS;
}
NTSTATUS DispatchRead (IN PDEVICE_OBJECT device, IN PIRP Irp)
{
KdPrint((DRIVERNAME" - Enter DispatchWrite: DeviceObject %8.8lX\n",
device));
KdPrint((DRIVERNAME" - Exit DispatchWrite: DeviceObject %8.8lX\n",
device));
return STATUS_SUCCESS;
}
i made it just like that just to test if DispatchRead/DispatchRead is
really called
what could be wrong with this?