MsiProvideQualifiedComponent

[This is preliminary documentation and subject to change.]

The MsiProvideQualifiedComponent function returns the full component path for a qualified component and performs any necessary installation. This function prompts for source if necessary and increments the usage count for the feature.

UINT MsiProvideQualifiedComponent(
  LPCTSTR szComponent,  // component ID
  LPCTSTR szQualifier,  // specifies which component to access
  DWORD dwInstallMode,  // the install mode
  LPTSTR lpPathBuf,     // in/out returned path, NULL if not needed
  DWORD *pcchPathBuf    // in/out buffer character count
);
 

Parameters

szComponent
Specifies the component ID that for the requested component. This may not be the GUID for the component itself but rather a server that provides the correct functionality, as in the ComponentID column of the PublishComponent table.
szQualifier
Specifies a qualifier into a list of advertising components (from PublishComponent Table).
dwInstallMode
Defines the installation mode. This parameter can be one of the following values.
Value Meaning
INSTALLMODE_DEFAULT Provide the component, performing any installation, if necessary.
INSTALLMODE_EXISTING Provide the component only if the feature exists, else return ERROR_FILE_NOT_FOUND.
combination of the REINSTALLMODE flags Call MsiReinstallFeature to reinstall feature using this parameter for the dwReinstallMode parameter, and then provide the component.

lpPathBuf
Pointer to a variable that receives the path to the component. This parameter can be NULL.
pcchPathBuf
Pointer to a variable that specifies the size, in characters, of the buffer pointed to by the lpPathBuf parameter.

If lpPathBuf is NULL, pcchBuf can be NULL.

Return Values

ERROR_INDEX_ABSENT
Component qualifier not present.
ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function.
ERROR_SUCCESS
The function completed successfully.
ERROR_FILE_NOT_FOUND
The feature is absent or broken. this error is returned for dwInstallMode = INSTALLMODE_EXISTING.
ERROR_UNKNOWN_COMPONENT
The specified component is unknown.
Any Action Error
An error relating to an action occurred.
Any Initialization Error
An error relating to initialization occurred.

Remarks

Upon success of the MsiProvideQualifiedComponent function, the pcchPathBuf parameter contains the length of the string in lpPathBuf.

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

Component-Specific Functions