none
WDF_DECLARE_CONTEXT_TYPE_WITH_NAME bound function fails to return valid pointer RRS feed

  • Question

  • Am using WDF_DECLARE_CONTEXT_TYPE_WITH_NAME in the manner described in http://msdn.microsoft.com/en-us/library/windows/hardware/hh968306(v=vs.85).aspx. however the function always returns a pointer to the pipe context.

    oregonduckman

    Thursday, June 13, 2013 11:49 PM

Answers

All replies

  • First what do you expect it to return?  The web page you refer to shows you how to setup a function to retrieve the pipe context pointer.   Also, if you are going to ask something like this showing the code you believe has a problem, along with a statement like "I got X I expected Y" helps us figure out what you are trying to do.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Friday, June 14, 2013 12:02 AM
  • Sorry about the vagueness of my post. The way I read the example, the function should return a valid pointer to a driver defined structure, no? 

    oregonduckman

    Friday, June 14, 2013 12:27 AM
  • Yes if you define the context type as a struct and have associated a context type with an object, then you should get a valid pointer to the type returned.  See the page http://msdn.microsoft.com/en-us/library/windows/hardware/ff551252(v=vs.85).aspx


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Friday, June 14, 2013 12:45 AM