SetupGetLineByIndex 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 SetupGetLineByIndex function locates a line by its index value in the specified section in the INF file.

Syntax


BOOL SetupGetLineByIndex(
  _In_     HINF InfHandle,
  _In_     PCTSTR Section,
  _In_     DWORD Index,
  _Inout_  PINFCONTEXT Context
);

Parameters

InfHandle [in]

Handle to the INF file.

Section [in]

Pointer to a null-terminated string specifying the section of the INF file to search.

Index [in]

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 [in, out]

Pointer to a variable that receives the context information for the found line.

Return value

If the function succeeds, the return value is a nonzero 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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Setupapi.h

Library

Setupapi.lib

DLL

Setupapi.dll

Unicode and ANSI names

SetupGetLineByIndexW (Unicode) and SetupGetLineByIndexA (ANSI)

See also

Overview
Functions
SetupFindFirstLine
SetupFindNextLine
SetupFindNextMatchLine

 

 

Community Additions

ADD
Show: