I was playing around my new HTC Kaiser and ummm... some times feel if there is a way to reboot dis and refresh the system, specially, after installing a new program.
Find below what I found on the net... I assume you have configured your ActiveSync correctly and know basics of VC++
Ok here it is
Include this in the header of your CPP code
#include
#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);
and here is the function
KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL);
Have fun..
:)
No comments:
Post a Comment