Identify the process (PID and/or img file name) which is trying to access microphone using Media Foundation or other

Q247 5 Reputation points
2023-10-31T07:43:18.4433333+00:00

Hello,

I'm trying to create a console app that prints out a notification when a process is trying to access to camera or microphone.

I've found MS's Sensor Activity Monitor repo, that uses Media Foundation's IMFSensorActivityMonitor for camera access detection.

However, IMFSensorActivitiesReportCallback does not get triggered in case an app is trying to access a microphone.

So, my question is whether it is possible to use Media Foundation to detect access to microphone in the similar way it does to camera.

Is it possible to modify the IMFSensorActivitiesReportCallback implementation so that it also gets triggered on attempt to access microphone?

If it is not possible, then I would like to know which Api calls should be used for this purpose.

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Ben Foster 0 Reputation points
    2025-03-19T15:54:45.9866667+00:00

    I have code that uses this interface to monitor webcam access and it works. However, I'm not sure how to use it to detect microphone access.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.