SetupGetLineCount 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 SetupGetLineCount function returns the number of lines in a specified section of an INF file.

Syntax


LONG SetupGetLineCount(
  _In_ HINF   InfHandle,
  _In_ PCTSTR Section
);

Parameters

InfHandle [in]

Handle to the INF file.

Section [in]

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.

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

SetupGetLineCountW (Unicode) and SetupGetLineCountA (ANSI)

See also

Overview
Functions

 

 

Show: