procedure TForm1.btnClick(Sender: PObj);
var
i, l : integer;
P : PNetResource;
S : String;
begin
for i := 0 to 19 do
begin
P := PNetResource(lv1.LVItemData[i]);
S := P.lpLocalName;
l := lv2.LVItemAdd(S);
end;
end;
procedure TForm1.KOLForm1FormCreate(Sender: PObj);
var
i, l : integer;
P : PNetResource;
S : String;
begin
lv1.LVColAdd('', taCenter, 179);
lv2.LVColAdd('', taCenter, 179);
for i := 0 to 19 do
begin
GetMem(P, SizeOf(TNetResource));
S := 'Test line: ' + kol.Int2Digs(i, 2);
l := lv1.LVItemAdd(S);
P.lpLocalName := AllocMem(Length(S) + 1);
Move(Pointer(S)^, P.lpLocalName^, Length(S));
lv1.LVItemData[l] := DWORD(P);
end;
end;