Page 1 of 1

RESET

Posted: Thu Aug 13, 2009 3:04 pm
by Silvio
How can I soft reset my Smarthphone ?

I found this but I not Know How make :

Code: Select all


#include <winioctl.h>

#define IOCTL_HAL_REBOOT CTL_CODE(FILE_DEVICE_HAL, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)

extern "C" __declspec(dllimport) BOOL KernelIoControl(
    DWORD dwIoControlCode, 
    LPVOID lpInBuf, 
    DWORD nInBufSize, 
    LPVOID lpOutBuf, 
    DWORD nOutBufSize, 
    LPDWORD lpBytesReturned);

BOOL ResetPocketPC()
{
    return KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL);
}
 

Re: RESET

Posted: Thu Aug 13, 2009 5:58 pm
by Salvador
#include <Pm.h>
SetSystemPowerState(NULL, POWER_STATE_RESET, 0);