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]

set gramr [$recocontext CreateGrammar 50]

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

# 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.