Welcome, Guest. Please login or register.

Author Topic: Retrieving FileSize in bytes  (Read 2995 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Retrieving FileSize in bytes
« on: January 12, 2004, 02:55:16 PM »
Quote

if (fib = AllocDosObjectTags(DOS_FILEHANDLE, ADO_FH_Mode))
{if (Examine(, fib))
{fib_Size>;
}
FreeDosObject(DOS_FILEHANDLE, fib);
}


This is completely wrong.

You must alloc FileInfoBlock structure, not filehandle structure! In
addition your taglist is not terminated with TAG_DONE and ADO_FH_MODE
misses tag value.

Allocate DOS_FIB packet and supply an empty taglist (TAG_DONE only)..
My Amigas: A500, Mac Mini and PowerBook
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Retrieving FileSize in bytes
« Reply #1 on: January 12, 2004, 09:29:53 PM »
Quote

if ((struct FileInfoBlock *)fib = AllocDosObject(DOS_FIB, TAG_END))


Why you have "(struct FileInfoBlock *)fib" there?
My Amigas: A500, Mac Mini and PowerBook