Hi,
I’m currently writing a kernel mode filter driver to monitor registry activity (using CmRegisterCallback/CmRegisterCallbackEx) and am after some advice on interpreting the ‘REG_POST_OPERATION_INFORMATION’ structure, specifically within the context of handling a ‘RegNtPostCreateKeyEx’ event.
I can successfully process the ‘Object’ member using ‘ObQueryNameString’ to give me the name of the created key (which is what I’m after), however in some instances the ‘Status’ member is not equal to ‘STATUS_SUCCESS’ which according to the Microsoft documentation (link below) means that the Object pointer is invalid.
http://msdn.microsoft.com/en-gb/library/windows/hardware/ff548191(v=vs.85).aspx
Checking the ‘Status’ member before using the ‘Object’ pointer is enough for me to
avoid the BSOD. However, when the object pointer is invalid I’m obviously unable to obtain the name of the key that has been created which is a problem.
The Microsoft documentation isn’t clear about why these Object pointers are sometimes invalid and under which circumstances it will happen and I’d like to know which key creation events I’m going to miss because of this. Can anybody shed any light on this?
Apologies if this is a daft question, I’m new to driver writing and could really use a steer in the right direction!
Thanks