Skip to content

Latest commit

 

History

History
114 lines (78 loc) · 4.68 KB

nf-setupapi-setupgetsourcefilesizea.md

File metadata and controls

114 lines (78 loc) · 4.68 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:setupapi.SetupGetSourceFileSizeA
SetupGetSourceFileSizeA function (setupapi.h)
The SetupGetSourceFileSize function reads the uncompressed size of a source file listed in an INF file. (ANSI)
SetupGetSourceFileSizeA
setupapi/SetupGetSourceFileSizeA
setup\setupgetsourcefilesize.htm
setup
f1db8ad5-b133-410e-9843-38b09e2ef5e7
12/05/2018
SetupGetSourceFileSize, SetupGetSourceFileSize function [Setup API], SetupGetSourceFileSizeA, SetupGetSourceFileSizeW, _setupapi_setupgetsourcefilesize, setup.setupgetsourcefilesize, setupapi/SetupGetSourceFileSize, setupapi/SetupGetSourceFileSizeA, setupapi/SetupGetSourceFileSizeW
setupapi.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
SetupGetSourceFileSizeW (Unicode) and SetupGetSourceFileSizeA (ANSI)
Setupapi.lib
Setupapi.dll
Windows
19H1
SetupGetSourceFileSizeA
setupapi/SetupGetSourceFileSizeA
c++
APIRef
kbSyntax
DllExport
Setupapi.dll
SetupGetSourceFileSize
SetupGetSourceFileSizeA
SetupGetSourceFileSizeW

SetupGetSourceFileSizeA function

-description

[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 SetupGetSourceFileSize function reads the uncompressed size of a source file listed in an INF file.

-parameters

-param InfHandle [in]

Handle to the loaded INF file that contains the SourceDisksNames and SourceDisksFiles sections. If platform-specific sections exist for the user's system (for example, SourceDisksNames.x86 and SourceDisksFiles.x86), the platform-specific section will be used.

-param InfContext [in]

Optional pointer to a context for a line in a Copy Files section for which the size is to be retrieved. If InfContext is NULL, the FileName parameter is used.

-param FileName [in]

Optional pointer 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.

-param Section [in]

Optional pointer 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.

-param FileSize [in, out]

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

-param RoundingFactor [in]

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

-returns

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

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

Note

The setupapi.h header defines SetupGetSourceFileSize 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.

-see-also

Functions

Overview

SetupGetSourceFileLocation