不能創建子我有下面的代碼已經工作類型的設備的Windows Mobile 5和6.1的Windows Mobile 6.5:在註冊表
private const string OwnerSubKey = @"ControlPanel\Owner";
regKey = CERegistry.CurrentUser.CreateSubKey(OwnerSubKey);
當我有一個6.5設備搖籃和調試器到達上面的行,我得到
「類型: System.Runtime.InteropServices.ExternalException
消息: 錯誤寫入的RegistryKey
堆棧跟蹤: 在OpenNETCF.Desktop.Communication.CERegistryKey.SetValue(字符串名稱,對象的值) 「
我不知道什麼6.1和6.5或者是設備上的設置之間改變。 SOTI能夠操縱註冊表。
我也試過下面的代碼,在CreateSubKey上有同樣的異常。
var controlPanel = CERegistry.CurrentUser.OpenSubKey(@"ControlPanel", true);
var key = controlPanel.CreateSubKey("Owner");
如果我做了一個GetSubKeyCount()它正確地返回計數。
任何幫助表示讚賞。
謝謝