SetupAddInstallSectionToDiskSpaceListW 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 SetupAddInstallSectionToDiskSpaceList function searches for CopyFile and DelFile lines in an Install section of an INF file. The function then adds the file operations specified in those sections to a disk-space list.

Syntax

WINSETUPAPI BOOL SetupAddInstallSectionToDiskSpaceListW(
  [in] HDSKSPC DiskSpace,
  [in] HINF    InfHandle,
  [in] HINF    LayoutInfHandle,
  [in] PCWSTR  SectionName,
  [in] PVOID   Reserved1,
  [in] UINT    Reserved2
);

Parameters

[in] DiskSpace

Handle to a disk-space list.

[in] InfHandle

Handle to an open INF file that contains the Install section to be searched. If ListInfHandle is not specified, the INF file must also contain the section specified by SectionName.

[in] LayoutInfHandle

This parameter, if specified, provides the handle to the INF file that contains the SourceDisksFiles sections. Otherwise that section is assumed to exist in the INF file specified by InfHandle.

[in] SectionName

Name of the Install section to be added to the disk-space list. You should use a null-terminated string.

[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 SetupAddInstallSectionToDiskSpaceList 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

SetupAddToDiskSpaceList

SetupRemoveInstallSectionFromDiskSpaceList