Thanks for your answers, I have some other questions.
Indeed I passed pointers to kernel memory to my Zw function, so I'm
replacing these pointers with memory zones allocated by
ZwAllocateVirtualMemory.
* I don't see kernel-mode functions to access virtual memory. I suppose the
allocated pages don't have to be aligned in memory, so direct access is
impossible. How can I do it ?
* I didn't know about CmRegisterCallback so I'll look at that, thanks.
"Maxim S. Shatskih" wrote:
> > Hi. I need a way to hook registry functions such as ZwQueryKey, and make it
> > return STATUS_ACCESS_DENIED depending on some condition. At this point I have
> > a half-working driver that hooks the SSDT table.
>
> CmRegisterCallbacks is the way, not hooking.
>
> --
> Maxim S. Shatskih
> Windows DDK MVP
>
> http://www.storagecraft.com
>
> .
>