SetupQuerySourceListA function (setupapi.h)
[This function is available for use in the operating systems indicated in the Requirements section. It may be altered or unavailable in subsequent versions. SetupAPI should no longer be used for installing applications. Instead, use the Windows Installer for developing application installers. SetupAPI continues to be used for installing device drivers.]
The SetupQuerySourceList function queries the current list of installation sources. The list is built from the system and user-specific lists, and potentially overridden by a temporary list (see SetupSetSourceList).
Syntax
WINSETUPAPI BOOL SetupQuerySourceListA(
[in] DWORD Flags,
[in, out] PCSTR **List,
[in, out] PUINT Count
);
Parameters
[in] Flags
Specifies which list to query. This parameter can be any combination of the following values.
SRCLIST_SYSTEM
Query the system list.
SRCLIST_USER
Query the per-user list.
SRCLIST_NOSTRIPPLATFORM
Normally, all paths are stripped of a platform-specific component if it is the final component. For example, a path stored in the registry as f:\x86 is returned as f:. If this flag is specified, the platform-specific component is not stripped.
[in, out] List
Pointer to a variable in which this function returns a pointer to an array of sources. Use a null-terminated string. The caller must free this array with a call to SetupFreeSourceList.
[in, out] Count
Pointer to a variable in which this function returns the number of sources in the list.
Return value
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
Note
The setupapi.h header defines SetupQuerySourceList as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | setupapi.h |
Library | Setupapi.lib |
DLL | Setupapi.dll |