SetupOpenAppendInfFile  136MH6J 

[New - Windows NT]

The SetupOpenAppendInfFile function appends the information in an INF file to an INF file previously opened by SetupOpenInfFile1UU.WA.

BOOL SetupOpenAppendInfFile(

    PCTSTR FileName,

// optional, name of the file to append

    HINF InfHandle,

// handle of the file to append to

    PUINT ErrorLine

// optional, receives error information

   );

 

 

Parameters

FileName

If not NULL, FileName points to a null-terminated string containing the name (and optionally the path) of the INF file to be opened. If the filename does not contain path separator characters, it is searched for, first in the %windir%\inf directory, and then in the %windir%\system32 directory. If the filename contains path separator characters, it is assumed to be a full path specification and no further processing is performed on it. If FileName is NULL, the INF filename is retrieved from the LayoutFile value of the Version section in the existing INF file. The same search logic is applied to the filename retrieved from the LayoutFile key.

InfHandle

Existing INF handle to which this INF file will be appended.

ErrorLine

An optional parameter that points to a caller-supplied variable to which this function returns the (1-based) line number where an error occurred during loading of the INF file. This value is generally reliable only if GetLastError11C2VS7 does not return ERROR_NOT_ENOUGH_MEMORY. If an out-of-memory condition does occur, ErrorLine may be 0.

 

Return Values

If the function succeeds, the return value is TRUE.

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

If FileName was not specified and there was no LayoutFile value in the Version section of the existing INF File, GetLastError11C2VS7 returns ERROR_INVALID_DATA.

Remarks

This function can only be called for Windows 95- or Windows NT 4.0-style INF files. Otherwise, the function returns FALSE and GetLastError11C2VS7 will return ERROR_INVALID_PARAMETER. The main purpose of this function is to combine an INF file with the source file location information contained in the file specified in the LayoutFile entry of the Version section (typically, LAYOUT.INF).

See Also

SetupOpenInfFile, SetupCloseInfFile