Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than powrprof, prefix the name with the module name and a period.
Declare Function PowerEnumerate Lib "powrprof.dll" (RootPowerKey As IntPtr,
SchemeGuid As IntPtr,
SubGroupOfPowerSettingsGuid As IntPtr,
AccessFlags As PowerDataAccessor,
Index As UInteger,
Buffer As IntPtr,
ByRef BufferSize As UInteger) As UInteger
Public Enum PowerDataAccessor As UInteger
ACCESS_AC_POWER_SETTING_INDEX = 0
ACCESS_DC_POWER_SETTING_INDEX = 1
ACCESS_SCHEME = 16
ACCESS_SUBGROUP = 17
ACCESS_INDIVIDUAL_SETTING = 18
ACCESS_ACTIVE_SCHEME = 19
ACCESS_CREATE_SCHEME = 20
End Enum
Declare Function PowerEnumerate Lib "powrprof.dll" (TODO) As TODO
if (ReturnCode == 259) break; // no more data
if (ReturnCode != 0)
{
throw new COMException("Error occurred while enumerating power schemes. Win32 error code: " + ReturnCode);
}
// now we have a list of identifiers for all the power schemes on the system,
// we can pass those into other powrprof methods to retrieve more information on each
Enumerates all power schemes. For each power scheme enumerated, the function calls a callback function with information about the power scheme
6/9/2009 10:33:34 AM - -84.81.49.194
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).