/// The <c>MsiGetPatchFileList</c> function is provided a list of .msp files, delimited by semicolons, and retrieves the list of
/// files that can be updated by the patches.
/// </summary>
/// <param name="szProductCode">
/// A null-terminated string value containing the ProductCode (GUID) of the product which is the target of the patches. This
/// parameter cannot be <c>NULL</c>.
/// </param>
/// <param name="szPatchPackages">
/// A null-terminated string value that contains the list of Windows Installer patches (.msp files). Each patch can be specified by
/// the full path to the patch package. The patches in the list are delimited by semicolons. At least one patch must be specified.
/// </param>
/// <param name="pcFiles">
/// A pointer to a location that receives the number of files that will be updated on this system by this list of patches specified
/// by szPatchList. This parameter is required.
/// </param>
/// <param name="pphFileRecords">
/// A pointer to a location that receives a pointer to an array of records. The first field (0-index) of each record contains the
/// full file path of a file that can be updated when the list of patches in szPatchList are applied on this computer. This
/// parameter is required.
/// </param>
/// <returns>
/// <para>The <c>MsiGetPatchFileList</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The function completed successfully.</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_PARAMETER</term>
/// <term>An invalid parameter was passed to the function.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>The function failed.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para>
/// For example, szPatchList could have the value: "c:\sus\download\cache\Office\sp1.msp; c:\sus\download\cache\Office\QFE1.msp; c:\sus\download\cache\Office\QFEn.msp".
/// </para>
/// <para>
/// This function runs in the context of the caller. The product code is searched in the order of user-unmanaged context,
/// user-managed context, and machine context.
/// </para>
/// <para>You must close all MSIHANDLE objects that are returned by this function by calling the MsiCloseHandle function.</para>
/// <para>If the function fails, you can obtain extended error information by using the MsiGetLastErrorRecord function.</para>
/// <para>For more information about using the <c>MsiGetPatchFileList</c> function see Listing the Files that can be Updated.</para>
/// The <c>MsiGetPatchInfoEx</c> function queries for information about the application of a patch to a specified instance of a product.
/// </summary>
/// <param name="szPatchCode">A null-terminated string that contains the GUID of the patch. This parameter cannot be <c>NULL</c>.</param>
/// <param name="szProductCode">
/// A null-terminated string that contains the ProductCode GUID of the product instance. This parameter cannot be <c>NULL</c>.
/// </param>
/// <param name="szUserSid">
/// <para>
/// A null-terminated string that specifies the security identifier (SID) under which the instance of the patch being queried
/// exists. Using a <c>NULL</c> value specifies the current user.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>Specifies the user that is logged on.</term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>
/// Specifies the enumeration for a specific user ID in the system. The following example identifies a possible user SID: "S-1-3-64-2415071341-1358098788-3127455600-2561".
/// </term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string "S-1-5-18" (system) cannot be used to enumerate products installed as per-machine. If
/// dwContext is <c>MSIINSTALLCONTEXT_MACHINE</c>, szUserSid must be <c>NULL</c>.
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>
/// Restricts the enumeration to a per-user-unmanaged, per-user-managed, or per-machine context. This parameter can be any one of
/// the following values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Context</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED 1</term>
/// <term>Query that is extended to all per<65>user-managed installations for the users that szUserSid specifies.</term>
/// Get the registered support information URL for the patch. For patches that do not include the MoreInfoURL property in the
/// MsiPatchMetadata table, the returned support information URL is an empty string ("").
/// </term>
/// </item>
/// </list>
/// </param>
/// <param name="lpValue">
/// <para>
/// This parameter is a pointer to a buffer that receives the property value. This buffer should be large enough to contain the
/// information. If the buffer is too small, the function returns <c>ERROR_MORE_DATA</c> and sets *pcchValue to the number of
/// <c>TCHAR</c> in the property value, not including the terminating <c>NULL</c> character.
/// </para>
/// <para>
/// If lpValue is set to <c>NULL</c> and pcchValue is set to a valid pointer, the function returns <c>ERROR_SUCCESS</c> and sets
/// *pcchValue to the number of <c>TCHAR</c> in the value, not including the terminating <c>NULL</c> character. The function can
/// then be called again to retrieve the value, with lpValue buffer large enough to contain *pcchValue + 1 characters.
/// </para>
/// <para>
/// If lpValue and pcchValue are both set to <c>NULL</c>, the function returns <c>ERROR_SUCCESS</c> if the value exists, without
/// retrieving the value.
/// </para>
/// </param>
/// <param name="pcchValue">
/// <para>
/// When calling the function, this parameter should be a pointer to a variable that specifies the number of <c>TCHAR</c> in the
/// lpValue buffer. When the function returns, this parameter is set to the size of the requested value whether or not the function
/// copies the value into the specified buffer. The size is returned as the number of <c>TCHAR</c> in the requested value, not
/// including the terminating null character.
/// </para>
/// <para>This parameter can be set to <c>NULL</c> only if lpValue is also <c>NULL</c>. Otherwise, the function returns <c>ERROR_INVALID_PARAMETER</c>.</para>
/// </param>
/// <returns>
/// <para>The <c>MsiGetPatchInfoEx</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Return code</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>ERROR_ACCESS_DENIED</term>
/// <term>The function fails trying to access a resource with insufficient privileges.</term>
/// </item>
/// <item>
/// <term>ERROR_BAD_CONFIGURATION</term>
/// <term>The configuration data is corrupt.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>The function fails and the error is not identified in other error codes.</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_PARAMETER</term>
/// <term>An invalid parameter is passed to the function.</term>
/// </item>
/// <item>
/// <term>ERROR_MORE_DATA</term>
/// <term>The value does not fit in the provided buffer.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The patch is enumerated successfully.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PRODUCT</term>
/// <term>The product that szProduct specifies is not installed on the computer.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PROPERTY</term>
/// <term>The property is unrecognized.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PATCH</term>
/// <term>The patch is unrecognized.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para><c>Windows Installer 2.0:</c> Not supported. This function is available beginning with Windows Installer version 3.0.</para>
/// <para>
/// A user may query patch data for any product instance that is visible. The administrator group can query patch data for any
/// product instance and any user on the computer. Not all values are guaranteed to be available for per-user, non-managed
/// A value of one (1) indicates a product that can be serviced by non-administrators using User Account Control (UAC) Patching. A
/// missing value or a value of 0 (zero) indicates that least-privilege patching is not enabled. Available in Windows Installer 3.0
/// or later.
/// </term>
/// </item>
/// </list>
/// </param>
/// <param name="szValue">
/// <para>
/// A pointer to a buffer that receives the property value. This buffer should be large enough to contain the information. If the
/// buffer is too small, the function returns <c>ERROR_MORE_DATA</c> and sets *pcchValue to the number of <c>TCHAR</c> in the value,
/// not including the terminating NULL character.
/// </para>
/// <para>
/// If lpValue is set to <c>NULL</c> and pcchValue is set to a valid pointer, the function returns <c>ERROR_SUCCESS</c> and sets
/// *pcchValue to the number of <c>TCHAR</c> in the value, not including the terminating NULL character. The function can then be
/// called again to retrieve the value, with lpValue buffer large enough to contain *pcchValue + 1 characters.
/// </para>
/// <para>
/// If lpValue and pcchValue are both set to <c>NULL</c>, the function returns <c>ERROR_SUCCESS</c> if the value exists, without
/// retrieving the value.
/// </para>
/// </param>
/// <param name="pcchValue">
/// <para>
/// A pointer to a variable that specifies the number of <c>TCHAR</c> in the lpValue buffer. When the function returns, this
/// parameter is set to the size of the requested value whether or not the function copies the value into the specified buffer. The
/// size is returned as the number of <c>TCHAR</c> in the requested value, not including the terminating null character.
/// </para>
/// <para>This parameter can be set to <c>NULL</c> only if lpValue is also <c>NULL</c>. Otherwise, the function returns <c>ERROR_INVALID_PARAMETER</c>.</para>
/// </param>
/// <returns>
/// <para>The <c>MsiGetProductInfoEx</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Return code</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>ERROR_ACCESS_DENIED</term>
/// <term>
/// The calling process must have administrative privileges to get information for a product installed for a user other than the
/// current user.
/// </term>
/// </item>
/// <item>
/// <term>ERROR_BAD_CONFIGURATION</term>
/// <term>The configuration data is corrupt.</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_PARAMETER</term>
/// <term>An invalid parameter is passed to the function.</term>
/// </item>
/// <item>
/// <term>ERROR_MORE_DATA</term>
/// <term>A buffer is too small to hold the requested data.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The function completed successfully.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PRODUCT</term>
/// <term>The product is unadvertised or uninstalled.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PROPERTY</term>
/// <term>The property is unrecognized.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>An unexpected internal failure.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para>
/// When the <c>MsiGetProductInfoEx</c> function returns, the pcchValue parameter contains the length of the string that is stored
/// in the buffer. The count returned does not include the terminating null character. If the buffer is not big enough,
/// <c>MsiGetProductInfoEx</c> returns <c>ERROR_MORE_DATA</c>, and the pcchValue parameter contains the size of the string, in
/// <c>TCHAR</c>, without counting the null character.
/// </para>
/// <para>
/// The <c>MsiGetProductInfoEx</c> function ( <c>INSTALLPROPERTY_LOCALPACKAGE</c>) returns a path to the cached package. The cached
/// package is for internal use only. Maintenance mode installations must be invoked through the MsiConfigureFeature,
/// MsiConfigureProduct, or MsiConfigureProductEx functions.
/// </para>
/// <para>
/// The MsiGetProductInfo function returns <c>ERROR_UNKNOWN_PROPERTY</c> if the application being queried is advertised and not
/// installed. For example, if the application is advertised and not installed, a query for <c>INSTALLPROPERTY_INSTALLLOCATION</c>
/// returns an error of <c>ERROR_UNKNOWN_PROPERTY</c>.
/// REINSTALLMODE_USERDATA and REINSTALLMODE_SHORTCUT.
/// </term>
/// </item>
/// <item>
/// <term>INSTALLMODE_EXISTING</term>
/// <term>
/// Provide the component only if the feature exists. Otherwise return ERROR_FILE_NOT_FOUND. This mode verifies that the key file of
/// the component exists.
/// </term>
/// </item>
/// <item>
/// <term>INSTALLMODE_NODETECTION</term>
/// <term>
/// Provide the component only if the feature exists. Otherwise return ERROR_FILE_NOT_FOUND. This mode only checks that the
/// component is registered and does not verify that the key file of the component exists.
/// </term>
/// </item>
/// <item>
/// <term>INSTALLMODE_EXISTING</term>
/// <term>Provide the component only if the feature exists, else return ERROR_FILE_NOT_FOUND.</term>
/// </item>
/// <item>
/// <term>combination of the REINSTALLMODE flags</term>
/// <term>
/// Call MsiReinstallFeature to reinstall feature using this parameter for the dwReinstallMode parameter, and then provide the component.
/// </term>
/// </item>
/// <item>
/// <term>INSTALLMODE_NOSOURCERESOLUTION</term>
/// <term>
/// Provide the component only if the feature's installation state is INSTALLSTATE_LOCAL. If the feature's installation state is
/// INSTALLSTATE_SOURCE, return ERROR_INSTALL_SOURCE_ABSENT. Otherwise return ERROR_FILE_NOT_FOUND. This mode only checks that the
/// component is registered and does not verify that the key file exists.
/// </term>
/// </item>
/// </list>
/// </param>
/// <param name="szProduct">
/// Specifies the product to match that has published the qualified component. If this is null, then this API works the same as MsiProvideQualifiedComponent.
/// </param>
/// <param name="dwUnused1">Reserved. Must be zero.</param>
/// <param name="dwUnused2">Reserved. Must be zero.</param>
/// <param name="lpPathBuf">Pointer to a variable that receives the path to the component. This parameter can be null.</param>
/// <param name="pcchPathBuf">
/// <para>
/// Pointer to a variable that specifies the size, in characters, of the buffer pointed to by the lpPathBuf parameter. On input,
/// this is the full size of the buffer, including a space for a terminating null character. If the buffer passed in is too small,
/// the count returned does not include the terminating null character.
/// </para>
/// <para>If lpPathBuf is null, pcchBuf can be null.</para>
/// </param>
/// <returns>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_INDEX_ABSENT</term>
/// <term>Component qualifier invalid or not present.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The function completed successfully.</term>
/// </item>
/// <item>
/// <term>ERROR_FILE_NOT_FOUND</term>
/// <term>The feature is absent or broken. this error is returned for dwInstallMode = INSTALLMODE_EXISTING.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_COMPONENT</term>
/// <term>The specified component is unknown.</term>
/// </item>
/// <item>
/// <term>An error relating to an action</term>
/// <term>See Error Codes.</term>
/// </item>
/// <item>
/// <term>Initialization Error</term>
/// <term>An error relating to initialization occurred.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para>
/// Upon success of the <c>MsiProvideQualifiedComponentEx</c> function, the pcchPathBuf parameter contains the length of the string
/// in lpPathBuf.
/// </para>
/// <para>
/// Features with components containing a corrupted file or the wrong version of a file must be explicitly reinstalled by the user
/// or by having the application call MsiReinstallFeature.
/// REINSTALLMODE_USERDATA and REINSTALLMODE_SHORTCUT.
/// </term>
/// </item>
/// <item>
/// <term>INSTALLMODE_EXISTING</term>
/// <term>
/// Provide the component only if the feature exists. Otherwise return ERROR_FILE_NOT_FOUND. This mode verifies that the key file of
/// the component exists.
/// </term>
/// </item>
/// <item>
/// <term>INSTALLMODE_NODETECTION</term>
/// <term>
/// Provide the component only if the feature exists. Otherwise return ERROR_FILE_NOT_FOUND. This mode only checks that the
/// component is registered and does not verify that the key file of the component exists.
/// </term>
/// </item>
/// <item>
/// <term>INSTALLMODE_EXISTING</term>
/// <term>Provide the component only if the feature exists, else return ERROR_FILE_NOT_FOUND.</term>
/// </item>
/// <item>
/// <term>combination of the REINSTALLMODE flags</term>
/// <term>
/// Call MsiReinstallFeature to reinstall feature using this parameter for the dwReinstallMode parameter, and then provide the component.
/// </term>
/// </item>
/// <item>
/// <term>INSTALLMODE_NOSOURCERESOLUTION</term>
/// <term>
/// Provide the component only if the feature's installation state is INSTALLSTATE_LOCAL. If the feature's installation state is
/// INSTALLSTATE_SOURCE, return ERROR_INSTALL_SOURCE_ABSENT. Otherwise return ERROR_FILE_NOT_FOUND. This mode only checks that the
/// component is registered and does not verify that the key file exists.
/// </term>
/// </item>
/// </list>
/// </param>
/// <param name="szProduct">
/// Specifies the product to match that has published the qualified component. If this is null, then this API works the same as MsiProvideQualifiedComponent.
/// </param>
/// <param name="dwUnused1">Reserved. Must be zero.</param>
/// <param name="dwUnused2">Reserved. Must be zero.</param>
/// <param name="lpPathBuf">Pointer to a variable that receives the path to the component. This parameter can be null.</param>
/// <param name="pcchPathBuf">
/// <para>
/// Pointer to a variable that specifies the size, in characters, of the buffer pointed to by the lpPathBuf parameter. On input,
/// this is the full size of the buffer, including a space for a terminating null character. If the buffer passed in is too small,
/// the count returned does not include the terminating null character.
/// </para>
/// <para>If lpPathBuf is null, pcchBuf can be null.</para>
/// </param>
/// <returns>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_INDEX_ABSENT</term>
/// <term>Component qualifier invalid or not present.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The function completed successfully.</term>
/// </item>
/// <item>
/// <term>ERROR_FILE_NOT_FOUND</term>
/// <term>The feature is absent or broken. this error is returned for dwInstallMode = INSTALLMODE_EXISTING.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_COMPONENT</term>
/// <term>The specified component is unknown.</term>
/// </item>
/// <item>
/// <term>An error relating to an action</term>
/// <term>See Error Codes.</term>
/// </item>
/// <item>
/// <term>Initialization Error</term>
/// <term>An error relating to initialization occurred.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para>
/// Upon success of the <c>MsiProvideQualifiedComponentEx</c> function, the pcchPathBuf parameter contains the length of the string
/// in lpPathBuf.
/// </para>
/// <para>
/// Features with components containing a corrupted file or the wrong version of a file must be explicitly reinstalled by the user
/// or by having the application call MsiReinstallFeature.
/// The <c>MsiQueryComponentState</c> function returns the installed state for a component. This function can query for a component
/// of an instance of a product that is installed under user accounts other than the current user provided the product is not
/// advertised under the per-user-unmanaged context for a user account other than the current user. The calling process must have
/// administrative privileges to get information for a product installed for a user other than the current user.
/// </summary>
/// <param name="szProductCode">Specifies the ProductCode GUID for the product that contains the component.</param>
/// <param name="szUserSid">
/// <para>
/// Specifies the security identifier (SID) of the account under which the instance of the product being queried exists. If
/// dwContext is not MSIINSTALLCONTEXT_MACHINE, null specifies the current user.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>NULL denotes the currently logged on user.</term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>Specifies enumeration for a particular user in the system. An example of user SID is "S-1-3-64-2415071341-1358098788-3127455600-2561".</term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string "S-1-5-18" (system) cannot be used to enumerate products installed as per-machine. If
/// dwContext is <c>MSIINSTALLCONTEXT_MACHINE</c>, szUserSid must be null.
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>The installation context of the product instance being queried.</para>
/// <list type="table">
/// <listheader>
/// <term>Name</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED</term>
/// <term>Retrieves the component's state for the per<65>user<65>managed instance of the product.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERUNMANAGED</term>
/// <term>Retrieves the component's state for the per<65>user<65>non-managed instance of the product.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_MACHINE</term>
/// <term>Retrieves the component's state for the per-machine instance of the product.</term>
/// </item>
/// </list>
/// </param>
/// <param name="szComponentCode">
/// Specifies the component being queried. Component code GUID of the component as found in the ComponentID column of the Component table.
/// </param>
/// <param name="pdwState">
/// <para>
/// Installation state of the component for the specified product instance. This parameter can return one of the following or null values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>INSTALLSTATE_LOCAL</term>
/// <term>The component is installed locally.</term>
/// </item>
/// <item>
/// <term>INSTALLSTATE_SOURCE</term>
/// <term>The component is installed to run from the source.</term>
/// </item>
/// </list>
/// </param>
/// <returns>
/// <para>The <c>MsiQueryComponentState</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_ACCESS_DENIED</term>
/// <term>
/// The calling process must have administrative privileges to get information for a product installed for a user other than the
/// current user.
/// </term>
/// </item>
/// <item>
/// <term>ERROR_BAD_CONFIGURATION</term>
/// <term>The configuration data is corrupt.</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_PARAMETER</term>
/// <term>An invalid parameter was passed to the function.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The function completed successfully.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_COMPONENT</term>
/// <term>The component ID does not identify a known component.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PRODUCT</term>
/// <term>The product code does not identify a known product.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>Failures that cannot be ascribed to any Windows error code.</term>
/// </item>
/// <item>
/// <term>ERROR_MORE_DATA</term>
/// <term>Buffer too small to get the user SID.</term>
/// </item>
/// </list>
/// <para>For more information, see Displayed Error Messages.</para>
/// The <c>MsiQueryFeatureStateEx</c> function returns the installed state for a product feature. This function can be used to query
/// any feature of an instance of a product installed under the machine account or any context under the current user account or the
/// per-user-managed context under any user account other than the current user. A user must have administrative privileges to get
/// information for a product installed for a user other than the current user.
/// </summary>
/// <param name="szProductCode">ProductCode GUID of the product that contains the feature of interest.</param>
/// <param name="szUserSid">
/// <para>
/// Specifies the security identifier (SID) of the account, under which, the instance of the product being queried exists. If
/// dwContext is not <c>MSIINSTALLCONTEXT_MACHINE</c>, a null value specifies the current user.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>NULL denotes the currently logged on user.</term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>Specifies enumeration for a particular user in the system. An example of user SID is "S-1-3-64-2415071341-1358098788-3127455600-2561".</term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string s-1-5-18 (system) cannot be used to enumerate features of products installed as per-machine.
/// If dwContext is <c>MSIINSTALLCONTEXT_MACHINE</c>, szUserSid must be null.
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>The installation context of the product instance being queried.</para>
/// <list type="table">
/// <listheader>
/// <term>Name</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED</term>
/// <term>Retrieves the feature state for the per-user-managed instance of the product.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERUNMANAGED</term>
/// <term>Retrieves the feature state for the per-user-unmanaged instance of the product.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_MACHINE</term>
/// <term>Retrieves the feature state for the per-machine instance of the product.</term>
/// </item>
/// </list>
/// </param>
/// <param name="szFeature">
/// Specifies the feature being queried. Identifier of the feature as found in the <c>Feature</c> column of the Feature table.
/// </param>
/// <param name="pdwState">
/// <para>
/// Installation state of the feature for the specified product instance. This parameter can return one of the following or null.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>INSTALLSTATE_ADVERTISED</term>
/// <term>This feature is advertised.</term>
/// </item>
/// <item>
/// <term>INSTALLSTATE_LOCAL</term>
/// <term>The feature is installed locally.</term>
/// </item>
/// <item>
/// <term>INSTALLSTATE_SOURCE</term>
/// <term>The feature is installed to run from source.</term>
/// </item>
/// </list>
/// </param>
/// <returns>
/// <para>The <c>MsiQueryFeatureStateEx</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_ACCESS_DENIED</term>
/// <term>
/// A user must have administrative privileges to get information for a product installed for a user other than the current user.
/// </term>
/// </item>
/// <item>
/// <term>ERROR_BAD_CONFIGURATION</term>
/// <term>The configuration data is corrupt.</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_PARAMETER</term>
/// <term>An invalid parameter was passed to the function.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The function completed successfully.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_FEATURE</term>
/// <term>The feature ID does not identify a known feature.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PRODUCT</term>
/// <term>The product code does not identify a known product.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>An unexpected internal failure.</term>
/// </item>
/// </list>
/// <para>For more information, see Displayed Error Messages.</para>
/// </returns>
/// <remarks>
/// The <c>MsiQueryFeatureStateEx</c> function does not validate that the feature is actually accessible. The
/// <c>MsiQueryFeatureStateEx</c> function does not validate the feature ID. <c>ERROR_UNKNOWN_FEATURE</c> is returned for any
/// unknown feature ID. When the query is made on a product installed under the per-user-unmanaged context for a user account other
/// than the current user, the function fails. In this case the function returns <c>ERROR_UNKNOWN_FEATURE</c>, or if the product is
/// advertised only (not installed), <c>ERROR_UNKNOWN_PRODUCT</c> is returned.
/// The <c>MsiSourceListAddMediaDisk</c> function adds or updates a disk of the media source of a registered product or patch. If
/// the disk specified already exists, it is updated with the new values. If the disk specified does not exist, a new disk entry is
/// created with the new values.
/// </summary>
/// <param name="szProductCodeOrPatchCode">
/// The ProductCode or patch GUID of the product or patch. Use a null-terminated string. If the string is longer than 39 characters,
/// the function fails and returns ERROR_INVALID_PARAMETER. This parameter cannot be <c>NULL</c>.
/// </param>
/// <param name="szUserSid">
/// <para>
/// This parameter can be a string SID that specifies the user account that contains the product or patch. The SID is not validated
/// or resolved. An incorrect SID can return ERROR_UNKNOWN_PRODUCT or ERROR_UNKNOWN_PATCH.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>
/// NULL denotes the currently logged on user. When referencing the current user account, szUserSID can be NULL and dwContext can be
/// MSIINSTALLCONTEXT_USERMANAGED or MSIINSTALLCONTEXT_USERUNMANAGED.
/// </term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>Specifies enumeration for a particular user in the system. An example of user SID is "S-1-3-64-2415071341-1358098788-3127455600-2561".</term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string s-1-5-18 (system) cannot be used to enumerate products or patches installed as per-machine.
/// Setting the SID value to s-1-5-18 returns ERROR_INVALID_PARAMETER. When dwContext is set to MSIINSTALLCONTEXT_MACHINE only,
/// szUserSid must be <c>NULL</c>.
/// </para>
/// <para>
/// <c>Note</c> The special SID string s-1-1-0 (everyone) should not be used. Setting the SID value to s-1-1-0 fails and returns
/// ERROR_INVALID_PARAM .
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>
/// This parameter specifies the context of the product or patch instance. This parameter can contain one of the following values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of context</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED</term>
/// <term>The product or patch instance exists in the per-user-managed context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERUNMANAGED</term>
/// <term>The product or patch instance exists in the per-user-unmanaged context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_MACHINE</term>
/// <term>The product or patch instance exists in the per-machine context.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwOptions">
/// <para>The dwOptions value specifies the meaning of szProductCodeOrPatchCode.</para>
/// <list type="table">
/// <listheader>
/// <term>Flag</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSICODE_PRODUCT</term>
/// <term>szProductCodeOrPatchCode is a product code GUID.</term>
/// </item>
/// <item>
/// <term>MSICODE_PATCH</term>
/// <term>szProductCodeOrPatchCode is a patch code GUID.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwDiskId">This parameter provides the ID of the disk being added or updated.</param>
/// <param name="szVolumeLabel">
/// The szVolumeLabel provides the label of the disk being added or updated. An update overwrites the existing volume label in the
/// registry. To change the disk prompt only, get the existing volume label from the registry and provide it in this call along with
/// the new disk prompt. Passing a <c>NULL</c> or empty string for szVolumeLabel registers an empty string (0 bytes in length) as
/// the volume label.
/// </param>
/// <param name="szDiskPrompt">
/// On entry to <c>MsiSourceListAddMediaDisk</c>, szDiskPrompt provides the disk prompt of the disk being added or updated. An
/// update overwrites the registered disk prompt. To change the volume label only, get the existing disk prompt that is registered
/// and provide it when calling <c>MsiSourceListAddMediaDisk</c> along with the new volume label. Passing <c>NULL</c> or an empty
/// string registers an empty string (0 bytes in length) as the disk prompt.
/// </param>
/// <returns>
/// <para>The <c>MsiSourceListAddMediaDisk</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_ACCESS_DENIED</term>
/// <term>
/// The user does not have the ability to read the specified media source or the specified product or patch. This does not indicate
/// whether a media source, product or patch was found.
/// </term>
/// </item>
/// <item>
/// <term>ERROR_BAD_CONFIGURATION</term>
/// <term>The configuration data is corrupt.</term>
/// </item>
/// <item>
/// <term>ERROR_INSTALL_SERVICE_FAILURE</term>
/// <term>The Windows Installer service could not be accessed.</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_PARAMETER</term>
/// <term>An invalid parameter was passed to the function.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The value was successfully reordered.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PATCH</term>
/// <term>The patch was not found.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PRODUCT</term>
/// <term>The product was not found.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>Unexpected internal failure.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para>
/// Administrators can modify the installation of a product or patch instance that exists under the machine context or under their
/// own per-user context (managed or unmanaged.) They can modify the installation of a product or patch instance that exists under
/// any user's per-user-managed context. Administrators cannot modify another user's installation of a product or patch instance
/// that exists under that other user's per-user-unmanaged context.
/// </para>
/// <para>
/// Non-administrators cannot modify the installation of a product or patch instance that exists under another user's per-user
/// context (managed or unmanaged.) They can modify the installation of a product or patch instance that exists under their own
/// per-user-unmanaged context. They can modify the installation of a product or patch instance under the machine context or their
/// own per-user-managed context only if they are enabled to browse for a product or patch source. Users can be enabled to browse
/// for sources by setting policy. For more information, see DisableBrowse, AllowLockdownBrowse, AllowLockDownMedia and
/// The <c>MsiSourceListAddSourceEx</c> function adds or reorders the set of sources of a patch or product in a specified context.
/// It can also create a source list for a patch that does not exist in the specified context.
/// </summary>
/// <param name="szProductCodeOrPatchCode">
/// The ProductCode or patch GUID of the product or patch. Use a null-terminated string. If the string is longer than 39 characters,
/// the function fails and returns <c>ERROR_INVALID_PARAMETER</c>. This parameter cannot be <c>NULL</c>.
/// </param>
/// <param name="szUserSid">
/// <para>
/// This parameter can be a string SID that specifies the user account that contains the product or patch. The SID is not validated
/// or resolved. An incorrect SID can return <c>ERROR_UNKNOWN_PRODUCT</c> or <c>ERROR_UNKNOWN_PATCH</c>. When referencing a machine
/// context, szUserSID must be <c>NULL</c> and dwContext must be <c>MSIINSTALLCONTEXT_MACHINE</c>.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>
/// NULL denotes the currently logged on user. When referencing the current user account, szUserSID can be NULL and dwContext can be
/// MSIINSTALLCONTEXT_USERMANAGED or MSIINSTALLCONTEXT_USERUNMANAGED.
/// </term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>Specifies enumeration for a particular user in the system. An example of a user SID is "S-1-3-64-2415071341-1358098788-3127455600-2561".</term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string s-1-5-18 (system) cannot be used to enumerate products or patches installed as per-machine.
/// Setting the SID value to "S-1-5-18" returns <c>ERROR_INVALID_PARAMETER</c>.
/// </para>
/// <para>
/// <c>Note</c> The special SID string s-1-1-0 (everyone) should not be used. Setting the SID value to "S-1-1-0" fails and returns <c>ERROR_INVALID_PARAM</c>.
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>
/// This parameter specifies the context of the product or patch instance. This parameter can contain one of the following values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of context</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED</term>
/// <term>The product or patch instance exists in the per-user-managed context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERUNMANAGED</term>
/// <term>The product or patch instance exists in the per-user-unmanaged context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_MACHINE</term>
/// <term>The product or patch instance exists in the per-machine context.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwOptions">
/// <para>
/// The dwOptions value determines the interpretation of the szProductCodeOrPatchCode value and the type of sources to clear. This
/// parameter must be a combination of one of the following <c>MSISOURCETYPE_</c> constants and one of the following <c>MSICODE_</c> constants.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Flag</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSISOURCETYPE_NETWORK</term>
/// <term>The source is a network type.</term>
/// </item>
/// <item>
/// <term>MSISOURCETYPE_URL</term>
/// <term>The source is a URL type.</term>
/// </item>
/// <item>
/// <term>MSICODE_PRODUCT</term>
/// <term>szProductCodeOrPatchCode is a product code.</term>
/// </item>
/// <item>
/// <term>MSICODE_PATCH</term>
/// <term>szProductCodeOrPatchCode is a patch code.</term>
/// </item>
/// </list>
/// </param>
/// <param name="szSource">
/// Source to add or move. This parameter is expected to contain only the path without the filename. The filename is already
/// registered as "PackageName" and can be manipulated through MsiSourceListSetInfo. This argument is required.
/// </param>
/// <param name="dwIndex">
/// <para>
/// This parameter provides the new index for the source. All sources are indexed in the source list from 1 to N, where N is the
/// count of sources in the list. Every source in the list has a unique index.
/// </para>
/// <para>
/// If <c>MsiSourceListAddSourceEx</c> is called with a new source and dwIndex set to 0 (zero), the new source is appended to the
/// existing list. If dwIndex is set to 0 and the source already exists in the list, no update is done on the list.
/// </para>
/// <para>
/// If <c>MsiSourceListAddSourceEx</c> is called with a new source and dwIndex set to a non-zero value less than count (N), the new
/// source is placed at the specified index and the other sources are re-indexed. If the source already exists, it is moved to the
/// specified index and the other sources are re-indexed.
/// </para>
/// <para>
/// If <c>MsiSourceListAddSourceEx</c> is called with a new source and dwIndex set to a non-zero value greater than the count of
/// sources (N), the new source is appended to the existing list. If the source already exists, it is moved to the end of the list
/// and the other sources are re-indexed.
/// </para>
/// </param>
/// <returns>
/// <para>The <c>MsiSourceListAddSourceEx</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_ACCESS_DENIED</term>
/// <term>The user does not have the ability to add or move a source. Does not indicate whether the product or patch was found.</term>
/// </item>
/// <item>
/// <term>ERROR_BAD_CONFIGURATION</term>
/// <term>The configuration data is corrupt.</term>
/// </item>
/// <item>
/// <term>ERROR_INSTALL_SERVICE_FAILURE</term>
/// <term>Could not access the Windows Installer service.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The source was inserted or updated.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PRODUCT</term>
/// <term>The specified product is unknown.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PATCH</term>
/// <term>The specified patch is unknown.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>Unexpected internal failure.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para>
/// Administrators can modify the installation of a product or patch instance that exists under the machine context or under their
/// own per-user context (managed or unmanaged.) They can modify the installation of a product or patch instance that exists under
/// any user's per-user-managed context. Administrators cannot modify another user's installation of a product or patch instance
/// that exists under that other user's per-user-unmanaged context.
/// </para>
/// <para>
/// Non-administrators cannot modify the installation of a product or patch instance that exists under another user's per-user
/// context (managed or unmanaged.) They can modify the installation of a product or patch instance that exists under their own
/// per-user-unmanaged context. They can modify the installation of a product or patch instance under the machine context or their
/// own per-user-managed context only if they are enabled to browse for a product or patch source. Users can be enabled to browse
/// for sources by setting policy. For more information, see the DisableBrowse, AllowLockdownBrowse, and AlwaysInstallElevated policies.
/// The <c>MsiSourceListClearMediaDisk</c> function provides the ability to remove an existing registered disk under the media
/// source for a product or patch in a specific context.
/// </summary>
/// <param name="szProductCodeOrPatchCode">
/// The ProductCode or patch GUID of the product or patch. Use a null-terminated string. If the string is longer than 39 characters,
/// the function fails and returns ERROR_INVALID_PARAMETER. This parameter cannot be <c>NULL</c>.
/// </param>
/// <param name="szUserSid">
/// <para>
/// This parameter can be a string SID that specifies the user account that contains the product or patch. The SID is not validated
/// or resolved. An incorrect SID can return ERROR_UNKNOWN_PRODUCT or ERROR_UNKNOWN_PATCH.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>
/// NULL denotes the currently logged on user. When referencing the current user account, szUserSID can be NULL and dwContext can be
/// MSIINSTALLCONTEXT_USERMANAGED or MSIINSTALLCONTEXT_USERUNMANAGED.
/// </term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>Specifies enumeration for a particular user in the system. An example of user SID is "S-1-3-64-2415071341-1358098788-3127455600-2561".</term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string s-1-5-18 (system) cannot be used to enumerate products or patches installed as per-machine.
/// Setting the SID value to s-1-5-18 returns ERROR_INVALID_PARAMETER. When dwContext is set to MSIINSTALLCONTEXT_MACHINE only,
/// szUserSid must be <c>NULL</c>.
/// </para>
/// <para>
/// <c>Note</c> The special SID string s-1-1-0 (everyone) should not be used. Setting the SID value to s-1-1-0 fails and returns ERROR_INVALID_PARAM.
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>
/// This parameter specifies the context of the product or patch instance. This parameter can contain one of the following values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of context</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED</term>
/// <term>The product or patch instance exists in the per-user-managed context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERUNMANAGED</term>
/// <term>The product or patch instance exists in the per-user-unmanaged context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_MACHINE</term>
/// <term>The product or patch instance exists in the per-machine context.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwOptions">
/// <para>The dwOptions value specifies the meaning of szProductCodeOrPatchCode.</para>
/// <list type="table">
/// <listheader>
/// <term>Flag</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSICODE_PRODUCT</term>
/// <term>szProductCodeOrPatchCode is a product code GUID.</term>
/// </item>
/// <item>
/// <term>MSICODE_PATCH</term>
/// <term>szProductCodeOrPatchCode is a patch code GUID.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwDiskId">This parameter provides the ID of the disk being removed.</param>
/// <returns>
/// <para>The <c>MsiSourceListClearMediaDisk</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_ACCESS_DENIED</term>
/// <term>
/// The user does not have the ability to read the specified media source or the specified product or patch. This does not indicate
/// whether a media source, product or patch was found.
/// </term>
/// </item>
/// <item>
/// <term>ERROR_BAD_CONFIGURATION</term>
/// <term>The configuration data is corrupt.</term>
/// </item>
/// <item>
/// <term>ERROR_INSTALL_SERVICE_FAILURE</term>
/// <term>The Windows Installer service could not be accessed.</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_PARAMETER</term>
/// <term>An invalid parameter was passed to the function.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The value was successfully removed or not found.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PATCH</term>
/// <term>The patch was not found.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PRODUCT</term>
/// <term>The product was not found.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>Unexpected internal failure.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para>
/// Administrators can modify the installation of a product or patch instance that exists under the machine context or under their
/// own per-user context (managed or unmanaged.) They can modify the installation of a product or patch instance that exists under
/// any user's per-user-managed context. Administrators cannot modify another user's installation of a product or patch instance
/// that exists under that other user's per-user-unmanaged context.
/// </para>
/// <para>
/// Non-administrators cannot modify the installation of a product or patch instance that exists under another user's per-user
/// context (managed or unmanaged.) They can modify the installation of a product or patch instance that exists under their own
/// per-user-unmanaged context. They can modify the installation of a product or patch instance under the machine context or their
/// own per-user-managed context only if they are enabled to browse for a product or patch source. Users can be enabled to browse
/// for sources by setting policy. For more information, see the DisableBrowse, AllowLockdownBrowse, and AlwaysInstallElevated policies.
/// The <c>MsiSourceListClearSource</c> function removes an existing source for a product or patch in a specified context. The patch
/// registration is also removed if the sole source of the patch gets removed and if the patch is not installed by any client in the
/// same context. Specifying that <c>MsiSourceListClearSource</c> remove the current source for this product or patch forces the
/// installer to search the source list for a source the next time a source is required.
/// </summary>
/// <param name="szProductCodeOrPatchCode">
/// The ProductCode or patch GUID of the product or patch. Use a null-terminated string. If the string is longer than 39 characters,
/// the function fails and returns <c>ERROR_INVALID_PARAMETER</c>. This parameter cannot be <c>NULL</c>.
/// </param>
/// <param name="szUserSid">
/// <para>
/// This parameter can be a string SID that specifies the user account that contains the product or patch. The SID is not validated
/// or resolved. An incorrect SID can return <c>ERROR_UNKNOWN_PRODUCT</c> or <c>ERROR_UNKNOWN_PATCH</c>. When referencing a machine
/// context, szUserSID must be <c>NULL</c> and dwContext must be <c>MSIINSTALLCONTEXT_MACHINE</c>.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>
/// NULL denotes the currently logged on user. When referencing the current user account, szUserSID can be NULL and dwContext can be
/// MSIINSTALLCONTEXT_USERMANAGED or MSIINSTALLCONTEXT_USERUNMANAGED.
/// </term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>Specifies enumeration for a particular user in the system. An example of a user SID is "S-1-3-64-2415071341-1358098788-3127455600-2561".</term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string "S-1-5-18" (system) cannot be used to enumerate products or patches installed as per-machine.
/// Setting the SID value to "S-1-5-18" returns <c>ERROR_INVALID_PARAMETER</c>.
/// </para>
/// <para>
/// <c>Note</c> The special SID string "S-1-1-0" (everyone) should not be used. Setting the SID value to "S-1-1-0" fails and returns <c>ERROR_INVALID_PARAM</c>.
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>
/// This parameter specifies the context of the product or patch instance. This parameter can contain one of the following values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of context</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED</term>
/// <term>The product or patch instance exists in the per-user-managed context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERUNMANAGED</term>
/// <term>The product or patch instance exists in the per-user-unmanaged context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_MACHINE</term>
/// <term>The product or patch instance exists in the per-machine context.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwOptions">
/// <para>
/// The dwOptions value determines the interpretation of the szProductCodeOrPatchCode value and the type of sources to clear. This
/// parameter must be a combination of one of the following <c>MSISOURCETYPE_</c> constants and one of the following <c>MSICODE_</c> constants.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Flag</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSISOURCETYPE_NETWORK</term>
/// <term>The source is a network type.</term>
/// </item>
/// <item>
/// <term>MSISOURCETYPE_URL</term>
/// <term>The source is a URL type.</term>
/// </item>
/// <item>
/// <term>MSICODE_PRODUCT</term>
/// <term>szProductCodeOrPatchCode is a product code.</term>
/// </item>
/// <item>
/// <term>MSICODE_PATCH</term>
/// <term>szProductCodeOrPatchCode is a patch code.</term>
/// </item>
/// </list>
/// </param>
/// <param name="szSource">
/// Source to remove. This parameter is expected to contain only the path without the filename. The filename is already registered
/// as "PackageName" and can be manipulated through MsiSourceListSetInfo. This argument is required.
/// </param>
/// <returns>
/// <para>The <c>MsiSourceListClearSource</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_ACCESS_DENIED</term>
/// <term>The user does not have the ability to remove a source. Does not indicate whether the product or patch was found.</term>
/// </item>
/// <item>
/// <term>ERROR_BAD_CONFIGURATION</term>
/// <term>The configuration data is corrupt.</term>
/// </item>
/// <item>
/// <term>ERROR_INSTALL_SERVICE_FAILURE</term>
/// <term>Could not access the Windows Installer service</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_PARAMETER</term>
/// <term>An invalid parameter was passed to the function.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The source was removed or not found.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PATCH</term>
/// <term>The specified patch is unknown.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PRODUCT</term>
/// <term>The specified product is unknown.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>Unexpected internal failure.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para>
/// Administrators can modify the installation of a product or patch instance that exists under the machine context or under their
/// own per-user context (managed or unmanaged.) They can modify the installation of a product or patch instance that exists under
/// any user's per-user-managed context. Administrators cannot modify another user's installation of a product or patch instance
/// that exists under that other user's per-user-unmanaged context.
/// </para>
/// <para>
/// Non-administrators cannot modify the installation of a product or patch instance that exists under another user's per-user
/// context (managed or unmanaged.) They can modify the installation of a product or patch instance that exists under their own
/// per-user-unmanaged context. They can modify the installation of a product or patch instance under the machine context or their
/// own per-user-managed context only if they are enabled to browse for a product or patch source. Users can be enabled to browse
/// for sources by setting policy. For more information, see the DisableBrowse, AllowLockdownBrowse, and AlwaysInstallElevated policies.
/// The <c>MsiSourceListEnumMediaDisks</c> function enumerates the list of disks registered for the media source for a patch or product.
/// </summary>
/// <param name="szProductCodeOrPatchCode">
/// The ProductCode or patch GUID of the product or patch. Use a null-terminated string. If the string is longer than 39 characters,
/// the function fails and returns ERROR_INVALID_PARAMETER. This parameter cannot be <c>NULL</c>.
/// </param>
/// <param name="szUserSid">
/// <para>
/// A string SID that specifies the user account that contains the product or patch. The SID is not validated or resolved. An
/// incorrect SID can return ERROR_UNKNOWN_PRODUCT or ERROR_UNKNOWN_PATCH. When referencing a machine context, szUserSID must be
/// <c>NULL</c> and dwContext must be MSIINSTALLCONTEXT_MACHINE.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>
/// A NULL denotes the currently logged on user. When referencing the current user account, szUserSID can be NULL and dwContext can
/// be MSIINSTALLCONTEXT_USERMANAGED or MSIINSTALLCONTEXT_USERUNMANAGED.
/// </term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>An enumeration for a specific user in the system. An example of a user SID is "S-1-3-64-2415071341-1358098788-3127455600-2561".</term>
/// </item>
/// <item>
/// <term>s-1-1-0</term>
/// <term>The special SID string s-1-1-0 (everyone) specifies enumeration across all users in the system.</term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string s-1-5-18 (system) cannot be used to enumerate products or patches installed as per-machine.
/// Setting the SID value to s-1-5-18 returns ERROR_INVALID_PARAMETER.
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>
/// This parameter specifies the context of the product or patch instance. This parameter can contain one of the following values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of context</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED</term>
/// <term>The product or patch instance exists in the per-user-managed context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERUNMANAGED</term>
/// <term>The product or patch instance exists in the per-user-unmanaged context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_MACHINE</term>
/// <term>The product or patch instance exists in the per-machine context.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwOptions">
/// <para>The dwOptions value that specifies the meaning of szProductCodeOrPatchCode.</para>
/// <list type="table">
/// <listheader>
/// <term>Flag</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSICODE_PRODUCT</term>
/// <term>szProductCodeOrPatchCode is a product code GUID.</term>
/// </item>
/// <item>
/// <term>MSICODE_PATCH</term>
/// <term>szProductCodeOrPatchCode is a patch code GUID.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwIndex">
/// The index of the source to retrieve. This parameter must be 0 (zero) for the first call to the
/// <c>MsiSourceListEnumMediaDisks</c> function, and then incremented for subsequent calls until the function returns ERROR_NO_MORE_ITEMS.
/// </param>
/// <param name="pdwDiskId">
/// On entry to <c>MsiSourceListEnumMediaDisks</c> this parameter provides a pointer to a <c>DWORD</c> to receive the ID of the disk
/// that is being enumerated. This parameter is optional.
/// </param>
/// <param name="szVolumeLabel">
/// <para>
/// An output buffer that receives the volume label of the disk that is being enumerated. This buffer should be large enough to
/// contain the information. If the buffer is too small, the function returns ERROR_MORE_DATA and sets *pcchVolumeLabel to the
/// number of <c>TCHAR</c> in the value, not including the terminating NULL character.
/// </para>
/// <para>
/// If szVolumeLabel and pcchVolumeLabel are both set to <c>NULL</c>, the function returns ERROR_SUCCESS if the value exists,
/// without retrieving the value.
/// </para>
/// </param>
/// <param name="pcchVolumeLabel">
/// <para>
/// A pointer to a variable that specifies the number of <c>TCHAR</c> in the szVolumeLabel buffer. When the function returns, this
/// parameter is the number of <c>TCHAR</c> in the received value, not including the terminating null character.
/// </para>
/// <para>This parameter can be set to <c>NULL</c> only if szVolumeLabel is also <c>NULL</c>, otherwise the function returns ERROR_INVALID_PARAMETER.</para>
/// </param>
/// <param name="szDiskPrompt">
/// <para>
/// An output buffer that receives the disk prompt of the disk that is being enumerated. This buffer should be large enough to
/// contain the information. If the buffer is too small, the function returns ERROR_MORE_DATA and sets *pcchDiskPrompt to the number
/// of <c>TCHAR</c> in the value, not including the terminating NULL character.
/// </para>
/// <para>
/// If the szDiskPrompt is set to <c>NULL</c> and pcchDiskPrompt is set to a valid pointer, the function returns ERROR_SUCCESS and
/// sets *pcchDiskPrompt to the number of <c>TCHAR</c> in the value, not including the terminating NULL character. The function can
/// then be called again to retrieve the value, with szDiskPrompt buffer large enough to contain *pcchDiskPrompt + 1 characters.
/// </para>
/// <para>
/// If szDiskPrompt and pcchDiskPrompt are both set to <c>NULL</c>, the function returns ERROR_SUCCESS if the value exists, without
/// retrieving the value.
/// </para>
/// </param>
/// <param name="pcchDiskPrompt">
/// <para>
/// A pointer to a variable that specifies the number of <c>TCHAR</c> in the szDiskPrompt buffer. When the function returns, this
/// parameter is set to the size of the requested value whether or not the function copies the value into the specified buffer. The
/// size is returned as the number of <c>TCHAR</c> in the requested value, not including the terminating null character.
/// </para>
/// <para>This parameter can be set to <c>NULL</c> only if szDiskPrompt is also <c>NULL</c>, otherwise the function returns ERROR_INVALID_PARAMETER.</para>
/// </param>
/// <returns>
/// <para>The <c>MsiSourceListEnumMediaDisks</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_ACCESS_DENIED</term>
/// <term>
/// The user does not have the ability to read the specified media source or the specified product or patch. This does not indicate
/// whether a media source, product, or patch is found.
/// </term>
/// </item>
/// <item>
/// <term>ERROR_BAD_CONFIGURATION</term>
/// <term>The configuration data is corrupt.</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_PARAMETER</term>
/// <term>An invalid parameter is passed to the function.</term>
/// </item>
/// <item>
/// <term>ERROR_NO_MORE_ITEMS</term>
/// <term>There are no more disks registered for this product or patch.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The value is enumerated successfully.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PATCH</term>
/// <term>The patch is not found.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PRODUCT</term>
/// <term>The product is not found.</term>
/// </item>
/// <item>
/// <term>ERROR_MORE_DATA</term>
/// <term>The buffer that is provided is too small to contain the requested information.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>Unexpected internal failure.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para>
/// When making multiple calls to <c>MsiSourceListEnumMediaDisks</c> to enumerate all the sources for a single product instance,
/// each call must be made from the same thread.
/// </para>
/// <para>
/// An administrator can enumerate per-user unmanaged and managed installations for themselves, per-machine installations, and
/// per-user managed installations for any user. An administrator cannot enumerate per-user unmanaged installations for other users.
/// Non-administrators can only enumerate their own per-user unmanaged and managed installations and per-machine installations.
/// The <c>MsiSourceListEnumMediaDisks</c> function enumerates the list of disks registered for the media source for a patch or product.
/// </summary>
/// <param name="szProductCodeOrPatchCode">
/// The ProductCode or patch GUID of the product or patch. Use a null-terminated string. If the string is longer than 39 characters,
/// the function fails and returns ERROR_INVALID_PARAMETER. This parameter cannot be <c>NULL</c>.
/// </param>
/// <param name="szUserSid">
/// <para>
/// A string SID that specifies the user account that contains the product or patch. The SID is not validated or resolved. An
/// incorrect SID can return ERROR_UNKNOWN_PRODUCT or ERROR_UNKNOWN_PATCH. When referencing a machine context, szUserSID must be
/// <c>NULL</c> and dwContext must be MSIINSTALLCONTEXT_MACHINE.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>
/// A NULL denotes the currently logged on user. When referencing the current user account, szUserSID can be NULL and dwContext can
/// be MSIINSTALLCONTEXT_USERMANAGED or MSIINSTALLCONTEXT_USERUNMANAGED.
/// </term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>An enumeration for a specific user in the system. An example of a user SID is "S-1-3-64-2415071341-1358098788-3127455600-2561".</term>
/// </item>
/// <item>
/// <term>s-1-1-0</term>
/// <term>The special SID string s-1-1-0 (everyone) specifies enumeration across all users in the system.</term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string s-1-5-18 (system) cannot be used to enumerate products or patches installed as per-machine.
/// Setting the SID value to s-1-5-18 returns ERROR_INVALID_PARAMETER.
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>
/// This parameter specifies the context of the product or patch instance. This parameter can contain one of the following values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of context</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED</term>
/// <term>The product or patch instance exists in the per-user-managed context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERUNMANAGED</term>
/// <term>The product or patch instance exists in the per-user-unmanaged context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_MACHINE</term>
/// <term>The product or patch instance exists in the per-machine context.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwOptions">
/// <para>The dwOptions value that specifies the meaning of szProductCodeOrPatchCode.</para>
/// <list type="table">
/// <listheader>
/// <term>Flag</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSICODE_PRODUCT</term>
/// <term>szProductCodeOrPatchCode is a product code GUID.</term>
/// </item>
/// <item>
/// <term>MSICODE_PATCH</term>
/// <term>szProductCodeOrPatchCode is a patch code GUID.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwIndex">
/// The index of the source to retrieve. This parameter must be 0 (zero) for the first call to the
/// <c>MsiSourceListEnumMediaDisks</c> function, and then incremented for subsequent calls until the function returns ERROR_NO_MORE_ITEMS.
/// </param>
/// <param name="pdwDiskId">
/// On entry to <c>MsiSourceListEnumMediaDisks</c> this parameter provides a pointer to a <c>DWORD</c> to receive the ID of the disk
/// that is being enumerated. This parameter is optional.
/// </param>
/// <param name="szVolumeLabel">
/// <para>
/// An output buffer that receives the volume label of the disk that is being enumerated. This buffer should be large enough to
/// contain the information. If the buffer is too small, the function returns ERROR_MORE_DATA and sets *pcchVolumeLabel to the
/// number of <c>TCHAR</c> in the value, not including the terminating NULL character.
/// </para>
/// <para>
/// If szVolumeLabel and pcchVolumeLabel are both set to <c>NULL</c>, the function returns ERROR_SUCCESS if the value exists,
/// without retrieving the value.
/// </para>
/// </param>
/// <param name="pcchVolumeLabel">
/// <para>
/// A pointer to a variable that specifies the number of <c>TCHAR</c> in the szVolumeLabel buffer. When the function returns, this
/// parameter is the number of <c>TCHAR</c> in the received value, not including the terminating null character.
/// </para>
/// <para>This parameter can be set to <c>NULL</c> only if szVolumeLabel is also <c>NULL</c>, otherwise the function returns ERROR_INVALID_PARAMETER.</para>
/// </param>
/// <param name="szDiskPrompt">
/// <para>
/// An output buffer that receives the disk prompt of the disk that is being enumerated. This buffer should be large enough to
/// contain the information. If the buffer is too small, the function returns ERROR_MORE_DATA and sets *pcchDiskPrompt to the number
/// of <c>TCHAR</c> in the value, not including the terminating NULL character.
/// </para>
/// <para>
/// If the szDiskPrompt is set to <c>NULL</c> and pcchDiskPrompt is set to a valid pointer, the function returns ERROR_SUCCESS and
/// sets *pcchDiskPrompt to the number of <c>TCHAR</c> in the value, not including the terminating NULL character. The function can
/// then be called again to retrieve the value, with szDiskPrompt buffer large enough to contain *pcchDiskPrompt + 1 characters.
/// </para>
/// <para>
/// If szDiskPrompt and pcchDiskPrompt are both set to <c>NULL</c>, the function returns ERROR_SUCCESS if the value exists, without
/// retrieving the value.
/// </para>
/// </param>
/// <param name="pcchDiskPrompt">
/// <para>
/// A pointer to a variable that specifies the number of <c>TCHAR</c> in the szDiskPrompt buffer. When the function returns, this
/// parameter is set to the size of the requested value whether or not the function copies the value into the specified buffer. The
/// size is returned as the number of <c>TCHAR</c> in the requested value, not including the terminating null character.
/// </para>
/// <para>This parameter can be set to <c>NULL</c> only if szDiskPrompt is also <c>NULL</c>, otherwise the function returns ERROR_INVALID_PARAMETER.</para>
/// </param>
/// <returns>
/// <para>The <c>MsiSourceListEnumMediaDisks</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_ACCESS_DENIED</term>
/// <term>
/// The user does not have the ability to read the specified media source or the specified product or patch. This does not indicate
/// whether a media source, product, or patch is found.
/// </term>
/// </item>
/// <item>
/// <term>ERROR_BAD_CONFIGURATION</term>
/// <term>The configuration data is corrupt.</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_PARAMETER</term>
/// <term>An invalid parameter is passed to the function.</term>
/// </item>
/// <item>
/// <term>ERROR_NO_MORE_ITEMS</term>
/// <term>There are no more disks registered for this product or patch.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>The value is enumerated successfully.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PATCH</term>
/// <term>The patch is not found.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PRODUCT</term>
/// <term>The product is not found.</term>
/// </item>
/// <item>
/// <term>ERROR_MORE_DATA</term>
/// <term>The buffer that is provided is too small to contain the requested information.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>Unexpected internal failure.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para>
/// When making multiple calls to <c>MsiSourceListEnumMediaDisks</c> to enumerate all the sources for a single product instance,
/// each call must be made from the same thread.
/// </para>
/// <para>
/// An administrator can enumerate per-user unmanaged and managed installations for themselves, per-machine installations, and
/// per-user managed installations for any user. An administrator cannot enumerate per-user unmanaged installations for other users.
/// Non-administrators can only enumerate their own per-user unmanaged and managed installations and per-machine installations.
/// <summary>The <c>MsiSourceListEnumSources</c> function enumerates the sources in the source list of a specified patch or product.</summary>
/// <param name="szProductCodeOrPatchCode">
/// The ProductCode or patch GUID of the product or patch. Use a null-terminated string. If the string is longer than 39 characters,
/// the function fails and returns ERROR_INVALID_PARAMETER. This parameter cannot be <c>NULL</c>.
/// </param>
/// <param name="szUserSid">
/// <para>
/// A string SID that specifies the user account that contains the product or patch. The SID is not validated or resolved. An
/// incorrect SID can return ERROR_UNKNOWN_PRODUCT or ERROR_UNKNOWN_PATCH. When referencing a machine context, szUserSID must be
/// <c>NULL</c> and dwContext must be MSIINSTALLCONTEXT_MACHINE.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>
/// A NULL indicates the current user who is logged on. When referencing the current user account, szUserSID can be NULL and
/// dwContext can be MSIINSTALLCONTEXT_USERMANAGED or MSIINSTALLCONTEXT_USERUNMANAGED.
/// </term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>An enumeration for a specific user in the system. An example of a user SID is "S-1-3-64-2415071341-1358098788-3127455600-2561".</term>
/// </item>
/// <item>
/// <term>s-1-1-0</term>
/// <term>The special SID string s-1-1-0 (everyone) specifies enumeration across all users in the system.</term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string s-1-5-18 (system) cannot be used to enumerate products or patches installed as per-machine.
/// Setting the SID value to s-1-5-18 returns ERROR_INVALID_PARAMETER.
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>The context of the product or patch instance. This parameter can contain one of the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Type of context</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED</term>
/// <term>The product or patch instance exists in the per-user-managed context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERUNMANAGED</term>
/// <term>The product or patch instance exists in the per-user-unmanaged context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_MACHINE</term>
/// <term>The product or patch instance exists in the per-machine context.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwOptions">
/// <para>
/// The dwOptions value determines the interpretation of the szProductCodeOrPatchCode value and the type of sources to clear. This
/// parameter must be a combination of one of the following MSISOURCETYPE_* constants and one of the following MSICODE_* constants.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Flag</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSISOURCETYPE_NETWORK</term>
/// <term>The source is a network type.</term>
/// </item>
/// <item>
/// <term>MSISOURCETYPE_URL</term>
/// <term>The source is a URL type.</term>
/// </item>
/// <item>
/// <term>MSICODE_PRODUCT</term>
/// <term>szProductCodeOrPatchCode is a product code.</term>
/// </item>
/// <item>
/// <term>MSICODE_PATCH</term>
/// <term>szProductCodeOrPatchCode is a patch code.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwIndex">
/// The index of the source to retrieve. This parameter must be 0 (zero) for the first call to the <c>MsiSourceListEnumSources</c>
/// function, and then incremented for subsequent calls until the function returns ERROR_NO_MORE_ITEMS. The index should be
/// incremented only if the previous call returned ERROR_SUCCESS.
/// </param>
/// <param name="szSource">
/// <para>
/// A pointer to a buffer that receives the path to the source that is being enumerated. This buffer should be large enough to
/// contain the received value. If the buffer is too small, the function returns ERROR_MORE_DATA and sets *pcchSource to the number
/// of <c>TCHAR</c> in the value, not including the terminating NULL character.
/// </para>
/// <para>
/// If szSource is set to <c>NULL</c> and pcchSource is set to a valid pointer, the function returns ERROR_SUCCESS and sets
/// *pcchSource to the number of <c>TCHAR</c> in the value, not including the terminating NULL character. The function can then be
/// called again to retrieve the value, with szSource buffer large enough to contain *pcchSource + 1 characters.
/// </para>
/// <para>
/// If szSource and pcchSource are both set to <c>NULL</c>, the function returns ERROR_SUCCESS if the value exists, without
/// retrieving the value.
/// </para>
/// </param>
/// <param name="pcchSource">
/// <para>
/// A pointer to a variable that specifies the number of <c>TCHAR</c> in the szSource buffer. When the function returns, this
/// parameter is set to the size of the requested value whether or not the function copies the value into the specified buffer. The
/// size is returned as the number of <c>TCHAR</c> in the requested value, not including the terminating null character.
/// </para>
/// <para>This parameter can be set to <c>NULL</c> only if szSource is also <c>NULL</c>, otherwise the function returns ERROR_INVALID_PARAMETER.</para>
/// </param>
/// <returns>
/// <para>The <c>MsiSourceListEnumSources</c> function returns the following values.</para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>ERROR_ACCESS_DENIED</term>
/// <term>
/// The user does not have the ability to read the specified source list. This does not indicate whether a product or patch is found.
/// </term>
/// </item>
/// <item>
/// <term>ERROR_BAD_CONFIGURATION</term>
/// <term>The configuration data is corrupt.</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_PARAMETER</term>
/// <term>An invalid parameter is passed to the function.</term>
/// </item>
/// <item>
/// <term>ERROR_MORE_DATA</term>
/// <term>The provided buffer is not sufficient to contain the requested data.</term>
/// </item>
/// <item>
/// <term>ERROR_NO_MORE_ITEMS</term>
/// <term>There are no more sources in the specified list to enumerate.</term>
/// </item>
/// <item>
/// <term>ERROR_SUCCESS</term>
/// <term>A source is enumerated successfully.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PATCH</term>
/// <term>The patch specified is not installed on the computer in the specified contexts.</term>
/// </item>
/// <item>
/// <term>ERROR_UNKNOWN_PRODUCT</term>
/// <term>The product specified is not installed on the computer in the specified contexts.</term>
/// </item>
/// <item>
/// <term>ERROR_FUNCTION_FAILED</term>
/// <term>Unexpected internal failure.</term>
/// </item>
/// </list>
/// </returns>
/// <remarks>
/// <para>
/// When making multiple calls to <c>MsiSourceListEnumSources</c> to enumerate all sources for a single product instance, each call
/// must be made from the same thread.
/// </para>
/// <para>
/// An administrator can enumerate per-user unmanaged and managed installations for themselves, per-machine installations, and
/// per-user managed installations for any user. An administrator cannot enumerate per-user unmanaged installations for other users.
/// Non-administrators can only enumerate their own per-user unmanaged and managed installations and per-machine installations.
/// The <c>MsiSourceListGetInfo</c> function retrieves information about the source list for a product or patch in a specific context.
/// </summary>
/// <param name="szProductCodeOrPatchCode">
/// The ProductCode or patch GUID of the product or patch. Use a null-terminated string. If the string is longer than 39 characters,
/// the function fails and returns ERROR_INVALID_PARAMETER. This parameter cannot be <c>NULL</c>.
/// </param>
/// <param name="szUserSid">
/// <para>
/// This parameter can be a string security identifier (SID) that specifies the user account that contains the product or patch. The
/// SID is not validated or resolved. An incorrect SID can return ERROR_UNKNOWN_PRODUCT or ERROR_UNKNOWN_PATCH. When referencing a
/// machine context, szUserSID must be <c>NULL</c> and dwContext must be MSIINSTALLCONTEXT_MACHINE.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>
/// NULL denotes the currently logged on user. When referencing the current user account, szUserSID can be NULL and dwContext can be
/// MSIINSTALLCONTEXT_USERMANAGED or MSIINSTALLCONTEXT_USERUNMANAGED.
/// </term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>Specifies enumeration for a specific user in the system. An example of a user SID is "S-1-3-64-2415071341-1358098788-3127455600-2561".</term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string s-1-5-18 (system) cannot be used to enumerate products or patches installed as per-machine.
/// Setting the SID value to s-1-5-18 returns ERROR_INVALID_PARAMETER.
/// </para>
/// <para>
/// <c>Note</c> The special SID string s-1-1-0 (everyone) should not be used. Setting the SID value to s-1-1-0 fails and returns ERROR_INVALID_PARAM.
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>
/// This parameter specifies the context of the product or patch instance. This parameter can contain one of the following values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of context</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED</term>
/// <term>The product or patch instance exists in the per-user-managed context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERUNMANAGED</term>
/// <term>The product or patch instance exists in the per-user-unmanaged context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_MACHINE</term>
/// <term>The product or patch instance exists in the per-machine context.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwOptions">
/// <para>The dwOptions value specifies the meaning of szProductCodeOrPatchCode.</para>
/// <list type="table">
/// <listheader>
/// <term>Flag</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSICODE_PRODUCT</term>
/// <term>szProductCodeOrPatchCode is a product code GUID.</term>
/// </item>
/// <item>
/// <term>MSICODE_PATCH</term>
/// <term>szProductCodeOrPatchCode is a patch code GUID.</term>
/// </item>
/// </list>
/// </param>
/// <param name="szProperty">
/// <para>
/// A null-terminated string that specifies the property value to retrieve. The szProperty parameter can be one of the following values.
/// The <c>MsiSourceListSetInfo</c> function sets information about the source list for a product or patch in a specific context.
/// </summary>
/// <param name="szProductCodeOrPatchCode">
/// The ProductCode or patch GUID of the product or patch. Use a null-terminated string. If the string is longer than 39 characters,
/// the function fails and returns <c>ERROR_INVALID_PARAMETER</c>. This parameter cannot be <c>NULL</c>.
/// </param>
/// <param name="szUserSid">
/// <para>
/// This parameter can be a string SID that specifies the user account that contains the product or patch. The SID is not validated
/// or resolved. An incorrect SID can return <c>ERROR_UNKNOWN_PRODUCT</c> or <c>ERROR_UNKNOWN_PATCH</c>. When referencing a machine
/// context, szUserSID must be <c>NULL</c> and dwContext must be <c>MSIINSTALLCONTEXT_MACHINE</c>.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of SID</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>NULL</term>
/// <term>
/// NULL denotes the currently logged on user. When referencing the current user account, szUserSID can be NULL and dwContext can be
/// MSIINSTALLCONTEXT_USERMANAGED or MSIINSTALLCONTEXT_USERUNMANAGED.
/// </term>
/// </item>
/// <item>
/// <term>User SID</term>
/// <term>Specifies enumeration for a particular user in the system. An example of a user SID is "S-1-3-64-2415071341-1358098788-3127455600-2561".</term>
/// </item>
/// </list>
/// <para>
/// <c>Note</c> The special SID string "S-1-5-18" (system) cannot be used to enumerate products or patches installed as per-machine.
/// Setting the SID value to "S-1-5-18" returns "ERROR_INVALID_PARAMETER".
/// </para>
/// <para>
/// <c>Note</c> The special SID string "S-1-1-0" (everyone) should not be used. Setting the SID value to "S-1-1-0" fails and returns <c>ERROR_INVALID_PARAM</c>.
/// </para>
/// </param>
/// <param name="dwContext">
/// <para>
/// This parameter specifies the context of the product or patch instance. This parameter can contain one of the following values.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Type of context</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERMANAGED</term>
/// <term>The product or patch instance exists in the per-user-managed context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_USERUNMANAGED</term>
/// <term>The product or patch instance exists in the per-user-unmanaged context.</term>
/// </item>
/// <item>
/// <term>MSIINSTALLCONTEXT_MACHINE</term>
/// <term>The product or patch instance exists in the per-machine context.</term>
/// </item>
/// </list>
/// </param>
/// <param name="dwOptions">
/// <para>The dwOptions value specifies the meaning of szProductCodeOrPatchCode.</para>
/// <para>
/// If the property being set is "LastUsedSource", this parameter also specifies the type of source as network or URL. In this case,
/// the dwOptions parameter must be a combination of one of the following <c>MSISOURCETYPE_</c> constants and one of the following
/// <c>MSICODE_</c> constants.
/// </para>
/// <list type="table">
/// <listheader>
/// <term>Flag</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>MSISOURCETYPE_NETWORK</term>
/// <term>The source is a network type.</term>
/// </item>
/// <item>
/// <term>MSISOURCETYPE_URL</term>
/// <term>The source is a URL type.</term>
/// </item>
/// <item>
/// <term>MSICODE_PRODUCT</term>
/// <term>szProductCodeOrPatchCode is a product code GUID.</term>
/// </item>
/// <item>
/// <term>MSICODE_PATCH</term>
/// <term>szProductCodeOrPatchCode is a patch code GUID.</term>
/// </item>
/// </list>
/// </param>
/// <param name="szProperty">
/// <para>
/// The parameter szProperty indicates the property value to set. Not all properties that can be retrieved through
/// MsiSourceListGetInfo can be set via a call to <c>MsiSourceListSetInfo</c>. The szProperty value can be one of the following values.