What is 0x800F0214

 
Previous Next
SPAPI_E_DEVINFO_DATA_LOCKED SPAPI_E_NO_CLASSINSTALL_PARAMS

SPAPI_E_DI_BAD_PATH

This error is returned by the components of the setup API subsstem of Window if an information file (INF file) contains references to non-existent components. For example, there is a reference to a class driver for which there are no INF files in the system cache. To eliminate this error, in some cases, it is sufficient to remove the device from the Device Manager list and install the drivers for it again.

Here is an example of code sequence returning SPAPI_E_DI_BAD_PATH error:

BOOL
BuildClassDriverList(
    IN HDEVINFO    hDevInfo
    )
/*++

Routine Description:
    Build the class driver list.

    Note: If driver list is already built this comes back immediately

Arguments:
    hDevInfo    : Handle to the printer class device information list

Return Value:
    TRUE on success, FALSE on error

--*/
{
    DWORD               dwLastError;
    SP_DRVINFO_DATA     DrvInfoData;
    //
    // Build the class driver list and also make sure there is atleast one driver
    //
    if ( !SetupDiBuildDriverInfoList(hDevInfo, NULL, SPDIT_CLASSDRIVER) )
        return FALSE;

    DrvInfoData.cbSize = sizeof(DrvInfoData);

    if ( !SetupDiEnumDriverInfo(hDevInfo,
                                NULL,
                                SPDIT_CLASSDRIVER,
                                0,
                                &DrvInfoData)           &&
         GetLastError() == ERROR_NO_MORE_ITEMS ) {

        SetLastError(SPAPI_E_DI_BAD_PATH);
        return FALSE;
    }

    return TRUE;
}

Windows Setup API

The Setup application programming interface (API) provides a set of functions that your setup application can call to perform installation operations. These setup functions work with Windows INF files to provide the following setup functionality.

Unicode and ANSI versions are available for most setup functions. Unicode text files should contain the standard 0xFEFF byte-order mark to enable setup functions to identify the file as Unicode text.

Although the Setup API supports prompting for new media and basic error-handling dialog boxes, the setup functions do not provide wizard functionality or a generic user interface.

Developers should consider whether they can use Windows Installer to install their applications rather than the Setup API. Windows Installer reduces the total cost of ownership (TCO) for your customers by enabling them to efficiently install and configure your products and applications. The installer can also provide your product with new capabilities to advertise features without installing them, to install products on-demand, and to add user customizations.