(StdVcl.)IStrings 是由 TStringsAdapter实现的.关键你说的太笼统.搞不清你的问题所在
至少要有出错的地方附近的代码吧
procedure GetOleStrings(Strings: TStrings;
var OleStrings: IStrings);
begin
OleStrings := nil;
if Strings = nil then
Exit;
if Strings.StringsAdapter = nil then
Strings.StringsAdapter := TStringsAdapter.Create(Strings);
OleStrings := Strings.StringsAdapter as IStrings;
end;
procedure SetOleStrings(Strings: TStrings;
OleStrings: IStrings);
var
I: Integer;
begin
if Strings = nil then
Exit;
Strings.begin
Update;
try
Strings.Clear;
for I := 0 to OleStrings.Count-1do
Strings.Add(OleStrings.Item);
finally
Strings.EndUpdate;
end;
end;