Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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.

BitsMeaning
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.

ValueMeaning
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.

 

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

Msi.h

Library

Msi.lib

DLL

Msi.dll

Unicode and ANSI names

MsiGetFeatureUsageW (Unicode) and MsiGetFeatureUsageA (ANSI)

See also

System Status Functions

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.