MsiEnumClients

[This is preliminary documentation and subject to change.]

The MsiEnumClients function enumerates the clients for a given installed component. The function retrieves one product code each time it is called.

UINT MsiEnumClients(
  LPCTSTR szComponent, // component code, string GUID
  DWORD iProductIndex, // 0-based index into client products
  LPTSTR lpProductBuf  // buffer to receive GUID
);
 

Parameters

szComponent
Specifies the component whose clients are to be enumerated.
iProductIndex
Specifies the index of the client to retrieve. This parameter should be zero for the first call to the MsiEnumClients function and then incremented for subsequent calls. Because clients are not ordered, any new client has an arbitrary index. This means that the function can return clients in any order.
lpProductBuf
Pointer to a buffer that receives the product code. This buffer must be 39 characters long. The first 38 characters are for the GUID, and the last character is for the terminating NULL character.

Return Values

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

Remarks

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

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