SetupRemoveSectionFromDiskSpaceList

[New for Windows NT 4.0 Service Pack 3.]

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.

BOOL SetupRemoveSectionFromDiskSpaceList(
  HDSKSPC DiskSpace,  // handle to the disk-space list
  HINF InfHandle,     // handle to the INF file
  HINF ListInfHandle, // optional, handle to the INF file that 
                      // contains 
// SectionName
  PCTSTR SectionName, // specifies the Copy Files or Delete Files 
                      // section name
  UINT Operation,     // specifies the type of file operation
  PVOID Reserved1,    // must be zero
  UINT Reserved2      // must be zero
);
 

Parameters

DiskSpace
Specifies a handle to the disk-space list.
InfHandle
Supplies a 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. This handle must be for a Windows 95- or Windows NT 4.0-style INF file.
ListInfHandle
This optional parameter supplies a 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.
SectionName
Supplies the name of the Copy Files or Delete Files section to remove from the disk-space list.
Operation
Specifies the 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.

Reserved1
Must be 0.
Reserved2
Must be 0.

Return Values

If the function succeeds, the return value is a non-zero 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.

QuickInfo

  Windows NT: Use version 4.0 SP3 and later.
  Windows: Use Windows 95 and later.
  Windows CE: Unsupported.
  Header: Declared in setupapi.h.
  Import Library: Link with setupapi.lib.

See Also

Overview, Functions, SetupRemoveFromDiskSpaceList, SetupRemoveInstallSectionFromDiskSpaceList, SetupAddSectionToDiskSpaceList