Installer Function

Every installer exports an installer function named ClassInstall. The Device Manager dynamically links to and calls this function whenever it needs the installer to carry out a specific installation task.

ClassInstall receives two arguments: an integer that identifies the installation task to carry out, and the address of a DEVICE_INFO structure that contains information about the device to install. The function either carries out the requested task, using the information in the structure, or directs the Device Manager to carry out the task for it.

To direct the Device Manager to carry out the task, the function must return the ERR_DI_DO_DEFAULT value. The Device Manager has default actions for each request.

If the function carries out its own tasks, it must return the value OK to notify the Device Manager that the task completed successfully. If an error occurs while carrying out a task, the function must return one of the RETERR values given in Constants.