>I need to replace first bytes in the file (FF D8) to (45 50)
>This is seems blank in my education ;)
>Can you study me next:
>
>1) How to check - is first byte is FF and second is D8. FGETS() ?lcByte1 = FREAD(lhFileIn,1)
IF ASC(lcByte1) = 0xFF
lcByte2 = FREAD(lhFileOut,2)
IF ASC(lcByte2) = 0xD8
...
>2) How to replace one byte to another in file and save it?Write out to another temp file using FREAD() and FWRITE() and than delete original and rename temp.
IF file is not big, you can use FILETOSTR() and STRTOFILE() to do all that in the memory.
--sb--