Well, this whole issue was related due to wrong releasing the object. It seems releasing an interface in c++ is easier than other languages, such as Pascal.
CaptureEngine Error 0x80070005 (access is denied)
Hi all,
I'm trying the CaptureEngine example from the classic examples but I got the error :
MF_CAPTURE_ENGINE_EVENT: {219992BC-CF92-4531-A1AE-96E1E886C8F1} (hr = 0x80070005)
Ausnahme ausgelöst bei 0x76B1CA42 (KernelBase.dll) in CaptureEngine.exe: WinRT originate error - 0x80070005 : 'Zugriff verweigert'.
I'm using Windows 10 and VS 2017 with latest and greatest SDK.
What can I do?
Thanks and Best
Mario
4 answers
Sort by: Most helpful
-
-
Xiaopo Yang - MSFT 11,081 Reputation points Microsoft Vendor
2022-08-22T08:57:50.603+00:00 The issue can be reproduced when the Camera is disabled for desktop apps in settings like figure below:
You really need to check the access to devices.
-
the_real_boiler 21 Reputation points
2022-08-22T16:10:03.603+00:00 Yes, this was my first step, I've allowed desktop applications to access the camera but this didn't solve the issue. Any other idea?
-
Tony 96 Reputation points
2023-01-27T15:04:14.7066667+00:00 I'm facing the same error on Windows 11 latest build..
This error is thrown when switching to another capture device, just after calling CaptureEngine::StartPreview() that results with S_OK, but IMFMediaEvent::GetStatus() throws 0x80070005. Restarting the application and then select the second device does what is expected. But switching to the first device raises the same issue..
When I trace the code in the debugger, the debugger says:
avcore\mf\mfmediaengine\svr\presentationhandlerexceptionwrapper.cpp(64)\mfsvr.dll!5DF7D8CE: (caller: 5DF1B9FF) ReturnHr(1) tid(6768) 80070005 Access Denied.
I'm wondering why the CaptureEngine has this feature, while doing the same with IMFSourceReader, all goes fine.