The SetupSetDirectoryId function associates a directory identifier in an INF file with a particular directory.
BOOL SetupSetDirectoryId(
HINF InfHandle, // handle to the INF file
DWORD Id, // optional, DIRID to assign to Directory
PCTSTR Directory // optional, directory to map to identifier
);
If the function succeeds, the return value is a non-zero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
SetupSetDirectoryId can be used prior to queueing file copy operations, to specify a target location that is only known at runtime.
After setting the directory identifier, this function traverses all appended INF files, and, if any of them have unresolved string substitutions, attempts to re-apply string substitution to them based on the new DIRID mapping. Because of this, some INF values may change after calling SetupSetDirectoryId.
DIRID_ABSOLUTE_16BIT is not a valid value for Id. This ensures compatibility with 16-bit setupx.
Windows NT: Use version 4.0 and later.
Windows: Use Windows 95 and later.
Windows CE: Unsupported.
Header: Declared in setupapi.h.
Import Library: Link with setupapi.lib.