|
'''How do I soft-reset the device programmatically from my .NET application?''' |
|
'''How do I soft-reset the device programmatically from my .NET application?''' |
- |
: [DllImport("coredll.dll", SetLastError = true)]
|
+ |
:<code>[DllImport("coredll.dll", SetLastError = true)]
|
|
static extern int SetSystemPowerState(string psState, int StateFlags, int Options); |
|
static extern int SetSystemPowerState(string psState, int StateFlags, int Options); |
- |
const int POWER_STATE_RESET = 0x00800000;
|
+ |
const int POWER_STATE_RESET = 0x00800000;</code>
|
- |
: SetSystemPowerState(null, POWER_STATE_RESET, POWER_FORCE);
|
+ |
:<code>SetSystemPowerState(null, POWER_STATE_RESET, POWER_FORCE);</code>
|