Why can't I find cfgmgr32.lib in the Windows SDK?

I am trying to use a Configuration Manager API like CM_Get_Device_ID . The documentation states that the link to cfgmgr32.lib

.

However, when I do this, I get an error from the linker:

Error 1 error LNK1104: cannot open file 'cfgmgr32.lib'

I can't find cfgmgr32.lib

it anywhere in the Windows SDK.

If I leave cfgmgr32.lib

, I get unresolved external symbol errors.

How can I use the Configuration Manager API?

+3


source to share


1 answer


If the version of the Windows SDK you are using does not contain cfgmgr32.lib

, then you should link to setupapi.lib

. This contains the functionality of the Configuration Manager.



Note that (depending on what you are doing) it is preferable to use the more modern installation API instead of the Configuration Manager API.

+5


source







All Articles