📄 msi.h
字号:
#define MsiQueryProductState MsiQueryProductStateA
#endif // !UNICODE
// Return product info
UINT WINAPI MsiGetProductInfoA(
LPCSTR szProduct, // product code, string GUID, or descriptor
LPCSTR szAttribute, // attribute name, case-sensitive
LPSTR lpValueBuf, // returned value, NULL if not desired
DWORD *pcchValueBuf); // in/out buffer character count
UINT WINAPI MsiGetProductInfoW(
LPCWSTR szProduct, // product code, string GUID, or descriptor
LPCWSTR szAttribute, // attribute name, case-sensitive
LPWSTR lpValueBuf, // returned value, NULL if not desired
DWORD *pcchValueBuf); // in/out buffer character count
#ifdef UNICODE
#define MsiGetProductInfo MsiGetProductInfoW
#else
#define MsiGetProductInfo MsiGetProductInfoA
#endif // !UNICODE
// Install a new product.
// Either may be NULL, but the DATABASE property must be specfied
UINT WINAPI MsiInstallProductA(
LPCSTR szPackagePath, // location of package to install
LPCSTR szCommandLine); // command line <property settings>
UINT WINAPI MsiInstallProductW(
LPCWSTR szPackagePath, // location of package to install
LPCWSTR szCommandLine); // command line <property settings>
#ifdef UNICODE
#define MsiInstallProduct MsiInstallProductW
#else
#define MsiInstallProduct MsiInstallProductA
#endif // !UNICODE
// Install/uninstall an advertised or installed product
// No action if installed and INSTALLSTATE_DEFAULT specified
UINT WINAPI MsiConfigureProductA(
LPCSTR szProduct, // product code OR descriptor
int iInstallLevel, // how much of the product to install
INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
UINT WINAPI MsiConfigureProductW(
LPCWSTR szProduct, // product code OR descriptor
int iInstallLevel, // how much of the product to install
INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
#ifdef UNICODE
#define MsiConfigureProduct MsiConfigureProductW
#else
#define MsiConfigureProduct MsiConfigureProductA
#endif // !UNICODE
// Reinstall product, used to validate or correct problems
UINT WINAPI MsiReinstallProductA(
LPCSTR szProduct, // product code OR descriptor
DWORD szReinstallMode); // one or more REINSTALLMODE modes
UINT WINAPI MsiReinstallProductW(
LPCWSTR szProduct, // product code OR descriptor
DWORD szReinstallMode); // one or more REINSTALLMODE modes
#ifdef UNICODE
#define MsiReinstallProduct MsiReinstallProductW
#else
#define MsiReinstallProduct MsiReinstallProductA
#endif // !UNICODE
// Return the product code for a registered component, called once by apps
UINT WINAPI MsiGetProductCodeA(
LPCSTR szComponent, // component Id registered for this product
LPSTR lpBuf39); // returned string GUID, sized for 39 characters
UINT WINAPI MsiGetProductCodeW(
LPCWSTR szComponent, // component Id registered for this product
LPWSTR lpBuf39); // returned string GUID, sized for 39 characters
#ifdef UNICODE
#define MsiGetProductCode MsiGetProductCodeW
#else
#define MsiGetProductCode MsiGetProductCodeA
#endif // !UNICODE
// Return the registered user information for an installed product
USERINFOSTATE WINAPI MsiGetUserInfoA(
LPCSTR szProduct, // product code, string GUID
LPSTR lpUserNameBuf, // return user name
DWORD *pcchUserNameBuf, // in/out buffer character count
LPSTR lpOrgNameBuf, // return company name
DWORD *pcchOrgNameBuf, // in/out buffer character count
LPSTR lpSerialBuf, // return product serial number
DWORD *pcchSerialBuf); // in/out buffer character count
USERINFOSTATE WINAPI MsiGetUserInfoW(
LPCWSTR szProduct, // product code, string GUID
LPWSTR lpUserNameBuf, // return user name
DWORD *pcchUserNameBuf, // in/out buffer character count
LPWSTR lpOrgNameBuf, // return company name
DWORD *pcchOrgNameBuf, // in/out buffer character count
LPWSTR lpSerialBuf, // return product serial number
DWORD *pcchSerialBuf); // in/out buffer character count
#ifdef UNICODE
#define MsiGetUserInfo MsiGetUserInfoW
#else
#define MsiGetUserInfo MsiGetUserInfoA
#endif // !UNICODE
// Obtain and store user info and PID from installation wizard (first run)
UINT WINAPI MsiCollectUserInfoA(
LPCSTR szProduct); // product code, string GUID
UINT WINAPI MsiCollectUserInfoW(
LPCWSTR szProduct); // product code, string GUID
#ifdef UNICODE
#define MsiCollectUserInfo MsiCollectUserInfoW
#else
#define MsiCollectUserInfo MsiCollectUserInfoA
#endif // !UNICODE
// --------------------------------------------------------------------------
// Functions to query and configure a feature within a product.
// Separate wrapper functions are provided that accept a descriptor string.
// --------------------------------------------------------------------------
// Return the installed state for a product feature
INSTALLSTATE WINAPI MsiQueryFeatureStateA(
LPCSTR szProduct,
LPCSTR szFeature);
INSTALLSTATE WINAPI MsiQueryFeatureStateW(
LPCWSTR szProduct,
LPCWSTR szFeature);
#ifdef UNICODE
#define MsiQueryFeatureState MsiQueryFeatureStateW
#else
#define MsiQueryFeatureState MsiQueryFeatureStateA
#endif // !UNICODE
// Indicate intent to use a product feature, increments usage count
// Prompts for CD if not loaded, does not install feature
INSTALLSTATE WINAPI MsiUseFeatureA(
LPCSTR szProduct,
LPCSTR szFeature);
INSTALLSTATE WINAPI MsiUseFeatureW(
LPCWSTR szProduct,
LPCWSTR szFeature);
#ifdef UNICODE
#define MsiUseFeature MsiUseFeatureW
#else
#define MsiUseFeature MsiUseFeatureA
#endif // !UNICODE
// Return the usage metrics for a product feature
UINT WINAPI MsiGetFeatureUsageA(
LPCSTR szProduct, // product code
LPCSTR szFeature, // feature ID
DWORD *pdwUseCount, // returned use count
WORD *pwDateUsed); // last date used (DOS date format)
UINT WINAPI MsiGetFeatureUsageW(
LPCWSTR szProduct, // product code
LPCWSTR szFeature, // feature ID
DWORD *pdwUseCount, // returned use count
WORD *pwDateUsed); // last date used (DOS date format)
#ifdef UNICODE
#define MsiGetFeatureUsage MsiGetFeatureUsageW
#else
#define MsiGetFeatureUsage MsiGetFeatureUsageA
#endif // !UNICODE
// Force the installed state for a product feature
UINT WINAPI MsiConfigureFeatureA(
LPCSTR szProduct,
LPCSTR szFeature,
INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
UINT WINAPI MsiConfigureFeatureW(
LPCWSTR szProduct,
LPCWSTR szFeature,
INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
#ifdef UNICODE
#define MsiConfigureFeature MsiConfigureFeatureW
#else
#define MsiConfigureFeature MsiConfigureFeatureA
#endif // !UNICODE
// Reinstall feature, used to validate or correct problems
UINT WINAPI MsiReinstallFeatureA(
LPCSTR szProduct, // product code
LPCSTR szFeature, // feature ID, NULL for entire product
DWORD dwReinstallMode); // one or more REINSTALLMODE modes
UINT WINAPI MsiReinstallFeatureW(
LPCWSTR szProduct, // product code
LPCWSTR szFeature, // feature ID, NULL for entire product
DWORD dwReinstallMode); // one or more REINSTALLMODE modes
#ifdef UNICODE
#define MsiReinstallFeature MsiReinstallFeatureW
#else
#define MsiReinstallFeature MsiReinstallFeatureA
#endif // !UNICODE
// --------------------------------------------------------------------------
// Functions to return a path to a particular component.
// The state of the feature being used should have been checked previously.
// --------------------------------------------------------------------------
// Return full path to an installed component
INSTALLSTATE WINAPI MsiLocateComponentA(
LPCSTR szComponent, // component Id, string GUID
LPSTR lpPathBuf, // returned path
DWORD *pcchBuf); // in/out buffer character count
INSTALLSTATE WINAPI MsiLocateComponentW(
LPCWSTR szComponent, // component Id, string GUID
LPWSTR lpPathBuf, // returned path
DWORD *pcchBuf); // in/out buffer character count
#ifdef UNICODE
#define MsiLocateComponent MsiLocateComponentW
#else
#define MsiLocateComponent MsiLocateComponentA
#endif // !UNICODE
// Return full component path, performing any necessary installation
// calls MsiQueryFeatureState to detect that all components are installed
// then calls MsiConfigureFeature if any of its components are uninstalled
// then calls MsiLocateComponent to obtain the path the its key file
UINT WINAPI MsiProvideComponentA(
LPCSTR szProduct, // product code in case install required
LPCSTR szFeature, // feature ID in case install required
LPCSTR szComponent, // component ID
DWORD dwReserved, // reserved, must be 0
LPSTR lpPathBuf, // returned path, NULL if not desired
DWORD *pcchPathBuf);// in/out buffer character count
UINT WINAPI MsiProvideComponentW(
LPCWSTR szProduct, // product code in case install required
LPCWSTR szFeature, // feature ID in case install required
LPCWSTR szComponent, // component ID
DWORD dwReserved, // reserved, must be 0
LPWSTR lpPathBuf, // returned path, NULL if not desired
DWORD *pcchPathBuf);// in/out buffer character count
#ifdef UNICODE
#define MsiProvideComponent MsiProvideComponentW
#else
#define MsiProvideComponent MsiProvideComponentA
#endif // !UNICODE
// For an advertised component that registers descriptor strings,
// return full component path, performing any necessary installation.
// If the qualifier is NULL the default component, if present, will
// be provided. Calls MsiProvideComponentFromDescriptor to install
// and return the path.
UINT WINAPI MsiProvideQualifiedComponentA(
LPCSTR szCategory, // component category ID
LPCSTR szQualifier, // specifies which component to access
DWORD dwReserved, // reserved, must be 0
LPSTR lpPathBuf, // returned path, NULL if not desired
DWORD *pcchPathBuf); // in/out buffer character count
UINT WINAPI MsiProvideQualifiedComponentW(
LPCWSTR szCategory, // component category ID
LPCWSTR szQualifier, // specifies which component to access
DWORD dwReserved, // reserved, must be 0
LPWSTR lpPathBuf, // returned path, NULL if not desired
DWORD *pcchPathBuf); // in/out buffer character count
#ifdef UNICODE
#define MsiProvideQualifiedComponent MsiProvideQualifiedComponentW
#else
#define MsiProvideQualifiedComponent MsiProvideQualifiedComponentA
#endif // !UNICODE
// --------------------------------------------------------------------------
// Functions to iterate registered products, features, and components.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -