IPortableDeviceClassExtension::Initialize method (portabledeviceclassextension.h)

The Initialize interface initializes a portable device by registering the device, device service, and private interfaces. This method also enables the WIA or WMDM compatibility layers (if they are required). For multiple transport devices, this method initializes the transport settings.

A WPD driver calls this method one time during driver initialization (for example, in the driver’s implementation of the IPnpCallbackHardware::OnPrepareHardware method).

Syntax

HRESULT Initialize(
  [in] IUnknown              *pWdfDeviceUnknown,
  [in] IPortableDeviceValues *pOptions
);

Parameters

[in] pWdfDeviceUnknown

A pointer to the IWDFDevice object that represents the devnode for that device.

[in] pOptions

An IPortableDeviceValues object that contains one or more of the initialization options described in the Class Extension Properties section.

Return value

The method returns an HRESULT. Possible return values are shown in the following table.

Return code Description
S_OK
The method succeeded.
E_POINTER
A required pointer argument was NULL.

Requirements

Requirement Value
Target Platform Windows
Header portabledeviceclassextension.h

See also

IPortableDeviceClassExtension Interface

WPD Class Extension Properties