Re: IRP_MJ_INTERNAL_DEVICE_CONTROL, ioctl codes: 0x0 and 0x1

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Apr 15, 4:24 pm, "Doron Holan [MSFT]" <dor...@xxxxxxxxxxxxxxxxxxxx>
wrote:
no idea.  one mistake

WDF_REQUEST_PARAMETERS params;
WDF_REQUEST_PARAMETERS_INIT(&params);

***WdfRequestGetParameters(request, &params);***

SRB* srb = (SRB*) params.Parameters.Others.Arg1;

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights..

<n2wo...@xxxxxxxxx> wrote in message

news:ec73de9b-e608-40b6-85f9-30a147ef57ce@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Apr 15, 2:47 pm, "Doron Holan [MSFT]" <dor...@xxxxxxxxxxxxxxxxxxxx>
wrote:



you would handle it in EvtIoInternalDeviceControl or EvtIoDefault. we do
not have SRB access directly, but you can easily get it by calling

WDF_REQUEST_PARAMETERS params;
WDF_REQUEST_PARAMETERS_INIT(&params);

SRB* srb = (SRB*) params.Parameters.Others.Arg1;

or
IoGetCurrentIrpStackLocation(WdfRequestWdmGetIrp(request))->Parameters.Scsi.Srb

if you want to dive into WDM

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no
rights.

<n2wo...@xxxxxxxxx> wrote in message

news:b6945951-238a-4d4a-b42f-90cf72effab7@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Apr 14, 3:31 pm, "Doron Holan [MSFT]" <dor...@xxxxxxxxxxxxxxxxxxxx>
wrote:

IRP_MJ_INTERNAL_DEVICE_CONTROL is aliased to IRP_MJ_SCSI. I think you
are
seeing SCSI SRBs. you can tell if the current irp stack
location->MinorFunction == IRP_MN_SCSI_CLASS (which is 0x1)

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no
rights.

<n2wo...@xxxxxxxxx> wrote in message

news:4a27a93c-8933-48cf-88ef-c8ae543f6f1e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

On Apr 14, 11:24 am, "Doron Holan [MSFT]"
<dor...@xxxxxxxxxxxxxxxxxxxx> wrote:
what device stack is your filter in?

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no
rights.

<n2wo...@xxxxxxxxx> wrote in message

news:a2348e11-bf8b-42ff-963b-23bceb3df456@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

which ioctls 0x0 and 0x01 refer to? I'm seeing in my filter driver.

thanks
/n2

Doron

My driver is a lower filter driver for cdrom.sys and sits above
imapi.sys.

How do I handle IRP_MJ_SCSI in KMDF? Can I access Parameters.Scsi.Srb
directly or is there wdfxxxx function for it? Also, I do see various
MMC
commands such as ERASE in my filter when handling
IOCTL_SCSI_PASS_THROUGH_DIRECT
but I'm not seeing WRITE command. Any ideas?

Thanks! That helped.. Any ideas why I don't seeCDB:Write command? I
see all other commands
in either SCSI_PASS_THROUGH_DIRECT or in SRB.

I realized that you missed WdfRequestGetParameters. I didn't know
about casting
Arg1 to SRB....
.



Relevant Pages

  • Re: XMLA Sample App problems
    ... This posting is provided "AS IS" with no warranties, ... Please do not send email directly to this alias. ... >> HTH, ...
    (microsoft.public.data.xmlanalysis)
  • Re: EvtDeviceArmWakeFromSx not called
    ... Please do not send e-mail directly to this alias. ... newsgroup purposes only. ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.development.device.drivers)
  • Re: Mailbox Security
    ... Microsoft PSS ... Please do not send email directly to this alias is for newsgroup purposes ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.exchange.admin)
  • Re: get USBDSTATUS using KMDF
    ... Please do not send e-mail directly to this alias. ... newsgroup purposes only. ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.development.device.drivers)
  • Re: Outlook Rules on Server
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... Please do not send email directly to this alias. ...
    (microsoft.public.exchange2000.admin)