Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


How to communicate with user mode?

Sap_GrSap_Gr Member Posts: 9
edited January 3 in 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.
Post edited by Scott_Noone_(OSR) on

Comments

  • Maxim_S._ShatskihMaxim_S._Shatskih Member Posts: 10,396
    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
    [email protected]
    http://www.storagecraft.com

    <[email protected]> wrote in message news:[email protected]
    > 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.
    >
    >
    >
  • Sap_GrSap_Gr Member Posts: 9
    what do you mean when you are saying "inverted"?
    what is the benefit of using communicating port instead of IRP_MJ_DEVICE_CONTROL ?
  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 9,055
    <quote>
    FltCreateCommunicationPort , FltSendMessage
    </quote>

    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

    Peter Viscarola
    OSR
    @OSRDrivers

  • Sap_GrSap_Gr Member Posts: 9
    Thanks a lot!!
    :-)
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,445
    [email protected] 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, [email protected]
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • TuTenKhaMen_6PmTuTenKhaMen_6Pm Member Posts: 35
    I think this is what you need..
    http://www.osronline.com/article.cfm?id=94.

    :)
  • ArsenArsen Member Posts: 61
    edited January 2

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

  • ArsenArsen Member Posts: 61

    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.

  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,527

    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

    -scott
    OSR

This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 January 2023 Live, Online
Developing Minifilters 20 March 2023 Live, Online
Internals & Software Drivers 17 April 2023 Live, Online
Writing WDF Drivers 22 May 2023 Live, Online