SetupAddToDiskSpaceList

[New for Windows NT 4.0 Service Pack 3.]

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.

BOOL SetupAddToDiskSpaceList(
  HDSKSPC DiskSpace,      // handle to the disk-space list
  PCTSTR TargetFilespec,  // specifies the path and filename
  LONGLONG FileSize,      // specifies the uncompressed filesize
  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.
TargetFilespec
Specifies the filename of the file to add to the disk-space list. This is typically a fully specified Win32 path. Otherwise, the path must be relative to the current directory.
FileSize
Specifies the (uncompressed) size of the file as it will exist in the target directory. You can use SetupGetSourceFileSize to retrieve this information from an INF file. This parameter is ignored for FILEOP_DELETE operations.
Operation
Specifies the file operation to add 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.

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.

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