Opening and Closing an 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.