Gal*_*ali 4 c# windows-mobile-5.0
如何使用C#for Windows Mobile 5.0执行冷启动和热启动?
是否有任何程序可以在Windows-mobile 5.0上运行命令提示符?
提前致谢
[DllImport("coredll.dll")]
public static extern int KernelIoControl(int dwIoControlCode, IntPtr lpInBuf, int nInBufSize, IntPtr lpOutBuf, int nOutBufSize,ref int lpBytesReturned);
private int CTL_CODE(int DeviceType, int Func, int Method, int Access)
{
return (DeviceType << 16) | (Access << 14) | (Func << 2) | Method;
}
private int ResetPocketPC()
{
const int FILE_DEVICE_HAL = 0x101;
const int METHOD_BUFFERED = 0;
const int FILE_ANY_ACCESS = 0;
int bytesReturned = 0;
int IOCTL_HAL_REBOOT;
IOCTL_HAL_REBOOT = CTL_CODE(FILE_DEVICE_HAL, 15, METHOD_BUFFERED, FILE_ANY_ACCESS);
return KernelIoControl(IOCTL_HAL_REBOOT, IntPtr.Zero, 0, IntPtr.Zero, 0, ref bytesReturned);
}
Run Code Online (Sandbox Code Playgroud)
可以从CodeProject获取更多信息以及如何使用代码.在Psion Cummunity博客上还有另一篇关于此的精彩文章,我强烈建议您查看.
| 归档时间: |
|
| 查看次数: |
2032 次 |
| 最近记录: |