hash := THashedStringList.create;
hash.addobject('11',Tobject(Iapp));Iapp是Com的一个接口
app := Iapp(hash.objects[0]);这句出错是Incompatible types怎么转
hash.addobject('11',Tobject(Iapp));Iapp是Com的一个接口
app := Iapp(hash.objects[0]);这句出错是Incompatible types怎么转
调试欢乐多
TStoreInterfaceOject = class
public
InterfaceObj: IInterface;
end;var
storedInterfaceObj: TStoreInterfaceOject;
begin
storedInterfaceObj := TStoreInterfaceOject.Create;
storedInterfaceObj.InterfaceObj := app as IInterface; hash := THashedStringList.create;
hash.addobject('11',storedInterfaceObj);
app := TStoreInterfaceOject(hash.objects[0]).InterfaceObj as IApp;
end;