How can I capture all IOCTL_xxx,SRB_xxx from CD or SCSI?

How can I capture all IOCTL_xxx,SRB_xxx from CD or SCSI?

I made filter driver attached from “\Device\CdRom0…1”.
but, the driver’s ioCtrlCode is “4d0008,30000,b26e24a3,…”
I don’t find out IOCTL_SCSI_PASS_THROUTH…

NOT FILTER DRIVER?? I don’t Know…


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Maybe you’ll try to attach to SCSIPORT?

On 10/25/01, “xxxxx@yahoo.com” wrote:

How can I capture all IOCTL_xxx,SRB_xxx from CD or SCSI?

I made filter driver attached from “\Device\CdRom0…1”.
but, the driver’s ioCtrlCode is “4d0008,30000,b26e24a3,…”
I don’t find out IOCTL_SCSI_PASS_THROUTH…

NOT FILTER DRIVER?? I don’t Know…


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yes. I’ll Try to Attach to SCSIPORT.
but I don’t know how to attach to SCSIPORT.
and not exist symbol ScsiPort0…N in Symbolic Lick Viewer by Numega, and
Device SCSIPORT in DeviceTree too.

Where I Attach to Device Driver?

this is part of infested source code from DDK\toastor\filter.c
=== DriverEntry ===
for (ulIndex = 0, dispatch = DriverObject->MajorFunction;
ulIndex <= IRP_MJ_MAXIMUM_FUNCTION;
ulIndex++, dispatch++) {

*dispatch = FilterPass;
}

DriverObject->MajorFunction[IRP_MJ_PNP] = FilterDispatchPnp;
DriverObject->MajorFunction[IRP_MJ_POWER] = FilterDispatchPower;
// DriverObject->DriverExtension->AddDevice =
FilterAddDevice;
DriverObject->DriverUnload = FilterUnload;

return FilterAddDevice(DriverObject);

=== FilterAddDevice ===
sprintf(ntNameBuffer, “\Device\CdRom1”);
// tried to test
//\Ide\IdeDeviceP1T1L0-1c");
//\Ide\IdePort1");
//\Device\MbDlDp32");// -> Easy CD Kernel Driver
RtlInitAnsiString(&ntNameString, ntNameBuffer);
RtlAnsiStringToUnicodeString(&ntUnicodeString, &ntNameString, TRUE);

status = IoCreateDevice (DriverObject,
sizeof (DEVICE_EXTENSION),
NULL, // No Name
FILE_DEVICE_UNKNOWN,
FILE_DEVICE_SECURE_OPEN,
FALSE,
&deviceObject);

if (!NT_SUCCESS (status)) {
//
// Returning failure here prevents the entire stack from
functioning,
// but most likely the rest of the stack will not be able to
create
// device objects either, so it is still OK.
//
return status;
}

deviceExtension = (PDEVICE_EXTENSION) deviceObject->DeviceExtension;

status = IoAttachDevice ( deviceObject,&ntUnicodeString,
&deviceExtension->NextLowerDriver);
if(!NT_SUCCESS(status))
{
IoDeleteDevice(deviceObject);
RtlFreeUnicodeString(&ntUnicodeString);
return STATUS_UNSUCCESSFUL;
}

RtlFreeUnicodeString(&ntUnicodeString);

deviceObject->Flags |= deviceExtension->NextLowerDriver->Flags &
(DO_BUFFERED_IO | DO_DIRECT_IO |
DO_POWER_PAGABLE | DO_POWER_INRUSH);

deviceObject->DeviceType =
deviceExtension->NextLowerDriver->DeviceType;

deviceObject->Characteristics =
deviceExtension->NextLowerDriver->Characteristics;

deviceExtension->Self = deviceObject;

INITIALIZE_PNP_STATE(deviceExtension);

DebugPrint((“AddDevice initialize”));

deviceObject->Flags &= ~DO_DEVICE_INITIALIZING;

return STATUS_SUCCESS;

==============
thanks for read my quest.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

\Device\ScsiPort%ld

On 10/26/01, “xxxxx@yahoo.com” wrote:

Yes. I’ll Try to Attach to SCSIPORT.
but I don’t know how to attach to SCSIPORT.
and not exist symbol ScsiPort0…N in Symbolic Lick Viewer by Numega, and
Device SCSIPORT in DeviceTree too.

Where I Attach to Device Driver?

this is part of infested source code from DDK\toastor\filter.c
=== DriverEntry ===
for (ulIndex = 0, dispatch = DriverObject->MajorFunction;
ulIndex <= IRP_MJ_MAXIMUM_FUNCTION;
ulIndex++, dispatch++) {

*dispatch = FilterPass;
}

DriverObject->MajorFunction[IRP_MJ_PNP] = FilterDispatchPnp;
DriverObject->MajorFunction[IRP_MJ_POWER] = FilterDispatchPower;
// DriverObject->DriverExtension->AddDevice =
FilterAddDevice;
DriverObject->DriverUnload = FilterUnload;

return FilterAddDevice(DriverObject);

=== FilterAddDevice ===
sprintf(ntNameBuffer, “\Device\CdRom1”);
// tried to test
//\Ide\IdeDeviceP1T1L0-1c");
//\Ide\IdePort1");
//\Device\MbDlDp32");// -> Easy CD Kernel Driver
RtlInitAnsiString(&ntNameString, ntNameBuffer);
RtlAnsiStringToUnicodeString(&ntUnicodeString, &ntNameString, TRUE);

status = IoCreateDevice (DriverObject,
sizeof (DEVICE_EXTENSION),
NULL, // No Name
FILE_DEVICE_UNKNOWN,
FILE_DEVICE_SECURE_OPEN,
FALSE,
&deviceObject);

if (!NT_SUCCESS (status)) {
//
// Returning failure here prevents the entire stack from
functioning,
// but most likely the rest of the stack will not be able to
create
// device objects either, so it is still OK.
//
return status;
}

deviceExtension = (PDEVICE_EXTENSION) deviceObject->DeviceExtension;

status = IoAttachDevice ( deviceObject,&ntUnicodeString,
&deviceExtension->NextLowerDriver);
if(!NT_SUCCESS(status))
{
IoDeleteDevice(deviceObject);
RtlFreeUnicodeString(&ntUnicodeString);
return STATUS_UNSUCCESSFUL;
}

RtlFreeUnicodeString(&ntUnicodeString);

deviceObject->Flags |= deviceExtension->NextLowerDriver->Flags &
(DO_BUFFERED_IO | DO_DIRECT_IO |
DO_POWER_PAGABLE | DO_POWER_INRUSH);

deviceObject->DeviceType =
deviceExtension->NextLowerDriver->DeviceType;

deviceObject->Characteristics =
deviceExtension->NextLowerDriver->Characteristics;

deviceExtension->Self = deviceObject;

INITIALIZE_PNP_STATE(deviceExtension);

DebugPrint((“AddDevice initialize”));

deviceObject->Flags &= ~DO_DEVICE_INITIALIZING;

return STATUS_SUCCESS;

==============
thanks for read my quest.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com