C#WPF cannot cast a COM object of type "System.__comobject" to the interface type "System.Speech.Internal.SapiInterop.ISpDataKey". Solutions

Source: Internet
Author: User
Tags ole

This.speecher.SpeakAsync (Texttospeak); Error

COM objects of type ' system.__comobject cannot be cast to interface type ' System.Speech.Internal.SapiInterop.ISpDataKey '. This operation failed because the COM component call to the interface with IID ' {14056581-e16c-11d2-bb90-00c04f8ee6c0} ' QueryInterface failed with the following error: This interface is not supported (exception is from hresult:0 x80004002 (E_nointerface)).

Fault information
===================================

COM objects of type ' system.__comobject cannot be cast to interface type ' Microsoft.VisualStudio.OLE.Interop.IServiceProvider '. This operation failed because the COM component call to the interface with IID ' {6D5140C1-7436-11CE-8034-00AA006009FA} ' QueryInterface failed with the following error: This interface is not supported (exception is from hresult:0 x80004002 (E_nointerface)). (Microsoft.VisualStudio.OLE.Interop)

------------------------------
Program Location:

In Microsoft.VisualStudio.OLE.Interop.IServiceProvider.QueryService (guid& guidservice, guid& riid, INTPTR & Ppvobject)
In Microsoft.VisualStudio.Shell.ServiceProvider.GetService (GUID GUID, Type servicetype)
In Microsoft.VisualStudio.Shell.ServiceProvider.GetService (Type servicetype)
In Microsoft.VisualStudio.Shell.WindowPane.GetService (Type servicetype)
In Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerToolWindow.GetService (Type servicetype)
In Microsoft.VisualStudio.Shell.WindowPane.System.IServiceProvider.GetService (Type servicetype)
In System.ComponentModel.Design.ServiceContainer.GetService (Type servicetype)
In the Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorerControl.GetService (Type ServiceType)
In Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorerControl.System.IServiceProvider.GetService (Type servicetype)
In System.ComponentModel.Design.ServiceContainer.GetService (Type servicetype)
In Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.GetService (Type servicetype)
In Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.RootNavigableItem.GetService (Type servicetype)
In Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NodeContext.GetService (Type servicetype)
In microsoft.sqlserver.management.ui.vsintegration.objectexplorer.navigableitembuilder.< Getcolumnsfromnavigationservice>d__f.movenext ()
In Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.AddFields (List ' 1 list, IEnumerable ' 1 fields, IDictionary ' 2 allvalidfields, addfieldsflags flags)
In Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.GetFields ( Inodeinformation source, Dictionary ' 2& allvalidcolumns)
In Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItemWithQuery (IList ' 1 nodes, inodeinformation source, Inavigableitem SourceItem, String urnquery, Boolean Registerbuilder, Boolean reg Isterbuiltitems)
In Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItem (IList ' 1 nodes, Inodeinformation source, Inavigableitem SourceItem, Ifilterprovider filter)
In Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.Build (IList ' 1 nodes, Inodeinformation source, Inavigableitem SourceItem, Ifilterprovider filter)
In Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.RequestChildren ( Igetchildrenrequest request)
In Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren (WaitHandle Quitevent)

Workaround 1:

Hello, you can try to do this,

+ bit
regsvr32 "C:\Program files\internet Explorer\ieproxy.dll"

A bit
regsvr32 "C:\Program Files (x86) \internet Explorer\ieproxy.dll"

======
If not, please do it again.
c:\windows\system32\regsvr32.exe/u Actxprxy.dll

C#WPF cannot cast a COM object of type "System.__comobject" to the interface type "System.Speech.Internal.SapiInterop.ISpDataKey". Solutions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.