Desktop Functions: Smart Device Functions:
|
SetDevicePower (coredll)
coredll is for smart devices, not desktop Windows. Therefore, this information only applies to code using the .NET Compact Framework. To see if information for SetDevicePower in other DLLs exists, click on Find References to the right. C# Signature:
[DllImport("coredll.dll", SetLastError=true)] VB Signature:
<DllImport("coredll")> _ User-Defined Types:
public enum DevicePowerState : int public enum DevicePowerState : int { Unspecified = -1, D0 = 0, // Full On: full power, full functionality D1, // Low Power On: fully functional at low power/performance D2, // Standby: partially powered with automatic wake D3, // Sleep: partially powered with device initiated wake D4, // Off: unpowered } private const int POWER_NAME = 0x00000001; Notes:None. Tips & Tricks:Please add some! Sample Code:
This turns the backlight off SetDevicePower("BKL1:", POWER_NAME, DevicePowerState.D4); Alternative Managed API:Do you know one? Please contribute it! Please edit this page!Do you have...
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). |
|