Skip to content

Latest commit

 

History

History
101 lines (74 loc) · 4.74 KB

nf-setupapi-setupenuminfsectionsa.md

File metadata and controls

101 lines (74 loc) · 4.74 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name req.apiset
NF:setupapi.SetupEnumInfSectionsA
SetupEnumInfSectionsA function (setupapi.h)
The SetupEnumInfSections function retrieves section names from an INF file. (ANSI)
SetupEnumInfSectionsA
setupapi/SetupEnumInfSectionsA
setup\setupenuminfsections.htm
setup
9b19ced6-728a-48e7-9e87-03fc53f7fb72
12/05/2018
SetupEnumInfSections, SetupEnumInfSections function [Setup API], SetupEnumInfSectionsA, SetupEnumInfSectionsW, setup.setupenuminfsections, setupapi/SetupEnumInfSections, setupapi/SetupEnumInfSectionsA, setupapi/SetupEnumInfSectionsW
setupapi.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
SetupEnumInfSectionsW (Unicode) and SetupEnumInfSectionsA (ANSI)
Setupapi.lib
Setupapi.dll
Windows
19H1
SetupEnumInfSectionsA
setupapi/SetupEnumInfSectionsA
c++
APIRef
kbSyntax
DllExport
Setupapi.dll
Ext-MS-Win-SetupAPI-Inf-L1-1-1.dll
SetupEnumInfSections
SetupEnumInfSectionsA
SetupEnumInfSectionsW
ext-ms-win-setupapi-inf-l1-1-1 (introduced in Windows 10, version 10.0.14393)

SetupEnumInfSectionsA function

-description

[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 SetupEnumInfSections function retrieves section names from an INF file.

-parameters

-param InfHandle [in]

Handle to the INF file that is to be queried.

-param Index [in]

The zero-based index of the section name to retrieve. This index may not correspond to the order of sections as they appear in the INF file.

-param Buffer [out, optional]

Pointer to a buffer that receives the section name. You can call the function once to get the required buffer size, allocate the necessary memory, and then call the function a second time to retrieve the name. Using this technique, you can avoid errors caused by an insufficient buffer size. This parameter is optional. For more information, see the Remarks section.

-param Size [in]

Size of the buffer pointed to by ReturnBuffer in characters. This number includes the terminating NULL character.

-param SizeNeeded [out, optional]

Pointer to a location that receives the required size of the buffer pointed to by ReturnBuffer. The size is specified as the number of characters required to store the section name, including the terminating NULL character.

-returns

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. To get extended error information, call GetLastError.

GetLastError returns ERROR_NO_MORE_ITEMS if the value of EnumerationIndex is greater than or equal to the number of sections names in the INF file.

-remarks

This function can enumerate all unique section names in the INF file. If a section name appears more than once in an INF file, the function returns the name only once using a single enumeration index. To return all section names in the INF file, call the function beginning with an enumeration index of zero and then make repeated calls to the function while incrementing the index until the function returns FALSE and GetLastError returns ERROR_NO_MORE_ITEMS. Your application should not rely on the section names being returned in any order based on the enumeration index.

Note

The setupapi.h header defines SetupEnumInfSections as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.