Monday, February 1, 2016

Under windows mobile restart problem




            


I see msdn gives an example of the realization dll call system restart, but on ppc platform, in the vs2005 debugging, ppc platform everything is normal, but the change to sp2003 will not work (not an error) , because this is coredll.dll inside the function call, and this dll's part of the core part wince, and ppc, sp difference should be irrelevant. My question is, why can not properly use the following sp coredll the function of it?
Reply:
Use C ++ development, directly call api function, still can not restart, but has confirmed that the smartphone sdk there KernelIoControl function and associated macros, do not know is a function of the wrong or how int IOCTL_HAL_REBOOT = CTL_CODE (FILE_DEVICE_HAL, 15, METHOD_BUFFERED, FILE_ANY_ACCESS);
LPDWORD bytesReturned;
KernelIoControl (IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, bytesReturned);

Reply:
MOV R1, # 0
MOV R0, # 2
BL AYGSHELL_2011

sp restart

Reply:
This answer would not knot posted, right?
Reply:
PPC and SP reboot code no problem ah,
#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);
HRESULT softReset ()
{
return KernelIoControl (IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL);
}
I have been using the code, the root of your same.
Reply:
The reply is deleted moderator

No comments:

Post a Comment