Bewerken

Delen via


PFNKSDEVICESETPOWER callback function (ks.h)

AVStream calls a minidriver's AVStrMiniDeviceSetPower routine when it receives an IRP_MN_SET_POWER.

Syntax

PFNKSDEVICESETPOWER Pfnksdevicesetpower;

void Pfnksdevicesetpower(
  [in] PKSDEVICE Device,
  [in] PIRP Irp,
  [in] DEVICE_POWER_STATE To,
  [in] DEVICE_POWER_STATE From
)
{...}

Parameters

[in] Device

Pointer to the KSDEVICE structure that received the IRP_MN_SET_POWER.

[in] Irp

The IRP_MN_SET_POWER issued by Device.

[in] To

The target device power state.

[in] From

The current device power state.

Return value

None

Remarks

If a driver has registered its device for idle detection, the power manager sends an IRP_MN_SET_POWER to change the power state of an idle device.

The minidriver specifies this routine's address in the SetPower member of its KSDEVICE_DISPATCH structure.

This routine is optional.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.
Target Platform Desktop
Header ks.h (include Ks.h)

See also

IRP_MN_SET_POWER

KSDEVICE_DISPATCH