SetupFindFirstLine

The SetupFindFirstLine function locates a line in the specified section of an INF file. If the Key parameter is NULL, SetupFindFirstLine returns the first line of the section.

BOOL SetupFindFirstLine(
  HINF InfHandle,      // handle to an INF file
  PCTSTR Section,      // section in which to find a line
  PCTSTR Key,          // optional, key to search for
  PINFCONTEXT Context  // context of the found line
);
 

Parameters

InfHandle
Handle to the INF file to query.
Section
Pointer to a null-terminated string specifying the section of the INF file(s) to search in.
Key
This optional parameter points to a null-terminated string specifying the key to search for within the section. If Key is NULL, the first line in the section is returned.
Context
Pointer to a structure in which this function returns the context information used internally by the INF handle. Applications must not overwrite values in this structure.

Return Values

If the function could not find a line, the return value is zero. To get extended error information, call GetLastError.

Remarks

If the InfHandle parameter references multiple INF files that have been appended together using SetupOpenAppendInfFile, the SetupFindFirstLine function searches across the specified section in all of the files referenced by the specified HINF.

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