- how can I get a vista device handle?
- Posted by Wllee on January 30th, 2008
maybe it is easy when you run the function in a wdf device driver. but I have
a wdm driver, want to talk to wdf driver. how can I do that?
IoGetDeviceObjectPointer( &unicodeName, FILE_READ_ATTRIBUTES, &pFile,
&pDevice );
wdfFile = *((WDFFILEOBJECT *)pFile);
wdfDevice = WdfFileObjectGetDevice(wdfFile);
it can get the fileobject and device object when I know the wdf device
name-"unicodeName", and later I force the pointer to WDFFILEOBJCT, it tell
me access memory error.
- Posted by Doron Holan [MSFT] on January 30th, 2008
first, WDF object handles, regardless of type, are only valid within the
driver which created them. as another driver talking to a WDF driver you do
not get access to these handles. WDF object handles cannot be casted from a
WDM structure. why do you want the other driver's WDFDEVICE?
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Wllee" <Wllee@discussions.microsoft.com> wrote in message
news:53AB380D-3203-4244-A71A-A487FC9D90EB@microsoft.com...
- getting handle to device (Drivers) by Brian
- Get device name from a Handle (Development Resources) by Sergio Peña
- Obtaining Driver handle in Vista using CreateFile() (Drivers) by ramjohnny
- how to stop error -> Configuration Manager: The Specified device instance handle does not correspond to a present device (Microsoft Windows) by Joshua Wood
- How to obtain the handle to a device? (Drivers) by A.T.

