SetupRemoveSectionFromDiskSpaceListA 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 SetupRemoveSectionFromDiskSpaceList function removes the file delete or copy operations listed in a Copy Files section of an INF file from a disk-space list.

Syntax

WINSETUPAPI BOOL SetupRemoveSectionFromDiskSpaceListA(
  [in] HDSKSPC DiskSpace,
  [in] HINF    InfHandle,
  [in] HINF    ListInfHandle,
  [in] PCSTR   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 specified by SectionName.

[in] ListInfHandle

Optional handle to an open INF file that contains the section to remove from the disk-space list. Otherwise, InfHandle must contain the section specified by SectionName.

[in] SectionName

Pointer to a null-terminated string that specifies the name of the Copy Files or Delete Files section to remove from the disk-space list.

[in] Operation

File operation to remove from 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

The file operations removed by the SetupRemoveSectionFromDiskSpaceList function are typically those that have been added to the list by using the SetupAddSectionToDiskSpaceList function, though this is not a requirement. The SetupRemoveSectionFromDiskSpaceList function ignores files in the INF section that are not listed in the disk-space list.

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

Note

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

SetupAddSectionToDiskSpaceList

SetupRemoveFromDiskSpaceList

SetupRemoveInstallSectionFromDiskSpaceList