Hartmut Birr wrote:
I think that some parts of your implementation are incorrect. The function must check for the location of the buffer and the previous mode. If the previous mode is user mode, the buffer must be located within the user address space. IMHO using of MmCopyFrom/ToCaller is better than using an exception block. It is also true for your following commits.
Yes, that's true. I've fixed them in the meanwhile doing it how MSDN recommends, probing the buffers passed from user mode and then rely on SEH. I know that SEH might not look as good as using MmCopyFrom/ToCaller, but 3rd party drivers don't have this option as well...
Best Regards Thomas