[wdmaudiodev] Kernel Handle from KsCreatePin

  • From: Antonio GÃmez Muriana <senco@xxxxxxxxxxxxxx>
  • To: Lista WDM Audo Dev <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 25 Nov 2005 19:46:04 +0100

I'm still implementing the DirectKS example into MSVAD...

I call to ZwOpenFile to get a handle for the filter. Then I call to KsCreatePin to get another handle for the pin. I have realized is that the filter handle has the bit 31 set, but not the pin handle. I believe that this bit 31 is in order to know if it's a kernel or a user handle.

So that does KsCreatePin return always a user handle? How can I use it between different threads?

In order to send it IOCTLs i call to ObReferenceObjectByHandle to get the File Object. The DDK doc says that I have to call to ObDereferenceObject "as soon as it is done with the object". Do I have to call these funcions each time I need to send an IOCTL? Or can I left it referenced provided that I dereference it before calling ZwClose?

Best regards,

--
Antoino GÃmez Muriana
IRC Crawler Developer
senco@xxxxxxxxxxxxxx
******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts:

  • » [wdmaudiodev] Kernel Handle from KsCreatePin