63f67370
by Francis De Brabandere at 2026-05-13T21:25:53+02:00
vbscript: Implement IDispatch::GetTypeInfo for class instances via ICreateTypeLib2.
Build a TKIND_DISPATCH ITypeInfo for each class instance using
oleaut32's ICreateTypeLib2 / ICreateTypeInfo API rather than
hand-rolling the 22 ITypeInfo methods. The class name comes back
from GetDocumentation(MEMBERID_NIL), public funcs and Dim'd
properties are exposed via GetFuncDesc/GetVarDesc, and inherited
typeinfo machinery (GetContainingTypeLib etc.) works for free.
A few assertions are marked todo_wine because Wine's oleaut32
CreateTypeLib2 currently:
- adds 7 phantom inherited IDispatch methods to TKIND_DISPATCH
typeinfos, inflating cFuncs and zeroing cImplTypes;
- returns E_INVALIDARG instead of TYPE_E_BADMODULEKIND from
CreateInstance;
- doesn't zero the out-parameter on AddressOfMember failure;
- returns a reftype from GetRefTypeOfImplType that
GetRefTypeInfo can't resolve.
The new test passes with 0 failures on native Windows VBScript and
on Wine (8 todo_wine on the assertions above).