RegisterPowerRelationship

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function establishes dynamic parent and child or bus and client driver relationship. It is available for drivers that manage power for a set of dependent child and client drivers.

Syntax

HANDLE RegisterPowerRelationship(
  PVOID pvParent,
  PVOID pvChild,
  PPOWER_CAPABILITIES pCaps,
  DWORD Flags
);

Parameters

  • pvParent
    [in] LPWSTR device name of the parent or bus, for example, NDS0:.
  • pvChild
    [in] LPWSTR device name of the child or client, for example, NE20001.
  • pCaps
    [in] Pointer to the POWER_CAPABILITIES of the child device. Set to NULL if not used.
  • Flags
    [in] Set to POWER_NAME to indicate that pvParent and pvChild are device names.

Return Value

  • ERROR_FILE_EXISTS
    Indicates that the child device is already registered.
  • ERROR_INVALID_PARAMETER
    Indicates that invalid parameter were encountered.
  • ERROR_SUCCESS
    Indicates that the relationship was established successfully.

Remarks

The parent may register each uniquely named child instance, as needed.

If pCaps is NULL, the parent must be prepared to handle IOCTL_POWER_CAPABILITIES for the child.

The owner of the returned handle must free it with ReleasePowerRelationship when the relationship is no longer required.

See Also

Reference

IOCTL_POWER_CAPABILITIES
POWER_CAPABILITIES
ReleasePowerRelationship

Other Resources

Power Management Functions