MsiGetFeatureUsage function
The MsiGetFeatureUsage function returns the usage metrics for a product feature.
Syntax
UINT MsiGetFeatureUsage( _In_ LPCTSTR szProduct, _In_ LPCTSTR szFeature, _Out_ DWORD *pdwUseCount, _Out_ WORD *pwDateUsed );
Parameters
- szProduct [in]
-
Specifies the product code for the product that contains the feature.
- szFeature [in]
-
Specifies the feature code for the feature for which metrics are to be returned.
- pdwUseCount [out]
-
Indicates the number of times the feature has been used.
- pwDateUsed [out]
-
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 - 0 – 4
Day of the month (1-31)
- 5 – 8
Month (1 = January, 2 = February, and so on)
- 9 – 15
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. |
Requirements
|
Version | 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. |
|---|---|
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | MsiGetFeatureUsageW (Unicode) and MsiGetFeatureUsageA (ANSI) |
See also
Build date: 11/30/2012