I know it's quite common to use MediaCapture.StartPreviewAsync()
with MediaCapture
in a UWP application, however how do you use it in a Winforms application running on .NET 7?
When I try to call this function, I get this error:
System.Runtime.InteropServices.COMException: Unexpected error in requested operation. (0xC00D36BB)
And apparently this error is caused because I do not use CaptureElement
, but that is only available in UWP...
How do I call this function MediaCapture.StartPreviewAsync()
in this case?
There is no answer to my question, simply because this tool that I want to use is only available for applications on the UWP platform, which is not my case. However, there are possible alternatives that can solve my problem, and they are in the attached links
MediaCapture API in WPF or Windows Forms
c# using MediaCapture to show live video captured on a pictureBox in a Form