为什么在Windows SDK中找不到cfgmgr32.lib? [英] Why can't I find cfgmgr32.lib in the Windows SDK?

查看:199
本文介绍了为什么在Windows SDK中找不到cfgmgr32.lib?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Configuration Manager API,例如, CM_Get_Device_ID 。该文档说要链接到 cfgmgr32.lib

I'm trying to use the Configuration Manager API, e.g., CM_Get_Device_ID. The documentation says to link to cfgmgr32.lib.

但是,当我这样做时,我会收到一条错误消息来自链接器:

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


错误1错误LNK1104:无法打开文件'cfgmgr32.lib'

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

在Windows SDK中的任何地方都找不到 cfgmgr32.lib

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

如果我遗漏了 cfgmgr32.lib ,我会得到未解决的外部符号错误。

If I leave out cfgmgr32.lib I get unresolved external symbol errors.

如何使用配置管理器API?

How can I use the Configuration Manager API?

推荐答案

如果您使用的Windows SDK版本不包含 cfgmgr32 .lib ,则应链接到 setupapi.lib 。其中包含配置管理器功能。

If the version of the Windows SDK you are using does not contain cfgmgr32.lib, you should link to setupapi.lib instead. This contains the Configuration Manager functions.

请注意(取决于您的工作),最好使用更新的设置API 而不是配置管理器API。

Note that (depending on what you are doing) it may be preferable to use the more recent Setup API instead of the Configuration Manager API.

这篇关于为什么在Windows SDK中找不到cfgmgr32.lib?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆