How do I notice that another program is trying to connect to camera being used in my program?

Hello,
I'm wondering if there's any way to notice another program is trying to connect in camera in my program.
If the camera connection is successful, I found information in the registry about the last time the camera was started, the last time it was stopped, and whether it was currently in use.
However, I could not find information related to trying to connect the camera when another program was using it.
When I am using the camera in my program and try to connect the camera in another program, I need to release the camera in my program and hand it over to another program.
Thanks in advance.
I am developing an app with PyQT.
First of all, currently, Microsoft Q&A supports the products listed over here: supported topics (more to be added later on). Microsoft Q&A does not support questions related to apps that developed via a third-party platform.
In UWP apps, there is no such way that could know if another program is trying to use the camera. I'm not sure if there is some win32 API that could do that. My suggestion is that you might need to ask about this issue in QT's official forum.
Thank you for your answer.
Sign in to comment