ReadWriteConfigSpace : How to obtain value of deviceObject ?

Hello,

I’m calling to ReadWriteConfigSpace (deviceObject,
0,
&Vendor,
0,
2);

The call to ReadWriteConfigSpace (copied AS IS from http://msdn.microsoft.com/en-us/library/windows/hardware/ff558707(v=vs.85).aspx ) is done in an IOCTL handler.
Before running ReadWriteConfigSpace I checked with KeGetCurrentIrql() that IRQ=PASSIVE_LEVEL ( 0 )

The driver code is based on wdfsimple (taken from …\7600.16385.1\src\general\toaster\kmdf\func\simple)

The wdfsimple.sys is installed as an upper filter to msisadrv.sys which is a driver for Intel’s ICH bridge.

How should I get the value of deviceObject ?

Thanks,
Zvika

Hello,

Can I do it with:

WDFDEVICE device = WdfIoQueueGetDevice (Queue);

PDEVICE_OBJECT DeviceObject = WdfDeviceWdmGetDeviceObject (device);

Thanks,
Zvika

Yes

d

Bent from my phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ?9/?8/?2014 9:49 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] ReadWriteConfigSpace : How to obtain value of deviceObject ?

Hello,

Can I do it with:

WDFDEVICE device = WdfIoQueueGetDevice (Queue);

PDEVICE_OBJECT DeviceObject = WdfDeviceWdmGetDeviceObject (device);

Thanks,
Zvika


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</mailto:xxxxx></mailto:xxxxx>

Hi Doron,

It works !

Thank you for your help,
Zvika