SetupAddToDiskSpaceListW 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 SetupAddToDiskSpaceList function adds a single delete or copy operation to a disk-space list. To add all the file operations in a section of an INF file, use either SetupAddSectionToDiskSpaceList, or SetupAddInstallSectionToDiskSpaceList.
Target disk compression is ignored by this function. Files are assumed to occupy their full size on the target disk.
WINSETUPAPI BOOL SetupAddToDiskSpaceListW( HDSKSPC DiskSpace, PCWSTR TargetFilespec, LONGLONG FileSize, UINT Operation, PVOID Reserved1, UINT Reserved2 );
Handle to the disk-space list.
File name of the file to be added to the disk-space list. You should use a null-terminated string that specifies a fully qualified path. Otherwise, the path must be relative to the current directory.
Uncompressed size of the file as it will exist in the target directory, in bytes. You can use SetupGetSourceFileSize to retrieve this information from an INF file. This parameter is ignored for FILEOP_DELETE operations.
File operation to be added to the list. This parameter can be one of the following values.
||A file delete operation.|
||A file copy operation.|
Must be zero.
Must be zero.
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.
The setupapi.h header defines SetupAddToDiskSpaceList 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.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|