2

I'm trying to work out if I can check if a particular video card device driver is loaded in Windows Server 2003 using C++. Can anyone give me pointers on how I might achieve this?

Thanks

Chris McAtackney
  • 5,192
  • 8
  • 45
  • 69

1 Answers1

5

Use EnumDeviceDrivers - there's an example here.

  • Thanks for the link - quick question though, where do I get psapi.h from? – Chris McAtackney Apr 15 '09 at 11:00
  • 1
    It's part of what Microsoft call the Platform SDK - it should be part of recent MS development environments and it is also available separately from MS. –  Apr 15 '09 at 12:45
  • Hi Neil, I'm getting the following error when trying to compile the example you linked to; Error 1 error LNK2019: unresolved external symbol _GetDeviceDriverBaseNameW@12 referenced in function _main DriverChecker.obj DriverChecker Any idea what might be causing this? – Chris McAtackney Apr 15 '09 at 14:30
  • GetDeviceDriverBasename is part of the same library as EnumDeviceDrivers, so if one works, so should the other - I'm afraid I don't have an answer to this! –  Apr 15 '09 at 15:08
  • Sorry, the other one isn't working either - should have included that too; error LNK2019: unresolved external symbol _GetDeviceDriverBaseNameW@12 referenced in function _main error LNK2019: unresolved external symbol _EnumDeviceDrivers@12 referenced in function _main – Chris McAtackney Apr 16 '09 at 08:36
  • http://stackoverflow.com/questions/18432745/visual-studio-c-link-with-psapi-lib check this for solving your problem. – Heena Goyal Mar 19 '14 at 07:09