Announcement

Collapse
No announcement yet.

File Handle

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File Handle

    Can somebody tell exactly what a "file handle" is and how it is
    extracted? If I have the following code:

    y = freefile
    open "somefile.txt" for binary as y
    ...
    ...
    close #1

    Now I know that (y) is not the DOS handle of the file but I need
    to know how it is determined so I can use some interrupt 21 calls.
    I have looked all over the place but can't seem to find it.

    Thanks.




    ------------------
    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.

  • #2
    Have you looked under FILEATTR Function, it says File Number is
    the handle of a currently open file.

    FILEATTR(FileNumber%, 2) returns a file's dos handle.

    ------------------


    [This message has been edited by Jerry Fielden (edited February 19, 2002).]

    Comment


    • #3
      Make sure that "close #1" is actually "close #y".

      ------------------
      Tom Hanlin
      PowerBASIC Staff

      Comment


      • #4
        Jerry, I never even saw that in the documentation. Thanks.

        Tom, old habits die hard. Oops.


        ------------------
        There are no atheists in a fox hole or the morning of a math test.
        If my flag offends you, I'll help you pack.

        Comment

        Working...
        X