SetDevicePower (coredll)
Last changed: lewisw@tesco.net-82.31.21.85

.
Summary
TODO - a short description

C# Signature:

[DllImport("coredll.dll", SetLastError=true)]

private static extern int SetDevicePower(

string pvDevice,

int dwDeviceFlags,

DevicePowerState DeviceState);

VB Signature:

Declare Function SetDevicePower  Lib "coredll.dll" (TODO) As TODO

User-Defined Types:

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:

SetDevicePower("BKL1:", POWER_NAME, DevicePowerState.D4);

Alternative Managed API:

Do you know one? Please contribute it!

Documentation
SetDevicePower @msdn on MSDN