Sending data from User to Kernel mode

I’m new to minifilter coding and am trying some trivial tasks. I’m having
problems though to pass arrays from a usermode app to kernel mode via ports.
(vice versa is ok). It sounds very trivial, but I’m getting blue screens, so
I don’t really know what’s going on. Any kind of help would be appreciated!

Besides, are ports a good way to send secure data? I mean, can’t they be
easily intercepted? If not, what other means could I use?

Thanks in advance for your help!

What kind of blue screen ? Please paste the analyze -v output.

Is it possible that you’re not calculating the sizes right ? There is a
pretty thorough documentation on how to calculate the sizes so that you
don’t run into alignment issues on MSDN on the page for FltSendMessage