I have a problem on 2K SP4 that is not reproducible on XP SP2.
I load a hive that as been saved by a user mode application. I can
load/unload it in Regedt32 without problem.
But when I do this in my driver, it often (but not always) fails to load it
with error STATUS_FILE_LOCK_CONFLICT (0xC0000054). I set a break point on
ZwCreateFile() (which is called by ZwLoadKey()) and it is really this call
that fails the “key loading”.
After a reboot or if I let the system idle a while everything works ok. (No
more lock on the file?) How can I find the file lock? Why does it work on
the user mode app, like regedt32, but fails in kernel?
I did get STATUS_ACCESS_DENIED (0xc0000022) too but I’m pretty sure that it
was caused by insufficient registry quota.
By the way, everything works fine on XP SP2. I didn’t have the time to try
on earlier version.
I made a small driver that reproduces this behaviour, if anyone is
interested, it’s 34 lines long.
M-A
ps: I know it is not documented. No need to bash on me for that.
Agreement: You are not allowed to read this email. If you are reading
this, you already have read to this point and are in violation of this
agreement. Please contact the sender to make arrangement for the deposit
of your out-of-court settlement.
You may not use this email or email address. By contacting the sender
for the settlement, you are violating yet another section. Since you are
already planning on settlement payments, please double your payment.
Disclaimer: The sender of this email disclaims any type of brain
activity related to sense or reason pertaining to the contents of this
email.