File content functions give "Unable to cast" crash

Discussion in 'Bug Reports' started by mjcoon, Nov 10, 2012.

  1. mjcoon

    mjcoon Well-Known Member Licensed User

    I have modified an old program of mine which has always had (successful!) file handling operations.

    The new file is opened, just like the others, via:
    Code:
    FileOpen(fileTime, AppPath & "\filedTime.txt", cWrite, cAppend, cASCII)
    But now I am using FileReadToEnd() and FilePut() which I have not used before.

    When I execute either one of these, either within IDE or compiled, I get "Unable to cast" fail messages such as the one attached.

    What's wrong?

    Mike.
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    FilePut can only work when you open the file in random mode.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice