internal static ITypeInfoWrapper GetTypeInfoWrapper(ITypeInfo rawTypeInfo) { ITypeInfoWrapper wrapper = new TypeInfoWrapper(rawTypeInfo); TraceWrapper(ref wrapper); return(wrapper); }
internal static ITypeInfoWrapper GetTypeInfoWrapper(IntPtr rawObjectPtr, int?parentUserFormUniqueId = null) { ITypeInfoWrapper wrapper = new TypeInfoWrapper(rawObjectPtr, parentUserFormUniqueId); TraceWrapper(ref wrapper); return(wrapper); }
public TypeInfoFunc(TypeInfoWrapper typeInfo, int funcIndex) { _typeInfo = typeInfo; ((ComTypes.ITypeInfo)_typeInfo).GetFuncDesc(funcIndex, out _funcDescPtr); FuncDesc = StructHelper.ReadStructureUnsafe <ComTypes.FUNCDESC>(_funcDescPtr); ((ComTypes.ITypeInfo)_typeInfo).GetNames(FuncDesc.memid, _names, _names.Length, out _cNames); if (_cNames == 0) { _names[0] = "[unnamed]"; } }
public override int GetTypeInfoType(int index, IntPtr pTKind) { var hr = _target_ITypeLib.GetTypeInfoType(index, pTKind); if (ComHelper.HRESULT_FAILED(hr)) { return(HandleBadHRESULT(hr)); } var tKind = RdMarshal.ReadInt32(pTKind); tKind = (int)TypeInfoWrapper.PatchTypeKind((TYPEKIND_VBE)tKind); RdMarshal.WriteInt32(pTKind, tKind); return(hr); }
public TypeInfoVar(TypeInfoWrapper typeInfo, int index) { _typeInfo = typeInfo; ((ComTypes.ITypeInfo)_typeInfo).GetVarDesc(index, out _varDescPtr); _varDesc = StructHelper.ReadStructureUnsafe <ComTypes.VARDESC>(_varDescPtr); var names = new string[1]; if (_varDesc.memid != (int)TypeLibConsts.MEMBERID_NIL) { ((ComTypes.ITypeInfo)_typeInfo).GetNames(_varDesc.memid, names, names.Length, out _); _name = names[0]; } else { _name = "{unknown}"; // VBA Constants appear in the typelib with no name } }
public FuncsCollection(TypeInfoWrapper parent) => _parent = parent;