MsiGetFeatureUsage

[This is preliminary documentation and subject to change.]

The MsiGetFeatureUsage returns the usage metrics for a product feature.

UINT MsiGetFeatureUsage(
  LPCTSTR szProduct,    // product code
  LPCTSTR szFeature,    // feature ID
  DWORD *pdwUseCount,   // returned use count
  WORD *pwDateUsed      // last date used
);
 

Parameters

szProduct
Specifies the product code for the product containing the feature.
szFeature
Specifies the feature code for the feature for which metrics are to be returned.
pdwUseCount
Indicates the number of times the feature has been used.
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 Contents
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 Values

ERROR_BAD_CONFIGURATION
The configuration data is corrupt.
ERROR_INSTALL_FAILURE
No usage information is available or the product or feature is invalid.
ERROR_SUCCESS
The function completed successfully.

QuickInfo

  Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in msi.h.
  Import Library: Use msi.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also

System Status Functions