C# windows form webview2 エラー[インターフェイスがサポートされていません ]の原因が知りたい

windows form です。
提示のWebview2の利用でソースコードですが以下のtry castchにて以下の例外が発生してしまうのですがこれはなぜでしょうか?

調べたこと

検索しましたがC# windows form に関する記事がヒットしません。
null参照がst変数に来ているかどうかを確認
表示自体はされます。

参考サイト:https://social.msdn.microsoft.com/Forums/office/en-US/61558e41-387b-4a85-abd0-459b62916fba/error-the-queryinterface-call-on-the-com-component-for-the-interface-with-iid?forum=outlookdev

例外
いいいい 109357828712607029 Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Controller'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{4D00C0D1-9434-4EB6-8078-8697A560334F}' failed due to the following error: インターフェイスがサポートされていません (0x80004002 (E_NOINTERFACE)). いいいい
ソースコード

cs

public void setStreamTimeLine() { Task.Run( async () => { string? id = null; while(true) { Console.WriteLine("いいいい"); List<JsonData.Post>? post = await client.getHomeTimeLine_Async(id, null, null, "10", null); if(post != null) { Console.WriteLine(post[0].id); Debug.WriteLine("あああああ"); Program.timeLine_form.setViewTimeLine(post); Debug.WriteLine("いいいいい"); id = post[0].id; } } }); }

cs

string st = ""; public void setViewTimeLine(List<JsonData.Post>? post) { if(post == null) { //onsole.WriteLine("qqq"); } foreach(JsonData.Post p in post) { st += getPost(p); } //Console.WriteLine("ああああ " +st); Debug.WriteLine("qqqqq"); try { //webView.Reload(); webView.NavigateToString(st); } catch (System.Exception e) { Console.WriteLine(e.Message); } Debug.WriteLine("eeeeeee"); }

コメントを投稿

0 コメント