UcmConnectorPowerDirectionChanged function (ucmmanager.h)

Notifies the USB connector manager framework extension (UcmCx) with the new power role of the partner connector.

Syntax

void UcmConnectorPowerDirectionChanged(
  [in] UCMCONNECTOR   Connector,
  [in] BOOLEAN        Success,
  [in] UCM_POWER_ROLE CurrentPowerRole
);

Parameters

[in] Connector

Handle to the connector object that the client driver received in the previous call to UcmConnectorCreate.

[in] Success

Used to indicate failure of a power-role swap that was initiated by UcmCx using EVT_UCM_CONNECTOR_SET_POWER_ROLE.

If TRUE, the operation was successful. FALSE, otherwise.

[in] CurrentPowerRole

One of the UCM_POWER_ROLE-typed flags that indicates the new data role.

Return value

None

Remarks

UcmConnectorPowerDirectionChanged returns STATUS_SUCCESS if the operation succeeds. Otherwise, this inline function can return an appropriate NTSTATUS value.

If the connector partner is attached, UcmCx updates the power role of the partner depending on the CurrentPowerRole value.

UcmCx can change the power role of a connector, and invokes EVT_UCM_CONNECTOR_SET_POWER_ROLE. In response to that call, the client should perform the PR_Swap operation, and indicate success/failure of the operation by calling UcmConnectorPowerDirectionChanged.

Alternatively, the client driver might choose to perform a role-swap autonomously, or the partner might perform a role-swap. In either case, when the role-swap has completed, the driver must report the new role to UcmCx using UcmConnectorPowerDirectionChanged.

Requirements

Requirement Value
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Windows
Minimum KMDF version 1.15
Minimum UMDF version 2.15
Header ucmmanager.h (include Ucmcx.h)
Library UcmCxstub.lib
IRQL PASSIVE_LEVEL

See also