Table of contents
Collapse the table of content
Expand the table of content

Opening and Closing an INF File

Last Updated: 7/30/2016

Before a device installation application can access the information in an INF file, it must open the file by calling SetupOpenInfFile. This function returns a handle to the INF file.

If you do not know the name of the INF file that you have to open, use SetupGetInfFileList to obtain a list of all the INF files in a directory.

Once an application opens an INF file, it can append additional INF files to the opened file that uses SetupOpenAppendInfFile. When subsequent SetupAPI functions reference an open INF file, they will also be able to access any information that is stored in any appended files.

If no INF file is specified when calling SetupOpenAppendInfFile, this function appends the file specified by the LayoutFile entry in the INF Version section of the INF file opened during the call to SetupOpenInfFile.

When the information in the INF file is no longer needed, the application should call SetupCloseInfFile to release resources allocated during the call to SetupOpenInfFile.

© 2016 Microsoft