Share via


RegisterPowerRelationship

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

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

Parameters

  • pvParent
    [in] The LPWSTR device name of the parent or bus, for example, NDS0:.
  • pvChild
    [in] The 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 Values

  • ERROR_SUCCESS
    Relationship was established successfully.
  • ERROR_INVALID_PARAMETER
    Invalid parameter encountered.
  • ERROR_FILE_EXISTS
    Child device is already registered.

Remarks

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

If pCaps is NULL, then 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.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Pm.h.
Link Library: Coredll.lib.

See Also

IOCTL_POWER_CAPABILITIES | POWER_CAPABILITIES | ReleasePowerRelationship

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.