UcmUcsiPpmCreate function (Ucmucsippm.h)

Creates a Platform Policy Manager (PPM) object.

Syntax

NTSTATUS UcmUcsiPpmCreate(
  [in]  WDFDEVICE              WdfDevice,
  [in]  PUCMUCSI_PPM_CONFIG    Config,
  [in]  PWDF_OBJECT_ATTRIBUTES Attributes,
  [out] UCMUCSIPPM             *PPMObject
);

Parameters

[in] WdfDevice

A handle to a framework device object that the client driver received in the previous call to WdfDeviceCreate.

[in] Config

A pointer to a caller-supplied UCMUCSI_PPM_CONFIG structure that is initialized by calling UCMUCSI_PPM_CONFIG_INIT. The ConnectorCollectionHandle member must be set to the handle retrieved in a previous call to UcmUcsiConnectorCollectionCreate.

[in] Attributes

A pointer to a caller-supplied WDF_OBJECT_ATTRIBUTES structure that contains attributes for the new connector collection object. This parameter is optional and can be WDF_NO_OBJECT_ATTRIBUTES.

[out] PPMObject

A pointer to a location that receives a handle to the new PPM object.

Return value

Returns STATUS_SUCCESS if the operation succeeds. Otherwise, this method can return an appropriate NTSTATUS value.

Remarks

The client driver is expected to call UcmUcsiPpmCreate from the EVT_WDF_DEVICE_PREPARE_HARDWARE callback function.

The structure passed in Config contains Type-C connector information that is necessary for creating connectors with USB Type-C connector class extension (UcmCx) by using UcmConnectorCreate and are not obtainable from PPM through UCSI commands such as GetCapability or GetConnectorCapability.

The Config structure also contains connector IDs, which are required for one-to-one mapping between USB Type-C connectors and USB ports.

The PPM object is also a WDFOBJECT and creates a one-to-one association with the WDFDEVICE handle provided by the client driver.

The PPM object is parented to the WDFOBJECT even when UcmUcsiPpmCreate is called by passing WDF_NO_ATTRIBUTES. The lifetime of the object is manager by the framework.

Requirements

Requirement Value
Minimum KMDF version 1.27
Minimum UMDF version N/A
Header Ucmucsippm.h (include UcmUcsiCx.h)
Library UcmUcsiCxStub.lib
IRQL PASSIVE_LEVEL