PDA

View Full Version : COM Exception was unhandled, Creating an instance of the COM Component with CLSID...



programmermp
پنج شنبه 03 بهمن 1387, 20:01 عصر
با سلام این کد رو ببیند نمی دونم چرا این پیام رو می ده همه چیز درسته

فایل sapi.dll رو هم به رفرنس برنامه از طریق addreference اضافه می کنم همون microsoft speech object library

COMException was unhandled

Creating an instance of the COM component with CLSID {47206204-5ECA-11D2-960F-00C04F8EE628} from the IClassFactory failed due to the following error: 8004503a.

این هم از کدهام





OptionExplicitOn
Imports System.Runtime.InteropServices
Imports SpeechLib
PublicClass Form1
'Declarations
PublicWithEvents RC As SpSharedRecoContext
Public mygrammar As ISpeechRecoGrammar
'Recognition
PrivateSub RC_Recognition(ByVal streamnumber AsLong, _
ByVal streamposition AsObject, _
ByVal recognitiontype As SpeechRecognitionType, _
ByVal result As ISpeechRecoResult)
Label1.Text = result.PhraseInfo.GetText
EndSub
PrivateSub Form1_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Load
EndSub

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
RC = New SpSharedRecoContext
mygrammar = RC.CreateGrammar
mygrammar.DictationSetState(SpeechRuleState.SGDSAc tive)
EndSub
EndClass



منتظر راهنمایی شما عزیزان هستم

با تشکر