views:

97

answers:

1

Hi all,

I'm trying to compile the example from here;

http://msdn.microsoft.com/en-us/library/ms682619(VS.85).aspx

I've installed the Platform SDK, but I'm getting these errors;

Error   1 error LNK2019: unresolved external symbol _GetDeviceDriverBaseNameW@12 referenced in function _main DriverChecker.obj DriverChecker
Error   2 error LNK2019: unresolved external symbol _EnumDeviceDrivers@12 referenced in function _main DriverChecker.obj DriverChecker
Error   3 fatal error LNK1120: 2 unresolved externals C:\Files\Projects\VS2008\DriverChecker\Debug\DriverChecker.exe DriverChecker

Anyone any idea how to get this compiling correctly?

+1  A: 

You just need to add psapi.lib as an additional library in your linker options.

Edit properties for your project, navigate to Linker->Input, and type "psapi.lib" where it says Additional Dependencies.

snowcrash09