Add(MainForm,2953706,63,112)
{
Width=690
Height=344
Caption="ActiveXinfo v1.0"
BorderStyle=1
}
Add(InlineCode,13096425,266,63)
{
WorkPoints=#12:doGetActiveX|15:doGetInterfaces|15:doGetProperties|
EventPoints=#9:onClasses|12:onInterfaces|12:onProperties|7:onEnums|11:onFunctions|
Code=#26:{ Author -=andrestudio=- }|15:unit HiAsmUnit;|0:|9:interface|0:|32:uses kol,Share,Debug,KOLTlbUtil;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|22: TL: TTypeLibrary;|27: ClassesList: PStrList;|30: InterfacesList: PStrList;|30: PropertiesList: PStrList;|25: EnumsList: PStrList;|28: FunctionList: PStrList;|24: ClassesID: integer;|27: InterfacesID: integer;|9: public|24: Classes: THI_Event;|27: Interfaces: THI_Event;|26: onClasses: THI_Event;|29: onInterfaces: THI_Event;|29: onProperties: THI_Event;|24: onEnums: THI_Event;|28: onFunctions: THI_Event;|25: constructor Create; |54: procedure doGetActiveX(var dt: TData; idx: word);|57: procedure doGetInterfaces(var dt: TData; idx: word);|57: procedure doGetProperties(var dt: TData; idx: word);|5: end;|0:|14:implementation|0:|32:constructor THiAsmClass.Create; |5:begin|28: ClassesList := NewStrList;|31: InterfacesList := NewStrList;|31: PropertiesList := NewStrList;|26: EnumsList := NewStrList;|29: FunctionList := NewStrList;|4:end;|0:|61:procedure THiAsmClass.doGetActiveX(var dt: TData; idx: word);|3:var|13: i: integer;|5:begin|31: if Assigned(TL) then TL.Free;|20: ClassesList.Clear;|23: InterfacesList.Clear;|23: PropertiesList.Clear;|18: EnumsList.Clear;|21: FunctionList.Clear;|28: _hi_onEvent(onClasses,'');|31: _hi_onEvent(onInterfaces,'');|31: _hi_onEvent(onProperties,'');|26: _hi_onEvent(onEnums,'');|30: _hi_onEvent(onFunctions,'');|0:|42: TL := TTypeLibrary.Create(ToString(dt));|36: for i := 0 to TL.CoClassCount-1 do|42: ClassesList.Add(TL.CoClasses[i].Name);|4: |42: _hi_onEvent(onClasses,ClassesList.Text);|33: for i := 0 to TL.EnumCount-1 do|36: EnumsList.Add(TL.Enums[i].Name);|40: _hi_onEvent(onEnums,EnumsList.Text); |4:end;|0:|64:procedure THiAsmClass.doGetInterfaces(var dt: TData; idx: word);|3:var|13: i: integer;|5:begin|31: _hi_onEvent(onInterfaces,'');|23: InterfacesList.Clear;|29: ClassesID := ToInteger(dt);|59: for i := 0 to TL.CoClasses[ClassesID].InterfaceCount-1 do|67: InterfacesList.Add(TL.CoClasses[ClassesID].Interfaces[i].Name);|48: _hi_onEvent(onInterfaces,InterfacesList.Text);|4:end;|0:|64:procedure THiAsmClass.doGetProperties(var dt: TData; idx: word);|3:var|13: i: integer;|17: name,s: string;|16: t: TInterface;|5:begin|23: PropertiesList.Clear;|21: FunctionList.Clear;|31: _hi_onEvent(onProperties,'');|30: _hi_onEvent(onFunctions,'');|32: InterfacesID := ToInteger(dt);|64: name := TL.CoClasses[ClassesID].Interfaces[InterfacesID].Name;|2: |38: for i := 0 to TL.InterfaceCount-1 do|40: if TL.Interfaces[i].Name = name then|9: begin|28: t := TL.Interfaces[i];|12: Break;|10: end; |31: if not Assigned(t) then Exit;|2: |36: for i := 0 to t.PropertyCount-1 do|7: begin|36: if t.Properties[i].IsHidden then|35: _debug(t.Properties[i].Name);|67: if (t.Properties[i].CanRead) and (t.Properties[i].ID <> 0) then|52: FunctionList.Add('Get_'+t.Properties[i].Name);|7: |30: s := t.Properties[i].Name;|55: s := s + ': ' + t.Properties[i].Value.DataTypeName;|42: if PropertiesList.indexOf(s) = -1 then|28: PropertiesList.Add(s);|7: end; |49: _hi_onEvent(onProperties, PropertiesList.Text);|2: |36: for i := 0 to t.FunctionCount-1 do|7: begin|9: //if |29: s := t.Functions[i].Name;|26: //FunctionList.Add(s);|4: |6: end;|45: _hi_onEvent(onFunctions,FunctionList.Text);|4:end;|0:|4:end.|
link(onClasses,12059634:doText,[])
link(onInterfaces,10302181:doText,[(375,76)(375,118)])
link(onProperties,9834733:doText,[(362,83)(362,167)])
link(onEnums,12678222:doText,[(350,90)(350,216)])
link(onFunctions,4118586:doText,[(337,97)(337,265)])
}
Add(ODialog,1009433,119,63)
{
Filter="ocx|*.ocx|dll|*.dll"
Title="Open ActiveX"
NoChangeDir=1
link(onExecute,8313438:doText,[])
}
Add(Button,10501238,63,63)
{
Left=620
Top=25
Caption="Open"
link(onClick,1009433:doExecute,[])
}
Add(Edit,8313438,182,63)
{
Left=10
Top=25
Width=600
Ctl3D=1
Text=""
link(onChange,13096425:doGetActiveX,[])
}
Add(ListBox,12059634,392,42)
{
Left=10
Top=65
Width=120
Height=95
link(onClick,13096425:doGetInterfaces,[(429,55)(429,28)(256,28)(256,76)])
}
Add(Label,13851853,182,112)
{
Left=10
Top=5
Width=149
Height=17
Caption="Path ActiveX library (*.ocx,*.dll)"
}
Add(Label,9278937,189,119)
{
Left=10
Top=50
Width=53
Height=17
Caption="CoClasses"
}
Add(ListBox,10302181,392,91)
{
Left=140
Top=65
Width=120
Height=95
link(onClick,13096425:doGetProperties,[(441,104)(441,16)(243,16)(243,83)])
}
Add(Label,9638729,196,126)
{
Left=140
Top=50
Width=51
Height=17
Caption="Interfaces"
}
Add(ListBox,9834733,392,140)
{
Left=270
Top=65
Width=215
Height=95
}
Add(Label,10084264,203,133)
{
Left=270
Top=50
Width=43
Height=17
Caption="Property"
}
Add(ListBox,12678222,392,189)
{
Left=495
Top=65
Width=180
Height=95
}
Add(Label,1653437,210,140)
{
Left=495
Top=50
Width=36
Height=17
Caption="Enums"
}
Add(ListBox,4118586,392,238)
{
Left=10
Top=190
Width=665
Height=115
}
Add(Label,6549074,217,147)
{
Left=10
Top=175
Width=127
Height=17
Caption="Functions and procedures"
}