WdfIoTargetSendIoctlSynchronously and internal device control requests

Hi all.

I want to send an internal control request to another driver synchronously
in a simple way (no input/output parameters, it’s basically just a
notification) and tried WdfIoTargetSendIoctlSynchronously.

The comments on WdfIoTargetFormatRequestForInternalIoctlOthers say

Use the WdfIoTargetFormatRequestForInternalIoctlOthers method, followed by
the WdfRequestSend method, to send non-standard internal device control
requests either synchronously or asynchronously. Alternatively, use the
WdfIoTargetSendIoctlSynchronously method to send non-standard internal
device control requests synchronously.

I tried using WdfIoTargetSendIoctlSynchronously, but it doesn’t work, as the
request is sent to the device control dispatcher, not to the internal device
control dispatcher.

Is this a bug in the documentation or am I missing something?

Have a nice day
GV

>Is this a bug in the documentation or am I missing something?

I’d say both. It should reference
WdfIoTargetSendInternalIoctlOthersSynchronously, and that’s probably what
you want to use, if you can bring yourself to type a function name that
long.

Looks like a cut&paste error in the doc.

  • Dan.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gianluca Varenni
Sent: Wednesday, October 17, 2007 4:15 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfIoTargetSendIoctlSynchronously and internal device
control requests

Hi all.

I want to send an internal control request to another driver synchronously
in a simple way (no input/output parameters, it’s basically just a
notification) and tried WdfIoTargetSendIoctlSynchronously.

The comments on WdfIoTargetFormatRequestForInternalIoctlOthers say

Use the WdfIoTargetFormatRequestForInternalIoctlOthers method, followed by
the WdfRequestSend method, to send non-standard internal device control
requests either synchronously or asynchronously. Alternatively, use the
WdfIoTargetSendIoctlSynchronously method to send non-standard internal
device control requests synchronously.

I tried using WdfIoTargetSendIoctlSynchronously, but it doesn’t work, as the
request is sent to the device control dispatcher, not to the internal device
control dispatcher.

Is this a bug in the documentation or am I missing something?

Have a nice day
GV


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

----- Original Message -----
From: “Dan Kyler”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, October 17, 2007 3:28 PM
Subject: RE: [ntdev] WdfIoTargetSendIoctlSynchronously and internal device
control requests

> >Is this a bug in the documentation or am I missing something?
>
> I’d say both. It should reference
> WdfIoTargetSendInternalIoctlOthersSynchronously, and that’s probably what
> you want to use, if you can bring yourself to type a function name that
> long.
>
> Looks like a cut&paste error in the doc.

Yup… I’m still not used to KMDF, I should have looked better at the list
of functions :stuck_out_tongue:

Thanks!
GV

>
> - Dan.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Gianluca Varenni
> Sent: Wednesday, October 17, 2007 4:15 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] WdfIoTargetSendIoctlSynchronously and internal device
> control requests
>
> Hi all.
>
> I want to send an internal control request to another driver synchronously
> in a simple way (no input/output parameters, it’s basically just a
> notification) and tried WdfIoTargetSendIoctlSynchronously.
>
> The comments on WdfIoTargetFormatRequestForInternalIoctlOthers say
>
> Use the WdfIoTargetFormatRequestForInternalIoctlOthers method, followed by
> the WdfRequestSend method, to send non-standard internal device control
> requests either synchronously or asynchronously. Alternatively, use the
> WdfIoTargetSendIoctlSynchronously method to send non-standard internal
> device control requests synchronously.
>
> I tried using WdfIoTargetSendIoctlSynchronously, but it doesn’t work, as
> the
> request is sent to the device control dispatcher, not to the internal
> device
> control dispatcher.
>
> Is this a bug in the documentation or am I missing something?
>
> Have a nice day
> GV
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Thanks for mentioning this, GV. I’ll file the appropriate doc bug (unless Doron or Richard beats me to it).

It looks like the same error is in the doc section for
WdfIoTargetFormatRequestForInternalIoctl.

  • Dan.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@microsoft.com
Sent: Wednesday, October 17, 2007 4:59 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WdfIoTargetSendIoctlSynchronously and internal device
control requests

Thanks for mentioning this, GV. I’ll file the appropriate doc bug (unless
Doron or Richard beats me to it).


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

There are 3 diff IOCTL related DDIs (And each has a synchronous alternative)
1 WdfIoTargetFormatRequestForIoctl
2 WdfIoTargetFormatRequestForInternalIoctl
3 WdfIoTargetFormatRequestForInternalIoctlOthers

#1 uses IRP_MJ_DEVICE_CONTROL
#2 uses IRP_MJ_INTERNAL_DEVICE_CONTROL and uses the current stack location->Parameters.DeviceIoControl to format the request
#3 uses IRP_MJ_INTERNAL_DEVICE_CONTROL and uses the currnet stack location->Parameters.Others to format the request. For instance, sending URBs and SRBs requires this b/c of the non standard formatting.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Dan Kyler
Sent: Wednesday, October 17, 2007 4:04 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] WdfIoTargetSendIoctlSynchronously and internal device control requests

It looks like the same error is in the doc section for
WdfIoTargetFormatRequestForInternalIoctl.

  • Dan.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@microsoft.com
Sent: Wednesday, October 17, 2007 4:59 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WdfIoTargetSendIoctlSynchronously and internal device
control requests

Thanks for mentioning this, GV. I’ll file the appropriate doc bug (unless
Doron or Richard beats me to it).


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer