SetupDiInstallClass

BOOLEAN
SetupDiInstallClass(
IN HWND hwndParent,    /* optional */
IN PCTSTR InfFileName,
IN DWORD Flags,
IN HSPFILEQ
FileQueue    /* optional */
);

SetupDiInstallClass installs the ClassInstall32 section of the specified INF file.

Parameters

hwndParent

Supplies the handle of the parent window for any user interface used to install this class.

InfFileName

Specifies the name of the INF file containing a ClassInstall32 section.

Flags

These flags control the installation process. Can be a combination of the following:

DI_NOVCP

Set this flag if FileQueue is supplied. DI_NOVCP instructs the SetupInstallFromInfSection function not to create a queue of its own and to use the caller-supplied queue instead. If this flag is set, files are not copied just queued.

DI_NOBROWSE

Set this flag to disable browsing in the event a copy operation cannot find a specified file. If the caller supplies a file queue, this flag is ignored.

DI_FORCECOPY

Set this flag to always copy files, even if they are already present on the user's machine. If the caller supplies a file queue, this flag is ignored.

DI_QUIETINSTALL

Set this flag to suppress the user interface unless absolutely necessary. For example, do not display the progress dialog. If the caller supplies a file queue, this flag is ignored.

FileQueue

If the DI_NOVCP flag is set, this parameter supplies a handle to a file queue where file operations should be queued but not committed.

Return Value

The function returns TRUE if it is successful. Otherwise it returns FALSE and the logged error can be retrieved with a call to GetLastError.

Comments

This function is called by a class installer when it installs a device of a new class.

See Also

SetupDiCallClassInstaller