The ArchivePageCount does not update until the file has been opened by the archive reader. However, it retrieves the page count from the archive file header information in the following manner. You can do something similar by putting the .raf file into a file stream...
uses ppTypes;
PageEntrySize := SizeOf(TppPageEntryRec);
ArchiveStream.Seek(0, soFromBeginning);
ArchiveStream.Read(HeaderSize, SizeOf(Longint));
FArchivePageCount := (HeaderSize - SizeOf(Longint)) div PageEntrySize;
Comments
The ArchivePageCount does not update until the file has been opened by the
archive reader. However, it retrieves the page count from the archive file
header information in the following manner. You can do something similar by
putting the .raf file into a file stream...
uses ppTypes;
PageEntrySize := SizeOf(TppPageEntryRec);
ArchiveStream.Seek(0, soFromBeginning);
ArchiveStream.Read(HeaderSize, SizeOf(Longint));
FArchivePageCount := (HeaderSize - SizeOf(Longint)) div PageEntrySize;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com