Hi,
Please forgive me for seamingly asking what could be a stupid question but I am still learning.
As I understand it, requests only go down until they have been completed, the pnpi8042 driver sends a request to the top of its stack by using a reference. I’m fine with sending something down the stack by using WdfGetTargetIo(MyDevice) etc and there are plenty of examples in WDM for sending to the top of a stack but I can’t find or haven’t been able to find any references to sending to the top of the current stack in WDF. I assume I would have to treat the local stack as a remote but is there an easier way rather than finding out a name of a local stack say in this example kbdclass.
Many thanks,
pTop = IoGetAttachedDeviceReference(selfDO);
WdfIoTargetCreate(…);
WDF_IO_TARGET_OPEN_PARAMS open;
WDF_IO_TARGET_OPEN_PARAMS_INIT_EXISTING_DEVICE(&open, pTop);
WdfIoTargetOpen(target, &open);
Remember to call ObDereferenceObject on pTop when you are done with it
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Saturday, July 21, 2012 1:00 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] TopOfStack
Hi,
Please forgive me for seamingly asking what could be a stupid question but I am still learning.
As I understand it, requests only go down until they have been completed, the pnpi8042 driver sends a request to the top of its stack by using a reference. I’m fine with sending something down the stack by using WdfGetTargetIo(MyDevice) etc and there are plenty of examples in WDM for sending to the top of a stack but I can’t find or haven’t been able to find any references to sending to the top of the current stack in WDF. I assume I would have to treat the local stack as a remote but is there an easier way rather than finding out a name of a local stack say in this example kbdclass.
Many thanks,
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
Thankyou so very much Doron.
pTop = IoGetAttachedDeviceReference(selfDO);
WdfIoTargetCreate(…);
WDF_IO_TARGET_OPEN_PARAMS open;
WDF_IO_TARGET_OPEN_PARAMS_INIT_EXISTING_DEVICE(&open, pTop);
WdfIoTargetOpen(target, &open);
Remember to call ObDereferenceObject on pTop when you are done with it
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Saturday, July 21, 2012 1:00 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] TopOfStack
Hi,
Please forgive me for seamingly asking what could be a stupid question but I am
still learning.
As I understand it, requests only go down until they have been completed, the
pnpi8042 driver sends a request to the top of its stack by using a reference.
I’m fine with sending something down the stack by using WdfGetTargetIo(MyDevice)
etc and there are plenty of examples in WDM for sending to the top of a stack
but I can’t find or haven’t been able to find any references to sending to the
top of the current stack in WDF. I assume I would have to treat the local stack
as a remote but is there an easier way rather than finding out a name of a local
stack say in this example kbdclass.
Many thanks,
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
Hi Doron,
Am I right in thinking you wrote or worked on pnpi8042 for quite sometime? I’m not sure if I was reading about someone else.
I seem to have a really strange problem. I’ve been playing about with a keyboard driver, porting from a filter to an actual driver. I thought with all the documentation and sourcecode this would be quite an interesting example to learn with and from. With your code I’ve read a little bit more into stacks and so thankyou very much.
The problem I have is, I am receiving a IOCTL function of 0x000000 from somewhere up in the stack. (I have verified kbdclass is in my stack via devcon.exe stack) The fulll IOCTL is 0x000B0003.
I worked on that driver (and all other input drivers) on win2k and XP. 0x000B0003 is the ioctl value you should care about , why are you breaking it apart in to its different sub values? btw, pnpi8042 is probably one of the worst samples from which you should learn from.
d
debt from my phone
From: xxxxx@hotmail.com
Sent: 7/22/2012 11:04 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] TopOfStack
Hi Doron,
Am I right in thinking you wrote or worked on pnpi8042 for quite sometime? I’m not sure if I was reading about someone else.
I seem to have a really strange problem. I’ve been playing about with a keyboard driver, porting from a filter to an actual driver. I thought with all the documentation and sourcecode this would be quite an interesting example to learn with and from. With your code I’ve read a little bit more into stacks and so thankyou very much.
The problem I have is, I am receiving a IOCTL function of 0x000000 from somewhere up in the stack. (I have verified kbdclass is in my stack via devcon.exe stack) The fulll IOCTL is 0x000B0003.
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
I will remember that for next time, because normally the IOCTL’s are displayed as IOCTL(FILE_DEVICE_KEYBOARD, 0x080, METHOD_NEITHER, FILE_ANY_ACCESS) and I cannot find a reference to the function 0x0. To be honest PNPI8042 doesn’t look too hard, even with one or two issues it seems ok. I’m reading though taking it piece by piece.
Thankyou very much Doron, you’re answer is perfect.
xxxxx@hotmail.com wrote:
The problem I have is, I am receiving a IOCTL function of 0x000000 from somewhere up in the stack. (I have verified kbdclass is in my stack via devcon.exe stack) The fulll IOCTL is 0x000B0003.
000b0003 = IOCTL_HID_GET_DEVICE_DESCRIPTOR
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Thanks Tim.
xxxxx@hotmail.com wrote:
The problem I have is, I am receiving a IOCTL function of 0x000000 from
somewhere up in the stack. (I have verified kbdclass is in my stack via
devcon.exe stack) The fulll IOCTL is 0x000B0003.
000b0003 = IOCTL_HID_GET_DEVICE_DESCRIPTOR
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.