Re: How to find file size from pe32 header
- From: spamtrap@xxxxxxxxxx
- Date: 28 Dec 2005 22:56:12 -0800
Not exactly,
PE files cand have any kind of data attached to their end... aka after
the last section of the fille. This is called an "overlay". And many
p-code compilers use it for the real application code.
So the general answer is NO.
You still do need to know the file size from the filesystem.
Best regards,
Bogdan Ontanu
Ole Nielsby a scris:
> "be.geek" <spamtrap@xxxxxxxxxx> wrote:
>
> > This may not be the right forum (pls. point me if not)
> >
> > Is it possible to find the size of a pe32 file just from the header
> > information?
> >
> > This question is pertinent when the file is not on the disk but rather
> > embedded in a network flow, and I want to know where it begins and
> > where it ends.
>
> You need to walk the segment descriptors and find the last segment.
> The info you need is in a sdk header file, winnt.h or something like that.
.
- References:
- How to find file size from pe32 header
- From: be.geek
- Re: How to find file size from pe32 header
- From: Ole Nielsby
- How to find file size from pe32 header
- Prev by Date: Troubles with Tlink
- Next by Date: Re: Troubles with Tlink
- Previous by thread: Re: How to find file size from pe32 header
- Next by thread: Troubles with Tlink
- Index(es):