MsiEnumComponentQualifiers

[This is preliminary documentation and subject to change.]

The MsiEnumComponentQualifiers function enumerates the advertised qualifiers for the given component. This function retrieves one qualifier each time it is called.

UINT MsiEnumComponentQualifiers(
  LPTSTR szComponent,           // component ID 
  DWORD iIndex,                 // 0-based index into component qualifiers
  LPTSTR lpQualifierBuf,        // buffer to return qualifier
  DWORD *pcchQualifierBuf,      // in/out qualifier buffer character count
  LPTSTR lpApplicationDataBuf,  // buffer to return application-registered data
  DWORD *pcchApplicationDataBuf // in/out lpApplicationDataBuf character count
);
 

Parameters

szComponent
Specifies component whose qualifiers are to be enumerated.
iIndex
Specifies the index of the qualifier to retrieve. This parameter should be zero for the first call to the MsiEnumComponentQualifiers function and then incremented for subsequent calls. Because qualifiers are not ordered, any new qualifier has an arbitrary index. This means that the function can return qualifiers in any order.
lpQualifierBuf
Pointer to a buffer that receives the qualifier code.
pcchQualifierBuf
Pointer to a variable that specifies the size, in characters, of the buffer pointed to by the lpQualifierBuf parameter. On input this size should include the terminating NULL character. On return, the value does not include the NULL character.
lpApplicationDataBuf
Pointer to a buffer that receives the application registered data for the qualifier. This parameter can be NULL.
pcchApplicationDataBuf
Pointer to a variable that specifies the size, in characters, of the buffer pointed to by the lpApplicationDataBuf parameter. On input this size should include the terminating NULL character. On return, the value does not include the NULL character. This parameter can be NULL only if the lpApplicationDataBuf parameter is NULL.

Return Values

ERROR_BAD_CONFIGURATION
The configuration data is corrupt.
ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function.
ERROR_MORE_DATA
A buffer is to small to hold the requested data.
ERROR_NO_MORE_ITEMS
There are no qualifiers to return.
ERROR_SUCCESS
A value was enumerated.
ERROR_UNKNOWN_COMPONENT
The specified component is unknown.

Remarks

To enumerate qualifiers, an application should initially call the MsiEnumComponentQualifiers function with the iIndex parameter set to zero. The application should then increment the iIndex parameter and call MsiEnumComponentQualifiers until there are no more products (that is, until the function returns ERROR_NO_MORE_ITEMS).

When MsiEnumComponentQualifiers returns, the pcchQualifierBuf parameter contains the length of the qualifier string stored in the buffer. The count returned does not include the terminating null character. If the buffer is not big enough, MsiEnumComponentQualifiers returns ERROR_MORE_DATA, and this parameter contains the size of the string, in characters, without counting the NULL character. The same mechanism applies to pcchDescriptionBuf.

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