On Thu Sep 29 23:37:31 2022 +0000, Santino Mazza wrote:
mmm, didn't think of this, I think it depends on the flag REG_PROCESS_PRIVATE, if the flag is set the handle shouldn't be able to be duplicated, so when it's not I think I'll have to check if other process has access to the key somehow before deleting the key when key_close_handle is called.
While the cross-process case is interesting, the more pressing point is simply duplicating in the current process. Probably this code should be in the `key_destroy()` handler, i.e. the hive would get saved when the last handle is closed.