MsiGetFeatureUsageA function (msi.h)
The MsiGetFeatureUsage function returns the usage metrics for a product feature.
Syntax
UINT MsiGetFeatureUsageA(
[in] LPCSTR szProduct,
[in] LPCSTR szFeature,
[out] LPDWORD pdwUseCount,
[out] LPWORD pwDateUsed
);
Parameters
[in] szProduct
Specifies the product code for the product that contains the feature.
[in] szFeature
Specifies the feature code for the feature for which metrics are to be returned.
[out] pdwUseCount
Indicates the number of times the feature has been used.
[out] pwDateUsed
Specifies the date that the feature was last used. The date is in the MS-DOS date format, as shown in the following table.
Bits | Meaning |
---|---|
|
Day of the month (1-31) |
|
Month (1 = January, 2 = February, and so on) |
|
Year offset from 1980 (add 1980 to get actual year) |
Return value
The MsiGetFeatureUsage function returns the following values.
Value | Meaning |
---|---|
|
The configuration data is corrupt. |
|
No usage information is available or the product or feature is invalid. |
|
The function completed successfully. |
Remarks
Note
The msi.h header defines MsiGetFeatureUsage as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003 or Windows XP. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version. |
Target Platform | Windows |
Header | msi.h |
Library | Msi.lib |
DLL | Msi.dll |