SetupFindNextMatchLine

The SetupFindNextMatchLine function returns the location of the next line in an INF file relative to ContextIn.Line that matches a specified key.

BOOL SetupFindNextMatchLine(
  PINFCONTEXT ContextIn,  // starting context in an INF file
  PCTSTR Key,             // optional, key to match
  PINFCONTEXT ContextOut  // context of the the found line
);
 

Parameters

ContextIn
Specifies a pointer to an INF file context, as retrieved by a call to the SetupFindFirstLine function.
Key
If this optional parameter is specified, it supplies a key to match. If Key is not specified, the SetupFindNextMatchLine function is equivalent to the SetupFindNextLine function.
ContextOut
Pointer to a caller-supplied variable in which this function returns the context of the found line. ContextOut can point to ContextIn if the caller wishes.

Return Values

The function returns a non-zero value if it finds a matching line. Otherwise, the return value is zero. To get extended error information, call GetLastError.

Remarks

If ContextIn.Inf references multiple INF files that have been appended together using SetupOpenAppendInfFile, the SetupFindNextMatchLine function searches across the specified section in all files referenced by the HINF to locate the next matching 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, SetupGetLineByIndex