The next two ads do not match, although they do look. They do not match the assignment , although both are based on an array of string .
type TStringArrayOne = array of string; TStringArrayTwo = array of string; var AVar1, AVar2: TStringArrayOne; AVar3, AVar4: TStringArrayTwo; begin AVar1 := TStringArrayOne.Create('a', 'b', 'c'); // Compiles AVar2 := TStringArrayTwo.Create('a', 'b', 'c'); // Won't compile AVar3 := TStringArrayTwo.Create('a', 'b', 'c'); // Compiles AVar4 := TStringArrayOne.Create('a', 'b', 'c'); // Won't compile end;
So TBytes and TIdBytes are not the same type, even if both are defined as array of Byte .
Regarding your question 2: This is a common problem with some third-party codes. Indy, in particular, is known for making changes that violate backward compatibility because they decide to reorganize or rewrite things between versions. Indy 10 was a major change from Indy 9, IIRC, and pretty much required rewriting most of the code that used it if you upgraded to a later version of Indy (even without updating Delphi at the same time). If you do not want to deal with these changes, you may need to use a more stable IP communications package. There are several available, which are also free open source packages.
source share