xxxxx@gmail.com wrote:
> You CAN install a device upper filter on your specific microphone, which would get loaded each time the device is detected
Could it be realized in a way I wrote before? (PnpNotify, create device and attach)? Or I should use different approach?
You might want to read a little bit about PnP filter drivers. They are
a powerful concept. You install a device upper filter by creating a
services entry, then adding your service to the UpperFilters registry
entry for the device you want to filter. Now you will automatically be
loaded with the rest of the drivers for the device, and you will be
inserted at the right spot in the hierarchy.
> You can’t do that. By the time you get the notification of a device interface coming or going, the driver stack has long since finished being built. You cannot insert yourself into an existing driver stack.
Could you elaborate it a bit?
After the device stack has been initialized, it is too late to go back
and add yourself. Among other problems, each driver in the stack is
told at initialization time how many drivers are below it, and they use
that information to create a set of request stack entries in each IRP.
If you get in the way, that count is wrong, and memory gets overwritten.
Also let me dig a bit and ask you why you think my initial question was very different problem?
I’d like to correct myself next time? It was too generic? Or maybe you (as an expert saw so many different things that may be hidden under such description?)?.
Yes, what you asked was how to add yourself as a filter to every PCI
device in the system, using PnP notifications. That’s a different
problem from inserting a single device upper filter driver.
Anyway… As for Audio Engine Process - I noticed it already and working on it. BTW this is quiet wierd that Microsoft creates such ‘frameworks’ (which I consider as good and useful), but does not provide that interesting information (like origin of call). BTW are such things anywhere documented?
The whole question of identifying a process is itself a point of
contention. How do you identify a process? If I give you a process ID,
what good does that do? How would you use that information? In
general, if there is no reasonable use for a piece of information,
Microsoft doesn’t go out of their way to design a way to access it.
Microsoft also has to think in terms of the general case. In general
terms, there might be 6 applications all feeding audio data to the Audio
Engine, where it gets mixed and muxed and sent to the hardware as a
single stream. How do you report that? Also remember that, as audio is
flowing, some devices (WaveRT) don’t every transition to kernel mode.
The data transfer is all handled inside the Audio Engine process. In
that case, there is nothing to filter.
The original audio driver system was collapsing under its own weight.
There were hundreds or thousands of people like you, who wanted to
insert just a bit of filtering and custom processing into the timeline.
It got so bad that professional audio systems simply could not operate
because of the unpredictable overhead – death by a thousand cuts.
The Audio Engine was also a by-product of well-dressed Hollywood
lawyers. By putting all of the audio policy-making decisions in a
specially protected process, Microsoft could make security guarantees
that eventually satisfied Shania Twain’s attorneys and allowed her music
to be played on a Windows system.
Out of curiosity: how it looks for video streams? Is it also going through proxy process/framework?
No. Video applications use DirectShow or Media Foundation, both of
which have in-process proxies to call into Kernel Streaming drivers.
> Are you just looking for telemetry information, like how often and how long it was used? That type of thing might already be available in the ETW logs.
You have magic ball?
ok… this is not main purpose of this project, but this is next project/feature.
Anywya ETW - I believe you are talking about user-mode don’t you?
ETW is used throughout Windows in both modes. In a Win 8 or Win 10
system, the quantity of tracing and logging information is
overwhelming. Every useful piece of data is being tracked, and it
becomes your job to figure out how to tap into that.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.