DOC: How to call CONFIGMG_Get(Set)_DevNode_PowerCapabilities

ID: Q198664


The information in this article applies to:


SUMMARY

Early versions of the Windows 98 DDK, including the July and October 1998 MSDN releases, incorrectly documented how to use the CONFIGMG_Get_DevNode_PowerCapabilities and CONFIGMG_Set_DevNode_PowerCapabilities services. For the correct documentation, please see the MORE INFORMATION section of this article.


MORE INFORMATION

You should call the CONFIGMG_Get_DevNode_PowerCapabilities and CONFIGMG_Set_DevNode_PowerCapabilities services as follows:


CONFIGRET CONFIGMG_Get_DevNode_PowerCapabilities(
  DEVNODE dnDevNode,
  PFARULONG pulPowerCapabilities,
  ULONG ulFlags
);

CONFIGRET CONFIGMG_Set_DevNode_PowerCapabilities(
  DEVNODE dnDevNode,
  ULONG ulPowerCapabilities,
  ULONG ulFlags
); 

dnDevNode

The first parameter is a handle to the device node from or to which you are getting or setting the power capabilities.

pulPowerCapabilities/ulPowerCapabilities

The second parameter refers to a bitmap of power capabilities, which can include the following flags as defined in configmg.h:
When you call CONFIGMG_Get_DevNode_PowerCapabilities, this second parameter is a pointer to a ULONG that receives the device's capabilities.

When you call CONFIGMG_Set_DevNode_PowerCapabilities, this parameter is a ULONG containing a bitmap of capabilities to set. Note that new power capabilities are only accepted for a device the very first time CONFIGMG_Set_DevNode_PowerCapabilities is called for a given devnode. Subsequent calls result in a logical AND of ulPowerCapabilities with the device's prior power capabilities, meaning that subsequent calls can only remove power capabilities.

The Windows 98 DDK documentation for Get_DevNode_PowerCapabilities erroneously mentions the following capability flags, which are actually not implemented in Windows 98. Do not use these flags:

ulFlags

The 3rd parameter to these functions, ulFlags, should be set to one of the following (depending upon whether you want to get or set the power capabilities for NORMAL or WAKEUP):


REFERENCES

Windows 98 DDK documentation; topic: Configuration Manager; Power Management


Keywords          : kbdocerr kbDDK kbWinOS98 
Version           : WINDOWS:Windows 98
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: March 6, 1999