SetupGetLineCountW 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 SetupGetLineCount function returns the number of lines in a specified section of an INF file.
Syntax
WINSETUPAPI LONG SetupGetLineCountW(
[in] HINF InfHandle,
[in] PCWSTR Section
);
Parameters
[in] InfHandle
Handle to the INF file.
[in] Section
Pointer to a null-terminated string that specifies the section in which you want to count the lines.
Return value
If InfHandle references multiple INF files that have been appended using SetupOpenAppendInfFile, this function returns the sum of the lines in all of the INF files containing the specified section. A return value of 0 specifies an empty section. If the section does not exist, the function returns –1.
To get extended error information, call GetLastError.
Remarks
Note
The setupapi.h header defines SetupGetLineCount as an alias that 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 is 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 |
API set | ext-ms-win-setupapi-inf-l1-1-1 (introduced in Windows 10, version 10.0.14393) |