code: public void deleteKey(HKey hk, String key) throws RegistryException {
  		int rc = -1;
  		try {
  			rc = ReflectedMethods.deleteKey(hk.root(), hk.hex(), key);
  		} catch (Exception e) {
  			throw new RegistryException("Cannot delete key " + key, e);
  		}
  		if (rc != RC.SUCCESS) {
  			throw new RegistryException("Cannot delete key " + key + ". Return code is " + rc);
  		}
  	}
docs: Delete given key from registry.
  
  @param hk the HKEY
  @param key the key to be deleted
  @throws RegistryException when something is not right