What is the ideal way for a KMDF driver to determine which instance of our
DLL (which user mode app) sent the WDFREQUEST?
What our driver must do is enforce that one and only one app open certain
items like channels on our boards.
OriginalFileObject was chosen many moons ago by another engineer for unknown
reasons with unknown guidance. I need to have a means to positively and
uniquely identify which HANDLE was used in the call to
DeviceIoControl(hDevice, ...) ---OR--- uniquely identify the process by its
process ID.
As always, all input is appreciated. John Bond
You can either use the WDFFILEOBJECT by using WdfRequestGetFileObject
or you can use
IoGetRequestorProcessId( WdfRequestWdmGetIrp( Request ) );
If you are tracking data based on this I would use the WDFFILEOBJECT
and have a context for your stuff. I've done this successfully in a couple
of drivers.
--
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
"John Bond" <john...@newsgroup.nospam> wrote in message
news:E26E5EB4-CA6C-49D2...@microsoft.com...
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4745 (20100105) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4745 (20100105) __________
The message was checked by ESET NOD32 Antivirus.
IoGetRequestorProcess
--
Maxim S. Shatskih
Windows DDK MVP
ma...@storagecraft.com
d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Don Burn" <bu...@stopspam.windrvr.com> wrote in message
news:#gWF1Nij...@TK2MSFTNGP02.phx.gbl...