MsiEnumProducts

[This is preliminary documentation and subject to change.]

The MsiEnumProducts function enumerates advertising products. The function retrieves one product code each time it is called.

UINT MsiEnumProducts(
  DWORD iProductIndex, // 0-based index into registered products
  LPTSTR lpProductBuf  // buffer to receive GUID
);
 

Parameters

iProductIndex
Specifies the index of the product to retrieve. This parameter should be zero for the first call to the MsiEnumProducts function and then incremented for subsequent calls. Because products are not ordered, any new product has an arbitrary index. This means that the function can return products 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 products to return.
ERROR_SUCCESS
A value was enumerated.

Remarks

To enumerate products, an application should initially call the MsiEnumProducts function with the iProductIndex parameter set to zero. The application should then increment the iProductIndex parameter and call MsiEnumProducts until there are no more products (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