SetupGetLineByIndex

The SetupGetLineByIndex function locates a line by its index value in the specified section in the INF file.

BOOL SetupGetLineByIndex(
  HINF InfHandle,      // handle to the INF file
  PCTSTR Section,      // section that contains the line
  DWORD Index,         // the index of the line to find
  PINFCONTEXT Context  // context that specifies the found line
);
 

Parameters

InfHandle
Handle of the INF file.
Section
Pointer to a null-terminated string specifying the section of the INF file to search.
Index
Specifies the index of the line to be located. The total number of lines in a particular section can be found with a call to SetupGetLineCount.
Context
Points to a caller-supplied variable in which the function returns the context information for the found line.

Return Values

If the function succeeds, the return value is a non-zero value. If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

If InfHandle references multiple INF files that have been appended together using SetupOpenAppendInfFile, this function searches across the specified section in all files referenced by the HINF to locate the indexed line.

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, SetupFindFirstLine, SetupFindNextLine, SetupFindNextMatchLine