This is an internal function, so invalid tid should never happen.
Hi Jacek,
Unless I'm misunderstanding something, it's called from GetTypeInfo, GetIDsOfNames, Invoke, without any checking on the input. I didn't want to duplicate the checks in each of them, though.
It always passes IScriptConteol_tid constant as tid.
Jacek