【问题标题】:reboot windows mobile 6.5 professional from c# application从 c# 应用程序重新启动 windows mobile 6.5 专业版
【发布时间】:2012-06-15 05:34:51
【问题描述】:

我正在使用以下代码从我的 c# 应用程序重新启动设备

[Flags]
    public enum ExitFlags
    {
        Reboot = 0x02,
        PowerOff = 0x08
    }

    [DllImport("coredll")]
    public static extern int ExitWindowsEx(ExitFlags flags, int reserved);

ExitWindowsEx(ExitFlags.PowerOff, 0);

但是我得到以下错误:

Can't find an Entry Point 'ExitWindowsEx' in a PInvoke DLL 'coredll'.

【问题讨论】:

    标签: windows mobile shutdown reboot


    【解决方案1】:

    您收到错误是因为函数 ExitWindowsEx 在 coredll 中不存在它在 aygshell.dll 中存在

    查看这里的信息http://www.pinvoke.net/default.aspx/aygshell.ExitWindowsEx

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-06-24
      • 2013-09-01
      • 1970-01-01
      • 2011-05-21
      • 2023-04-08
      • 2011-12-22
      • 2011-04-04
      • 1970-01-01
      相关资源
      最近更新 更多