The MsiEnumComponentQualifiers function enumerates the advertised qualifiers for the given component. This function retrieves one qualifier each time it is called.
Syntax
C++UINT MsiEnumComponentQualifiers(
__in LPTSTR szComponent,
__in DWORD iIndex,
__out LPTSTR lpQualifierBuf,
__inout DWORD *pcchQualifierBuf,
__out LPTSTR lpApplicationDataBuf,
__inout DWORD *pcchApplicationDataBuf
);
Parameters
- szComponent [in]
-
Specifies component whose qualifiers are to be enumerated.
- iIndex [in]
-
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 [out]
-
Pointer to a buffer that receives the qualifier code.
- pcchQualifierBuf [in, out]
-
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 [out]
-
Pointer to a buffer that receives the application registered data for the qualifier. This parameter can be null.
- pcchApplicationDataBuf [in, out]
-
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 Value
Value | Meaning |
---|---|
|
The configuration data is corrupt. |
|
An invalid parameter was passed to the function. |
|
A buffer is to small to hold the requested data. |
|
There are no qualifiers to return. |
|
The system does not have enough memory to complete the operation. Available with Windows Server 2003. |
|
A value was enumerated. |
|
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 qualifiers (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.
When making multiple calls to MsiEnumComponentQualifiers to enumerate all of the component's advertised qualifiers, each call should be made from the same thread.
Requirements
Version | Windows Installer 5.0 on 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, Windows XP, and Windows 2000. 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 | MsiEnumComponentQualifiersW (Unicode) and MsiEnumComponentQualifiersA (ANSI) |
See Also
Send comments about this topic to Microsoft
Build date: 8/13/2009
© 2009 Microsoft Corporation. All rights reserved.