paulm
paulm

Reputation: 5882

What happens when an opened key is deleted or renamed?

Is the behavior documented/defined anywhere for the following situations:

  1. Process A opens key "foo", process B opens key "foo" and then deletes it.
  2. Process A opens key"foo", process B opens key "foo" and then renames it to "bar".

I've found in both cases that process B's operation will succeed - and closing the handle in A still works too. But what is really happening here?

There seems to be a lot of edge causes that make this hard to understand. For example what would happen in case 1 if after process B deletes the key, process A attempts to rename the deleted key or create new sub keys under it?

Upvotes: 0

Views: 65

Answers (1)

Abhineet
Abhineet

Reputation: 5389

RegDeleteKeyEx::

A deleted key is not removed until the last handle to it is closed.

Upvotes: 2

Related Questions