This documentation is archived and is not being maintained.

ISideShowClassExtension::Initialize method

Initializes an instance of the class extension object and registers the SideShow driver's ISideShowDriver interface.


HRESULT Initialize(
  [in, optional] IUnknown *pWdfDeviceUnknown,
  [in, optional] IUnknown *pSideShowDriverUnknown


pWdfDeviceUnknown [in, optional]

A pointer to the IUnknown interface that supports the IWDFDevice interface. The class extension object uses the methods of IWDFDevice to interact with the User-Mode Driver Framework (UMDF) platform and communicate with other Windows SideShow platform components.

pSideShowDriverUnknown [in, optional]

A pointer to the IUnknown interface that supports the driver's ISideShowDriver interface.

Return value

The Initialize method returns S_OK if the class extension object registered the driver's ISideShowDriver interface. Otherwise, this method returns one of the error codes that are defined in Winerror.h. If the class extension object returns an error code, the Windows SideShow platform will not allow the associated device to work.


At driver initialization time, the SideShow driver calls the CoCreateInstance function to create an instance of the ISideShowClassExtension object. The driver should typically call CoCreateInstance in its implementation of the IPnpCallbackHardware::OnPrepareHardware method. After the driver creates the ISideShowClassExtension object instance, the driver must call Initialize to initialize the class extension object.

The driver should initialize the class extension object only once after the driver is loaded. As part of the initialization process, the class extension object handles some common initialization tasks, such as registering and exposing the driver's appropriate functional device interfaces. Registering the driver's interfaces allows the Windows SideShow platform to access the device.

In some rare situations, the driver should not call the Initialize method. For example, if your driver operates in a "flashing" or "update" mode (corresponding to if your device is in the bootloader or otherwise not capable of functioning as a Windows SideShow-compatible device), your driver should not register its Windows SideShow functionality; therefore, the driver should not call the Initialize method.


Target platform



Windowssideshowclassextension.h (include WindowsSideShowClassExtension.h)

See also




Send comments about this topic to Microsoft