I need to change registery value in windowsCE using C # and P / Invoke (RapiDll doesn't work there)
I know how to read the key:
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);
Can anyone help me with this? (This is for changing btw device name)
source share