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

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

How the driver can call User API?

As above.



Looking forward to your reply!

Comments

  • Don_BurnDon_Burn Posts: 1,623
    You provide a user space service and use an inverted call to communicate.


    Don Burn
    Windows Driver Consulting
    Website: http://www.windrvr.com



    -----Original Message-----
    From: xxxxx@lists.osr.com
    [mailto:xxxxx@lists.osr.com] On Behalf Of
    xxxxx@foxmail.com
    Sent: Thursday, January 04, 2018 3:35 AM
    To: Windows System Software Devs Interest List <xxxxx@lists.osr.com>
    Subject: [ntdev] How the driver can call User API?

    As above.



    Looking forward to your reply!

    ---
    NTDEV is sponsored by OSR

    Visit the list online at:
    <http://www.osronline.com/showlists.cfm?list=ntdev>;

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
    drivers!
    Details at <http://www.osr.com/seminars>;

    To unsubscribe, visit the List Server section of OSR Online at
    <http://www.osronline.com/page.cfm?name=ListServer>;
  • Do you mean that user communicate with driver active?such as ioctl , and then driver control user servive’s behavior by out buffer .

    ___________________________________________
    God is a boy.

    > 在 2018年1月4日,20:11,xxxxx@windrvr.com <xxxxx@lists.osr.com> 写道:
    >
    > You provide a user space service and use an inverted call to communicate.
    >
    >
    > Don Burn
    > Windows Driver Consulting
    > Website: http://www.windrvr.com
    >
    >
    >
    > -----Original Message-----
    > From: xxxxx@lists.osr.com
    > [mailto:xxxxx@lists.osr.com] On Behalf Of
    > xxxxx@foxmail.com
    > Sent: Thursday, January 04, 2018 3:35 AM
    > To: Windows System Software Devs Interest List <xxxxx@lists.osr.com>
    > Subject: [ntdev] How the driver can call User API?
    >
    > As above.
    >
    >
    >
    > Looking forward to your reply!
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list online at:
    > <http://www.osronline.com/showlists.cfm?list=ntdev>;
    >
    > MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
    > drivers!
    > Details at <http://www.osr.com/seminars>;
    >
    > To unsubscribe, visit the List Server section of OSR Online at
    > <http://www.osronline.com/page.cfm?name=ListServer>;
    >
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev>;
    >
    > MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    > Details at <http://www.osr.com/seminars>;
    >
    > To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer>;
    >
  • Don_BurnDon_Burn Posts: 1,623
    Inverted call is described in http://www.osronline.com/article.cfm?id=94 an updated article with KMDF is at https://www.osr.com/nt-insider/2013-issue1/inverted-call-model-kmdf/


    Don Burn
    Windows Driver Consulting
    Website: http://www.windrvr.com




    -----Original Message-----
    From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@foxmail.com
    Sent: Thursday, January 04, 2018 8:01 AM
    To: Windows System Software Devs Interest List <xxxxx@lists.osr.com>
    Subject: Re: [ntdev] How the driver can call User API?

    Do you mean that user communicate with driver active?such as ioctl , and then driver control user servive’s behavior by out buffer .

    ___________________________________________
    God is a boy.

    > 在 2018年1月4日,20:11,xxxxx@windrvr.com <xxxxx@lists.osr.com> 写道:
    >
    > You provide a user space service and use an inverted call to communicate.
    >
    >
    > Don Burn
    > Windows Driver Consulting
    > Website: http://www.windrvr.com
    >
    >
    >
    > -----Original Message-----
    > From: xxxxx@lists.osr.com
    > [mailto:xxxxx@lists.osr.com] On Behalf Of
    > xxxxx@foxmail.com
    > Sent: Thursday, January 04, 2018 3:35 AM
    > To: Windows System Software Devs Interest List <xxxxx@lists.osr.com>
    > Subject: [ntdev] How the driver can call User API?
    >
    > As above.
    >
    >
    >
    > Looking forward to your reply!
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list online at:
    > <http://www.osronline.com/showlists.cfm?list=ntdev>;
    >
    > MONTHLY seminars on crash dump analysis, WDF, Windows internals and
    > software drivers!
    > Details at <http://www.osr.com/seminars>;
    >
    > To unsubscribe, visit the List Server section of OSR Online at
    > <http://www.osronline.com/page.cfm?name=ListServer>;
    >
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list online at:
    > <http://www.osronline.com/showlists.cfm?list=ntdev>;
    >
    > MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    > Details at <http://www.osr.com/seminars>;
    >
    > To unsubscribe, visit the List Server section of OSR Online at
    > <http://www.osronline.com/page.cfm?name=ListServer>;
    >




    ---
    NTDEV is sponsored by OSR

    Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev>;

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at <http://www.osr.com/seminars>;

    To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer>;
  • Tim_RobertsTim_Roberts Posts: 12,622
    xxxxx@foxmail.com wrote:
    > Do you mean that user communicate with driver active? such as ioctl, and then driver control user servive’s behavior by out buffer.

    Yes, essentially.  The key thing to take away here is that a kernel
    driver cannot call into a user-mode code at all.  If you need user-mode
    processing, then you have to have a user-mode process do it for you.

    What are you planning to do?  If you describe the design, perhaps we can
    suggest an alternative.

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

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

  • Hi Roberts, thanks your reply !

    This is a filter driver, and it is started while power on.

    The filter driver wants to call EnumDisplayDevices to get some information but this is not implemented in kernel mode by microsoft.
    The filter driver initialize according the information.

    Are there any other way ?



    xxxxx@foxmail.com

    From: xxxxx@probo.com
    Date: 2018-01-05 03:41
    To: Windows System Software Devs Interest List
    Subject: Re: [ntdev] How the driver can call User API?
    xxxxx@foxmail.com wrote:
    > Do you mean that user communicate with driver active? such as ioctl, and then driver control user servive’s behavior by out buffer.

    Yes, essentially. The key thing to take away here is that a kernel
    driver cannot call into a user-mode code at all. If you need user-mode
    processing, then you have to have a user-mode process do it for you.

    What are you planning to do? If you describe the design, perhaps we can
    suggest an alternative.

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


    ---
    NTDEV is sponsored by OSR

    Visit the list online at:

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at

    To unsubscribe, visit the List Server section of OSR Online at
  • Doron_HolanDoron_Holan Posts: 10,360
    Why does your filter need to find displays? What is going to do once it finds one? Do you want the filter to render something on the screen?

    Bent from my phone
    ________________________________
    From: xxxxx@lists.osr.com on behalf of xxxxx@foxmail.com
    Sent: Saturday, January 6, 2018 7:26:57 PM
    To: Windows System Software Devs Interest List
    Subject: Re: Re: [ntdev] How the driver can call User API?

    Hi Roberts, thanks your reply !

    This is a filter driver, and it is started while power on.

    The filter driver wants to call EnumDisplayDevices to get some information but this is not implemented in kernel mode by microsoft.
    The filter driver initialize according the information.

    Are there any other way ?

    ________________________________
    xxxxx@foxmail.com

    From: xxxxx@probo.com
    Date: 2018-01-05 03:41
    To: Windows System Software Devs Interest List
    Subject: Re: [ntdev] How the driver can call User API?
    xxxxx@foxmail.com wrote:
    > Do you mean that user communicate with driver active? such as ioctl, and then driver control user servive?s behavior by out buffer.

    Yes, essentially. The key thing to take away here is that a kernel
    driver cannot call into a user-mode code at all. If you need user-mode
    processing, then you have to have a user-mode process do it for you.

    What are you planning to do? If you describe the design, perhaps we can
    suggest an alternative.

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


    ---
    NTDEV is sponsored by OSR

    Visit the list online at:

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at

    To unsubscribe, visit the List Server section of OSR Online at


    ---
    NTDEV is sponsored by OSR

    Visit the list online at:

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at

    To unsubscribe, visit the List Server section of OSR Online at
  • Yes. I want to filter the display adapter which render s the screen ,but the filter filters all display adapter currently. I can know which display adapter renders the screen from EnumDisplayAdapter.The filter driver must know the information before display adapter power on.

    ___________________________________________
    God is a boy.

    > 在 2018年1月7日,13:38,xxxxx@microsoft.com 写道:
    >
    > Why does your filter need to find displays? What is going to do once it finds one? Do you want the filter to render something on the screen?
    >
    > Bent from my phone
    > From: xxxxx@lists.osr.com on behalf of xxxxx@foxmail.com
    > Sent: Saturday, January 6, 2018 7:26:57 PM
    > To: Windows System Software Devs Interest List
    > Subject: Re: Re: [ntdev] How the driver can call User API?
    >
    > Hi Roberts, thanks your reply !
    >
    > This is a filter driver, and it is started while power on.
    >
    > The filter driver wants to call EnumDisplayDevices to get some information but this is not implemented in kernel mode by microsoft.
    > The filter driver initialize according the information.
    >
    > Are there any other way ?
    >
    > xxxxx@foxmail.com
    >
    > From: xxxxx@probo.com
    > Date: 2018-01-05 03:41
    > To: Windows System Software Devs Interest List
    > Subject: Re: [ntdev] How the driver can call User API?
    > xxxxx@foxmail.com wrote:
    > > Do you mean that user communicate with driver active? such as ioctl, and then driver control user servive’s behavior by out buffer.
    >
    > Yes, essentially. The key thing to take away here is that a kernel
    > driver cannot call into a user-mode code at all. If you need user-mode
    > processing, then you have to have a user-mode process do it for you.
    >
    > What are you planning to do? If you describe the design, perhaps we can
    > suggest an alternative.
    >
    > --
    > Tim Roberts, xxxxx@probo.com
    > Providenza & Boekelheide, Inc.
    >
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list online at:
    >
    > MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    > Details at
    >
    > To unsubscribe, visit the List Server section of OSR Online at
    >
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list online at:
    >
    > MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    > Details at
    >
    > To unsubscribe, visit the List Server section of OSR Online at
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list online at:
    >
    > MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    > Details at
    >
    > To unsubscribe, visit the List Server section of OSR Online at
  • Tim_RobertsTim_Roberts Posts: 12,622
    On Jan 6, 2018, at 10:00 PM, xxxxx@foxmail.com wrote:
    >
    > Yes. I want to filter the display adapter which render s the screen ,but the filter filters all display adapter currently. I can know which display adapter renders the screen from EnumDisplayAdapter.The filter driver must know the information before display adapter power on.

    Has it occurred to that, before the display adapter driver runs, EnumDisplayAdapter is not going to find anything?

    All of the user interface concepts (screens, desktops, windows) are user-mode concepts. Kernel doesn't get involved, so there is no information to find. You need to frame your problem in a different way. If your filter is getting loaded for every driver, can't you use the device identification to figure out which devices to filter and which to skip?

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

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

  • That is the driver must get information gotten from EnumDisplayAdapter to hook display adapter’s DxgkInitialize .
    If the information of EnumDisplayAdapter is in the registry,it is best way get information from registry.

    Are there any other way?

    ___________________________________________
    God is a boy.

    > 在 2018年1月7日,14:56,xxxxx@probo.com 写道:
    >
    >> On Jan 6, 2018, at 10:00 PM, xxxxx@foxmail.com wrote:
    >>
    >> Yes. I want to filter the display adapter which render s the screen ,but the filter filters all display adapter currently. I can know which display adapter renders the screen from EnumDisplayAdapter.The filter driver must know the information before display adapter power on.
    >
    > Has it occurred to that, before the display adapter driver runs, EnumDisplayAdapter is not going to find anything?
    >
    > All of the user interface concepts (screens, desktops, windows) are user-mode concepts. Kernel doesn't get involved, so there is no information to find. You need to frame your problem in a different way. If your filter is getting loaded for every driver, can't you use the device identification to figure out which devices to filter and which to skip?
    > —
    > Tim Roberts, xxxxx@probo.com
    > Providenza & Boekelheide, Inc.
    >
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list online at:
    >
    > MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    > Details at
    >
    > To unsubscribe, visit the List Server section of OSR Online at
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!