How the driver can call User API?

As above.

Looking forward to your reply!

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
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:

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

To unsubscribe, visit the List Server section of OSR Online at
http:</http:></http:></http:>

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 写道:
>
> 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
> 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:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
> drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at
> http:
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:
></http:></http:></http:></http:></http:></http:>

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
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 写道:
>
> 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
> 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:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at
> http:
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at:
> http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at
> http:
>


NTDEV is sponsored by OSR

Visit the list online at: http:

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

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></http:></http:></http:></http:></http:></http:>

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.

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: http:

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

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

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.commailto:xxxxx
Date: 2018-01-05 03:41
To: Windows System Software Devs Interest Listmailto:xxxxx
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: http:

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

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


NTDEV is sponsored by OSR

Visit the list online at: http:

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

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></http:></http:></http:></mailto:xxxxx></mailto:xxxxx>

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: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></http:></http:></http:></http:></http:></http:>

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.

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: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>