I also got the Write line wrong (I did mention that I haven't used VB6 for many years) it supposed to be:
Code:
Put #iFile,  , bTheByteArrayReturnedFromTheFunction