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?