SetupFindNextMatchLine 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 SetupFindNextMatchLine function returns the location of the next line in an INF file relative to ContextIn.Line that matches a specified key.

Syntax


BOOL SetupFindNextMatchLine(
  _In_    PINFCONTEXT ContextIn,
  _In_    PCTSTR      Key,
  _Inout_ PINFCONTEXT ContextOut
);

Parameters

ContextIn [in]

Pointer to an INF file context, as retrieved by a call to the SetupFindFirstLine function.

Key [in]

If this optional parameter is specified, it supplies a key to match. This parameter should be a null-terminated string. This parameter can be Null. If Key is not specified, the SetupFindNextMatchLine function is equivalent to the SetupFindNextLine function.

ContextOut [in, out]

Pointer to a variable in which this function returns the context of the found line. ContextOut can point to ContextIn if the caller wishes.

Return value

The function returns a nonzero 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.

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

SetupFindNextMatchLineW (Unicode) and SetupFindNextMatchLineA (ANSI)

See also

Overview
Functions
SetupFindFirstLine
SetupFindNextLine
SetupGetLineByIndex

 

 

Show: