1
我想从MSI安装文件中使用下面的代码获取产品和公司信息,但即使包含必要的头文件,我仍然收到以下错误。获取MSI产品属性
error: LNK2019: unresolved external symbol [email protected] referenced in function.
error: LNK2019: unresolved external symbol [email protected] referenced in function.
error: LNK2019: unresolved external symbol [email protected] referenced in function.
我的代码如下(我使用QT C++)
#include <Windows.h>
#include <Msi.h>
#include <MsiQuery.h>
LPCWSTR program = L"C:/installer.msi";
MSIHANDLE hProduct = NULL;
LPWSTR pszVersion = NULL;
LPDWORD dwSizeVersion = NULL;
LPCWSTR property = L"IncludeVersion";
MsiOpenPackage(program, &hProduct);
MsiGetProductProperty(hProduct, property, pszVersion, dwSizeVersion);
MsiCloseHandle(hProduct);
什么,我丢失或是否有任何其他方式来获得MSI文件性质的任何想法。
对于包含此更大的示例,请参阅[此帖子](http://stackoverflow.com/a/22625489/129130) –