The problem that you encounter is that you have defined your own byte array type like this: type TBuff = array ...
stackoverflow.com