Мне нужно изменить значение регистра в WindowsCE, используя c # и P / Invoke (RapiDll там отсутствует)
Я знаю, как читать ключ:
private static string ReadRegKey(UIntPtr rootKey, string keyPath, string valueName,string value)
{
IntPtr hKey = IntPtr.Zero;
if (RegOpenKeyEx(rootKey, keyPath, 0, KEY_READ, out hKey) == 0)
{
uint size = 1024;
uint type = 0;
string keyValue = null;
StringBuilder keyBuffer = new StringBuilder();
keyBuffer.Append(value);
if (RegQueryValueEx(hKey, valueName, IntPtr.Zero, ref type, keyBuffer, ref size) == 0)
keyValue = keyBuffer.ToString();
RegCloseKey(hKey);
return (keyValue);
}
return (null); // Return null if the value could not be read
}
Может ли кто-нибудь помочь мне с этим? (Это для изменения названия устройства между прочим)