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