SetupDiGetWizardPage

HPROPSHEETPAGE
SetupDiGetWizardPage(
IN HDEVINFO DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData, /* optional */
IN PSP_INSTALLWIZARD_DATA InstallWizardData,
IN DWORD PageType,
IN DWORD
Flags
);

SetupDiGetWizardPage retrieves a handle to one of the wizard pages provided by Setup for an application to include in its own wizard.

Parameters

DeviceInfoSet

Supplies the handle of the device information set for which to retrieve a wizard page.

DeviceInfoData

Supplies a pointer to a device information set with which to associate the wizard page. This parameter is only used if the Flags parameter includes DIWP_FLAG_USE_DEVINFO_DATA. If that flag is set and DeviceInfoData is not specified, the wizard page is associated with the global class driver list.

InstallWizardData

Supplies a pointer to an SP_INSTALLWIZARD_DATA structure that contains parameters to be used by the wizard page. The cbSize field of the structure must be set to the size of the structure, in bytes, or it is invalid.

PageType

Supplies an ordinal indicating the type of wizard page to retrieve. Can be the following value:

SPWPT_SELECTDEVICE

Retrieve a Select Device wizard page.

Flags

Specifies how to create the wizard page. Can be the following value:

SPWP_USE_DEVINFO_DATA

Use the device information element specified by the DeviceInfoData parameter or use the global class driver list if DeviceInfoData is not supplied. If this flag is not set, the wizard page acts upon the currently-selected device, as set by SetupDiSetSelectedDevice, or upon the global class driver list if a device is not selected.

Return Value

The function returns the handle to the requested wizard page if it is successful. Otherwise it returns NULL and the logged error can be retrieved with a call to GetLastError.

Comments

A device information set cannot be destroyed as long as it is being used by an active wizard page. In addition, if the wizard page is associated with a particular device information element, that element cannot be deleted as long as it is being used by an active wizard page.

See Also

SetupDiSetSelectedDevice