SetupAddToDiskSpaceList function

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

Syntax


BOOL SetupAddToDiskSpaceList(
  _In_ HDSKSPC  DiskSpace,
  _In_ PCTSTR   TargetFilespec,
  _In_ LONGLONG FileSize,
  _In_ UINT     Operation,
  _In_ PVOID    Reserved1,
  _In_ UINT     Reserved2
);

Parameters

DiskSpace [in]

Handle to the disk-space list.

TargetFilespec [in]

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.

FileSize [in]

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.

Operation [in]

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

ValueMeaning
FILEOP_DELETE

A file delete operation.

FILEOP_COPY.

A file copy operation.

 

Reserved1 [in]

Must be zero.

Reserved2 [in]

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.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Setupapi.h

Library

Setupapi.lib

DLL

Setupapi.dll

Unicode and ANSI names

SetupAddToDiskSpaceListW (Unicode) and SetupAddToDiskSpaceListA (ANSI)

See also

Overview
Functions

 

 

Show: