我正在使用 windows mobile 6.1 并尝试在不重置设备的情况下禁用存储卡上的加密。如果存储卡已加密,我可以进入 ctlpnl 并取消选中它,然后单击确定,这会执行我想要的操作并立即解密。如果我通过注册表项更改它,它不会解密,直到我重新启动设备。如何在不重新启动的情况下解密它,就像在 ctlpnl 中所做的那样?
我如何知道单击确定按钮时会发生什么?
到目前为止,我可以通过执行以下代码来更新复选框。但它仍然没有解密存储卡。
谢谢
[DllImport("coredll.dll")]
public static extern int SendMessage(IntPtr hWnd, uint msg, int wParam, int lParam);
[DllImport("coredll.dll")]
public static extern bool SendMessageTimeout(IntPtr hWnd, int Msg, int wParam, int lParam, int fuFlags, int uTimeout, out int lpdwResult);
[DllImport("coredll.dll")]
public static extern bool PostMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
public const int HWND_BROADCAST = 0xffff;
public const int WM_WININICHANGE = 0x1A;
public const int WM_SETTINGCHANGE = 0x1A;
public const int SMTO_NORMAL = 0x0000;
public const int SMTO_BLOCK = 0x0001;
SendMessage((IntPtr)HWND_BROADCAST, WM_WININICHANGE, 0, 0);
SendMessage((IntPtr)HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0);
PostMessage((IntPtr)HWND_BROADCAST, WM_WININICHANGE, 0, 5000);
PostMessage((IntPtr)HWND_BROADCAST, WM_SETTINGCHANGE, 0, 5000);