CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    May 2001
    Posts
    472

    Windows exe Format Specification

    Where can I find a comprehensive specification of the latest Windows executable file format?
    Ce n'est que pour vous dire ce que je vous dis.

  2. #2
    Join Date
    Apr 2000
    Location
    Frederick, Maryland
    Posts
    507
    Visit

    www.wotsit.org

    It has almost all file format.

    Hope it helps.

  3. #3
    Join Date
    May 2001
    Posts
    472
    I have already visited that site and read all the exe specifications they had. All of them are very outdated ranging from MS-DOS to Win9x.
    Ce n'est que pour vous dire ce que je vous dis.

  4. #4
    Join Date
    Mar 2002
    Location
    Israel
    Posts
    187
    Hi Alexey,

    here:
    http://www.microsoft.com/hwdev/hardware/PECOFF.asp

    You can download spec for portable executable.

    here:

    http://www.windowsitlibrary.com/Docu...DocumentID=356

    You find nice expanation about the format


    Good luck with RVAs

  5. #5
    Join Date
    Jun 2002
    Posts
    395
    If you are going to be munging around on exe's directly, try to get some Borland exe's to test your code with. The Borland linker does things a little differently in some areas of the exe, import tables for example.

  6. #6
    Join Date
    May 2002
    Location
    Somewhere over the rainbow
    Posts
    423
    Latest EXE?? )
    well than, read about the PE header
    here:
    http://www1.lunarpages.com/codeinside/PETut.html
    Bengi

  7. #7
    Join Date
    May 2001
    Posts
    472

    Thanks

    Thank you very much Alexis. The two links provided me with all the information I needed. My luck with RVAs has held as well.

    To help myself learn the format well, I have created a small application that parses header, import, export and resource information in an executable or a DLL and displays it in form of a tree, in a readable format. The application is attached to this message in case anyone is interested.
    Attached Files Attached Files
    Last edited by Alexey B; August 1st, 2002 at 05:59 PM.
    Ce n'est que pour vous dire ce que je vous dis.

  8. #8
    Join Date
    Jun 2002
    Posts
    395
    What, no source code???

    Very nice app! Generally, though, I find it much more useful to have the imported functions (the PIMAGE_THUNK_DATA in your tree) attached to the import lib descriptor, that way you can tell what functions are used out of each library.

    If you have access to any Borland apps, try one of those, the Borland linker plays fast and loose with the PE spec.

  9. #9
    Join Date
    May 2001
    Posts
    472
    I'll post the source too, but first I want to write my own RVA to VA conversion function to loose the dependency on imagehlp.dll. By the way, double-clicking an item that is a reference will automatically select the item that the reference points to. An example would be the OriginalFirstThunk member of an IMAGE_IMPORT_DESCRIPTOR structure.
    Ce n'est que pour vous dire ce que je vous dis.

  10. #10
    Join Date
    Mar 2002
    Location
    Israel
    Posts
    187
    Hi Alexey,

    You are always wellcome.

    Originally posted by wayside
    Generally, though, I find it much more useful to have the imported functions (the PIMAGE_THUNK_DATA
    Order, Pay, Have

  11. #11
    Join Date
    Aug 2001
    Posts
    260
    Hello everyone,
    I downloaded FileView application. The app asked me double lick to view a file, and I followed it,then there was a alert appered : "FileViewer.exe has generated errors and will be closed by Windows.You will need to restart the application.".
    Does anyone can know why?
    By the way, please send me source code if you can. I need it urgently.

    thank you.

  12. #12
    Join Date
    Aug 2001
    Posts
    260
    Hello everyone,
    Is there anyone can post the source code of FileViewer?

    Thanks.
    vanta.

  13. #13
    Join Date
    Oct 2014
    Posts
    3

    Re: Windows exe Format Specification

    I don't have FileViewer, though I have a resource that might help

    HexEdit Pro 4.0 - 4Shared Backup Download (Andrew seems to have lost his site)
    WARNING: Don't use 4Priority Downloader! (Create an account to download with no adware)

    HexEdit Pro comes with a template to view the structure of EXE (including CLI supported) files.
    it only goes as far as outlining the sections (it doesn't operate on the data)

    I'm not sure if this works properly with recent EXEs, but it can be tested.

  14. #14
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: Windows exe Format Specification

    Quote Originally Posted by Alexey B View Post
    I have already visited that site and read all the exe specifications they had. All of them are very outdated ranging from MS-DOS to Win9x.
    well... the format hasn't really changed since Windows95.

    If you're talking about how the compiler/linker actually make things work, that's an entirely different.
    In that case you're asking "can someone give me the latest cooking book", but every cook will give you a different recipe for how to make certain dishes.
    there's no "new" in this case, every compiler/linker does it their own way, and it even changes with compiler/linker versions within the same brand.

  15. #15
    Join Date
    Jun 2009
    Location
    France
    Posts
    2,513

    Re: Windows exe Format Specification

    That thread was 12 years old.

    The account was created specifically for that single post... Which contains a link to a .exe on a file sharing website...

    Speaking of which, isn't giving links to pirate software a violation of TOS?

    I don't know if it's an honest post (as it *is* on subject), or a very elaborate try at getting you to download malware.
    Is your question related to IO?
    Read this C++ FAQ article at parashift by Marshall Cline. In particular points 1-6.
    It will explain how to correctly deal with IO, how to validate input, and why you shouldn't count on "while(!in.eof())". And it always makes for excellent reading.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured