1

I'm writing an application in C++ that displays info about PCI devices.

I'm stuck trying to read device memory range (you can read it from device properties in dev manager as shown below)

link to picture

mmmmmm
  • 32,227
  • 27
  • 88
  • 117
kivrin
  • 11
  • 1

1 Answers1

0

The key here is "application". That's most likely showing you physical addresses, which (almost certainly) are not mapped in your application's address space.

You'll pretty much need to use some sort of device driver to look at that memory. I'm pretty sure I've seen a driver that gave such access -- seems like it was in the DDK, but I can't remember for sure.

Jerry Coffin
  • 476,176
  • 80
  • 629
  • 1,111
  • I have driver that is connected to my application, but I think it is possible to gain this info from user-mode. I'm not shure, but I guess read&write everything can do it. I'm already able to read info from details (using setupapi.dll) – kivrin Mar 15 '12 at 14:33
  • Doesn't Windows have a API for directly accessing the hardware memory addresses? – Spidey Mar 15 '12 at 14:33
  • @Spidey: not that I know of, anyway. – Jerry Coffin Mar 15 '12 at 14:37