MsiEnumProductsEx (msi)
Last changed: janiek.buysrogge@gmail.com-194.78.138.114

.
Summary
The MsiEnumProductsEx function enumerates through one or all the instances of products that are currently advertised or installed in the specified contexts. This function supersedes MsiEnumProducts.

C# Signature:

[DllImport("msi.dll",
        EntryPoint="MsiEnumProductsExW",
        CharSet = CharSet.Unicode,
        ExactSpelling=true,
        CallingConvention=CallingConvention.StdCall)]
public static extern uint MsiEnumProductsEx(
        string szProductCode,
        string szUserSid,
        uint dwContext,
        uint dwIndex,
        string szInstalledProductCode,
        out object pdwInstalledProductContext,
        string szSid,
        ref uint pccSid)

User-Defined Types:

    public enum MSIINSTALLCONTEXT
    {
        MSIINSTALLCONTEXT_NONE      =   0,
        MSIINSTALLCONTEXT_USERMANAGED   =   1,
        MSIINSTALLCONTEXT_USERUNMANAGED =   2,
        MSIINSTALLCONTEXT_MACHINE       =   4,
        MSIINSTALLCONTEXT_ALL       = (MSIINSTALLCONTEXT_USERMANAGED | MSIINSTALLCONTEXT_USERUNMANAGED | MSIINSTALLCONTEXT_MACHINE),    
    }

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation