/** * Writes a DWORD value. */ public void setValue(String name, int value) { byte[] data = new byte[4]; data[0] = (byte) (value & 0xff); data[1] = (byte) ((value >> 8) & 0xff); data[2] = (byte) ((value >> 16) & 0xff); data[3] = (byte) ((value >> 24) & 0xff); check(Advapi32.INSTANCE.RegSetValueEx(handle, name, 0, WINNT.REG_DWORD, data, data.length)); }
public void deleteValue(String valueName) { check(Advapi32.INSTANCE.RegDeleteValue(handle, valueName)); }
/** * Writes a String value. */ public void setValue(String name, String value) { try { byte[] bytes = value.getBytes("UTF-16LE"); int newLength = bytes.length+2; // for 0 padding byte[] with0 = new byte[newLength]; System.arraycopy(bytes, 0, with0, 0, newLength); check(Advapi32.INSTANCE.RegSetValueEx(handle, name, 0, WINNT.REG_SZ, with0, with0.length)); } catch (UnsupportedEncodingException e) { throw new AssertionError(e); } }
/** * Deletes this key (and disposes the key.) */ public void delete() { check(Advapi32.INSTANCE.RegDeleteKey(handle, path)); dispose(); }
public RegistryKey open(String subKeyName, int access) { IntByReference pHandle = new IntByReference(); check(Advapi32.INSTANCE.RegOpenKeyEx(handle, subKeyName, 0, access, pHandle)); return new RegistryKey(this,subKeyName,pHandle.getValue()); }
check(result);
/** * Writes a DWORD value. */ public void setValue(String name, int value) { byte[] data = new byte[4]; data[0] = (byte) (value & 0xff); data[1] = (byte) ((value >> 8) & 0xff); data[2] = (byte) ((value >> 16) & 0xff); data[3] = (byte) ((value >> 24) & 0xff); check(Advapi32.INSTANCE.RegSetValueEx(handle, name, 0, WINNT.REG_DWORD, data, data.length)); }
/** * Writes a DWORD value. */ public void setValue(String name, int value) { byte[] data = new byte[4]; data[0] = (byte) (value & 0xff); data[1] = (byte) ((value >> 8) & 0xff); data[2] = (byte) ((value >> 16) & 0xff); data[3] = (byte) ((value >> 24) & 0xff); check(Advapi32.INSTANCE.RegSetValueEx(handle, name, 0, WINNT.REG_DWORD, data, data.length)); }
/** * Writes a DWORD value. */ public void setValue(String name, int value) { byte[] data = new byte[4]; data[0] = (byte) (value & 0xff); data[1] = (byte) ((value >> 8) & 0xff); data[2] = (byte) ((value >> 16) & 0xff); data[3] = (byte) ((value >> 24) & 0xff); check(Advapi32.INSTANCE.RegSetValueEx(handle, name, 0, WINNT.REG_DWORD, data, data.length)); }
/** * Writes a String value. */ public void setValue(String name, String value) { try { byte[] bytes = value.getBytes("UTF-16LE"); int newLength = bytes.length+2; // for 0 padding byte[] with0 = new byte[newLength]; System.arraycopy(bytes, 0, with0, 0, newLength); check(Advapi32.INSTANCE.RegSetValueEx(handle, name, 0, WINNT.REG_SZ, with0, with0.length)); } catch (UnsupportedEncodingException e) { throw new AssertionError(e); } }
public void deleteValue(String valueName) { check(Advapi32.INSTANCE.RegDeleteValue(handle, valueName)); }
public void deleteValue(String valueName) { check(Advapi32.INSTANCE.RegDeleteValue(handle, valueName)); }
/** * Writes a String value. */ public void setValue(String name, String value) { try { byte[] bytes = value.getBytes("UTF-16LE"); int newLength = bytes.length+2; // for 0 padding byte[] with0 = new byte[newLength]; System.arraycopy(bytes, 0, with0, 0, newLength); check(Advapi32.INSTANCE.RegSetValueEx(handle, name, 0, WINNT.REG_SZ, with0, with0.length)); } catch (UnsupportedEncodingException e) { throw new AssertionError(e); } }
/** * Writes a String value. */ public void setValue(String name, String value) { try { byte[] bytes = value.getBytes("UTF-16LE"); int newLength = bytes.length+2; // for 0 padding byte[] with0 = new byte[newLength]; System.arraycopy(bytes, 0, with0, 0, newLength); check(Advapi32.INSTANCE.RegSetValueEx(handle, name, 0, WINNT.REG_SZ, with0, with0.length)); } catch (UnsupportedEncodingException e) { throw new AssertionError(e); } }
/** * Deletes this key (and disposes the key.) */ public void delete() { check(Advapi32.INSTANCE.RegDeleteKey(handle, path)); dispose(); }
/** * Deletes this key (and disposes the key.) */ public void delete() { check(Advapi32.INSTANCE.RegDeleteKey(handle, path)); dispose(); }
/** * Deletes this key (and disposes the key.) */ public void delete() { check(Advapi32.INSTANCE.RegDeleteKey(handle, path)); dispose(); }
public RegistryKey open(String subKeyName, int access) { IntByReference pHandle = new IntByReference(); check(Advapi32.INSTANCE.RegOpenKeyEx(handle, subKeyName, 0, access, pHandle)); return new RegistryKey(this,subKeyName,pHandle.getValue()); }
public RegistryKey open(String subKeyName, int access) { IntByReference pHandle = new IntByReference(); check(Advapi32.INSTANCE.RegOpenKeyEx(handle, subKeyName, 0, access, pHandle)); return new RegistryKey(this,subKeyName,pHandle.getValue()); }
public RegistryKey open(String subKeyName, int access) { IntByReference pHandle = new IntByReference(); check(Advapi32.INSTANCE.RegOpenKeyEx(handle, subKeyName, 0, access, pHandle)); return new RegistryKey(this,subKeyName,pHandle.getValue()); }