SetupIterateCabinetA 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 SetupIterateCabinet function iterates through all the files in a cabinet and sends a notification to a callback function for each file found.
Syntax
WINSETUPAPI BOOL SetupIterateCabinetA(
[in] PCSTR CabinetFile,
[in] DWORD Reserved,
[in] PSP_FILE_CALLBACK_A MsgHandler,
[in] PVOID Context
);
Parameters
[in] CabinetFile
Cabinet (.CAB) file to iterate through.
[in] Reserved
Not currently used.
[in] MsgHandler
Pointer to a FileCallback routine that will process the notifications SetupIterateCabinet returns as it iterates through the files in the cabinet file. The callback routine may then return a value specifying whether to decompress, copy, or skip the file.
[in] Context
Context value that is passed into the routine specified in MsgHandler. This enables the callback routine to track values between notifications, without having to use global variables.
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 SetupIterateCabinet as an alias which 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 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 |
API set | ext-ms-win-setupapi-classinstallers-l1-1-2 (introduced in Windows 10, version 10.0.14393) |