SetupAddSectionToDiskSpaceListW 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 SetupAddSectionToDiskSpaceList function adds to a disk-space list all the file delete or copy operations listed in a Copy Files or Delete Files section of an INF file.

Target disk compression is ignored by this function. Files are assumed to occupy their full size on the target disk.

Syntax

WINSETUPAPI BOOL SetupAddSectionToDiskSpaceListW(
  [in] HDSKSPC DiskSpace,
  [in] HINF    InfHandle,
  [in] HINF    ListInfHandle,
  [in] PCWSTR  SectionName,
  [in] UINT    Operation,
  [in] PVOID   Reserved1,
  [in] UINT    Reserved2
);

Parameters

[in] DiskSpace

Handle to the disk-space list.

[in] InfHandle

Handle to an open INF file that contains the SourceDisksFiles section. If ListInfHandle is not specified, this INF file must also contain the section named by SectionName.

[in] ListInfHandle

Optional handle to an open INF file that contains the section specified by SectionName. Otherwise, InfHandle is assumed to contain this section.

[in] SectionName

Name of the Copy Files or Delete Files section that contains the file operations to add to the disk-space list. Use a null-terminated string.

[in] Operation

Type of file operation to be added to the list. This parameter can be one of the following values.

Value Meaning
FILEOP_DELETE
A file delete operation.
FILEOP_COPY
A file copy operation.

[in] Reserved1

Must be zero.

[in] Reserved2

Must be zero.

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

This function requires a Windows INF file. Some older INF file formats may not be supported.

Note

The setupapi.h header defines SetupAddSectionToDiskSpaceList 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

See also

Functions

Overview

SetupAddInstallSectionToDiskSpaceList

SetupAddToDiskSpaceList

SetupRemoveSectionFromDiskSpaceList