PowrProf Class

Platform Invocation methods (P/Invoke), access unmanaged code.

PowrProf.dll.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[HideModuleNameAttribute]
public sealed class PowrProf
Inheritance
Object    PowrProf

Methods

Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
GetHashCode Serves as the default hash function.
(Inherited from Object)
GetType Gets the Type of the current instance.
(Inherited from Object)
PowerDeleteScheme Deletes the specified power scheme from the database.
PowerDuplicateScheme Duplicates an existing power scheme.
PowerEnumerate Enumerates the specified elements in a power scheme.

This function is normally called in a loop incrementing the Index parameter to retrieve subkeys until they've all been enumerated.

PowerGetActiveScheme Retrieves the active power scheme and returns a GUID that identifies the scheme.
PowerImportPowerScheme Imports a power scheme from a file.
PowerReadFriendlyName Retrieves the friendly name for the specified power setting, subgroup, or scheme.

If the schemeGuid parameter is not but both the subGroupOfPowerSettingsGuid and powerSettingGuid parameters are Zero, the friendly name of the power scheme will be returned.

If the schemeGuid is not , and subGroupOfPowerSettingsGuid parameter is not Zero, and the powerSettingGuid parameter is Zero, the friendly name of the subgroup will be returned.

If the schemeGuid is not , and subGroupOfPowerSettingsGuid and powerSettingGuid parameters are not Zero, the friendly name of the power setting will be returned.

PowerSetActiveScheme Sets the active power scheme for the current user.
SetSuspendState Suspends the system by shutting power down.

Depending on the Hibernate parameter, the system either enters a suspend (sleep) state or hibernation (S4).

ToString Returns a string that represents the current object.
(Inherited from Object)

Extension Methods

CanConvertTo Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
CanConvertToT Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
ConvertToT Converts an object to the specified target type.

If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions)

ConvertToT Converts an object to the specified target type.

If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions)

IsDisposable Determines whether the specified object is a disposable type (i.e., it implements IDisposable interface).
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
ThrowIfNullTException Throws the specified exception if the source object is null.
(Defined by ObjectExtensions)

See Also