TCOM -type mismatch sapi

Posted by rick on 2009-08-09 19:19

The following results in a type mismatch. The output is from tkcon cons0le.

set recocontext [$rec CreateRecoContext]
::tcom::handle0x011C2568

set gramr [$recocontext CreateGrammar 50]
::tcom::handle0x01139D28

set hndl [::tcom::info interface $gramr]
::tcom::handle0x0139A040

# show all methods and paramaters
# our interest is in CmdLoadFromFile

(tkcon-2.5) 113 % $hndl methods
{1 VARIANT Id {}} {2 {ISpeechRecoContext *} RecoContext {}} {3 VOID State {{in I4 propertyValue}}} {3 I4 State {}} {4 {ISpeechGrammarRules *} Rules {}} {5 VOID Reset {{in I4 NewLanguage}}} {7 VOID CmdLoadFromFile {{in BSTR FileName} {in I4 LoadOption}}} {8 VOID CmdLoadFromObject {{in BSTR ClassId} {in BSTR GrammarName} .....

set xx [$gramr -method CmdLoadFromFile "tcxt.xml" SLODyanmic]
0x80020005 {Type mismatch.}

Any assistance would be appreciated.

Rick