How to communicate with user mode?

Hi!

I am currently using IRP_MJ_DEVICE_CONTROL and DeviceIoControl to process IRPs and recently someone told me that he is using communication ports by calling FltCreateCommunicationPort , FltSendMessage etc.

what are the differences between those methods?
what are the pros and cons of each method?
how does each method work?

thanks!!
sapgr.

Flt communication ports is just one of the implementations of the IOCTL-based inverted calls. You can use it or create your own.


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
> Hi!
>
>
> I am currently using IRP_MJ_DEVICE_CONTROL and DeviceIoControl to process IRPs and recently someone told me that he is using communication ports by calling FltCreateCommunicationPort , FltSendMessage etc.
>
> what are the differences between those methods?
> what are the pros and cons of each method?
> how does each method work?
>
> thanks!!
> sapgr.
>
>
>

what do you mean when you are saying “inverted”?
what is the benefit of using communicating port instead of IRP_MJ_DEVICE_CONTROL ?

These are specific to file system filter drivers. If you’re not writing a file system filter driver, they don’t apply to you.

They’re just wrappers around IOCTLs, that file system filters can use. If you’re currently using IOCTLs, AND you’re writing a file system filter driver (you should be posting to the NTFSD forum and) there’s no real advantage to changing your implementation.

Peter
OSR
@OSRDrivers

Thanks a lot!!
:slight_smile:

xxxxx@gmail.com wrote:

what do you mean when you are saying “inverted”?

When you use ioctls to allow a driver to send notifications to an
application, that’s called “inverted call”. It gets that name because
Windows (like most systems with multiple privilege levels) does not
allow ordinary calls from higher privilege (kernel) to lower privilege
(user). We use the ioctl mechanism to perform this inversion.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I think this is what you need…
http://www.osronline.com/article.cfm?id=94.

:slight_smile:

Happy New Year everyone. And from what network filter driver function can we call FltCreateCommunicationPort. From DriverEntry or from FilterAttach

What does the first parameter of FltCreateCommunicationPort mean -

[in] Filter
An opaque filter pointer for the caller.
I tried to find it in the NDIS documentation but couldn’t find it.

It’s the handle you get back when registering as a File System Filter (which you are not).

This thread is ancient. Start a new one if you have further questions