SetupGetLineCount

The SetupGetLineCount function returns the number of lines in a specified section of an INF file.

LONG SetupGetLineCount(
  HINF InfHandle, // handle to the INF file
  PCTSTR Section  // the section in which to count lines
);
 

Parameters

InfHandle
Handle of the INF file.
Section
Pointer to a null-terminated string that specifies the section in which you want to count the lines.

Return Values

If InfHandle references multiple INF files that have been appended together using SetupOpenAppendInfFile, this function returns the sum of the lines in all 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.

QuickInfo

  Windows NT: Use version 4.0 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