|
目前在調用mips reboot但都是掛在OEMinit
code 如下
static void ResetWithSetSystemPowerState()
{
typedef DWORD (*SetSystemPowerStateFunction)(LPCWSTR pwsSystemState, DWORD StateFlags, DWORD Options);
HMODULE hModule =:: LoadLibrary(TEXT("Coredll.dll"));
SetSystemPowerStateFunction f = (SetSystemPowerStateFunction)
::GetProcAddress(hModule, TEXT("SetSystemPowerState"));
#ifndef POWER_STATE_RESET
#define POWER_STATE_RESET DWORD(0x00800000)
#endif
f(NULL, POWER_STATE_RESET, 0);
::FreeLibrary(hModule);
}
|
|