Jump-start your project by learning from devs who
write Windows drivers and file systems every day.
Take an OSR seminar!

OSR is Hiring! Click here to find out more.

Windows Internals & Software Drivers Lab, Santa Clara, CA 5-9 August, 2013
Kernel Debugging & Crash Analysis for Windows Lab, Santa Clara, CA 9-13 September, 2013
Upcoming OSR Seminars:
Writing WDF Drivers for Windows Lab, Boston, MA 7-11 October, 2013
Developing File Systems for Windows, Seattle, WA 5-8 November, 2013


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 9  
21 Jul 12 16:00
nahc little
xxxxxx@hotmail.com
Join Date: 04 Sep 2009
Posts To This List: 166
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,
  Message 2 of 9  
21 Jul 12 23:54
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 8290
RE: TopOfStack

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
  Message 3 of 9  
22 Jul 12 12:49
nahc little
xxxxxx@hotmail.com
Join Date: 04 Sep 2009
Posts To This List: 166
RE: TopOfStack

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
  Message 4 of 9  
23 Jul 12 02:04
nahc little
xxxxxx@hotmail.com
Join Date: 04 Sep 2009
Posts To This List: 166
RE: 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.
  Message 5 of 9  
23 Jul 12 02:34
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 8290
RE: TopOfStack

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 --
  Message 6 of 9  
23 Jul 12 02:49
nahc little
xxxxxx@hotmail.com
Join Date: 04 Sep 2009
Posts To This List: 166
RE: TopOfStack

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.
  Message 7 of 9  
23 Jul 12 04:39
nahc little
xxxxxx@hotmail.com
Join Date: 04 Sep 2009
Posts To This List: 166
RE: TopOfStack

Thankyou very much Doron, you're answer is perfect.
  Message 8 of 9  
23 Jul 12 13:33
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 8271
Re: TopOfStack

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.
  Message 9 of 9  
23 Jul 12 20:55
nahc little
xxxxxx@hotmail.com
Join Date: 04 Sep 2009
Posts To This List: 166
RE: TopOfStack

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.
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 17:12.


Copyright ©2012, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license