SetupGetSourceFileSize  1M6SUV0 

[New - Windows NT]

The SetupGetSourceFileSize function reads the uncompressed size of a source file listed in an INF file.

BOOL SetupGetSourceFileSize(

    HINF InfHandle,

// handle of the INF file

    PINFCONTEXT InfContext,

// optional, context of the INF file

    PCTSTR FileName,

// optional, filename to find size of

    PCTSTR Section,

//optional, section in an INF file

    PDWORD FileSize,

// receives the size of the file

    UINT RoundingFactor

// optional, round to a muliple of this

   );

 

 

Parameters

InfHandle

Handle of the loaded INF file that contains the SourceDisksNames8OLI7ZO and SourceDisksFiles3.PG0KP sections. If platform-specific sections exist for the user s system (for example, SourceDisksNames.mips and SourceDisksFiles.mips), the platform-specific section will be used.

InfContext

This optional parameter points to a context for a line in a Copy Files94WX0. section for which the size is to be retrieved. If InfContext is NULL, the FileName parameter is used.

FileName

This optional parameter points to a null-terminated string containing the filename (no path) for which to return the size. If this parameter is NULL as well as InfContext, then the Section parameter is used.

Section

This optional parameter points to a null-terminated string containing the name of a Copy Files section. If this parameter is specified, the total size of all files listed in the section is computed.

FileSize

Pointer to a caller-supplied variable that receives the size, in bytes, of the specified file(s).

RoundingFactor

This optional parameter supplies a value for rounding file sizes. All file sizes are rounded up to a multiple of this number before being added to the total size. Rounding is useful for more exact determinations of the space that a file will occupy on a given volume, because it allows the caller to have file sizes rounded up to a multiple of the cluster size. Rounding does not occur unless RoundingFactor is specified.

 

Return Values

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. To get extended error information, call GetLastError11C2VS7.

Remarks

One and only one of the optional parameters, InfContext, FileName, and Section, must be specified.

See Also

SetupGetSourceFileLocation