Portable executable structure explanation - windows

I am learning the structure of a portable executable. I went through the MSDN article but I am a bit confused about it. I have some confusion with their precise stucture and its functionality.
Can anybody help me or please refer me to a nice article for this?

For a more discursive approach than official specs, you should have a look at Matt Pietrek 1994 article Peering inside the PE: A tour of the Win32 Portable Executable File Format. The explanation is more readable than the dry, official style of the specs.

This is the official current PE/COFF spec from MSFT: http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx

You should take a look to the excellent representation of the PE Format at http://www.openrce.org/reference_library/files/reference/PE%20Format.pdf.
Some (64Bits) fields are missing, but it is up to 99% close to the reality.
I used this schema to work on a product to analyze PE Files, which you can be download at www.winitor.com. Hope it helps.

Related

How do you convert an OpenAPI Spec (Swagger 2.0) to proto3?

I've done extensive Google searching but couldn't find a good tool to do this. The closest I could find was https://github.com/googleapis/gnostic, which allows converting an OpenAPI description (swagger.yaml) into a .pb file or a .json file. I'm wondering if there are any tools to convert this .pb file into a .proto proto3 file?
I also tried https://github.com/NYTimes/openapi2proto but unfortunately there are a few cases that aren't handled correctly.
Thanks in advance for your help!
I know this question is old, but I was wandering the same and it seems that things have changed in meantime. So I will post an answer for others, lazy enough to search :)
Currently there are several options to convert OpenApi 2/3 to Protobuf:
OpenAPITools/openapi-generator supports this from version 4.1.2, find more here.
googleapis/gnostic can do this as well, find more here.
nytimes/openapi2proto a tool written in go for this, find more here.
maybe some more...? add if i missed any.

boost threadpool - documentation and examples

I'm looking for documentation on boost::threadpool. I downloaded the source and documentation zip files. The documentation directory is just about empty. It says to look at src/examples/mergesort.cpp. It ain't there. In fact, there is no src/examples directory.
Anyone know if there is a Roseta Stone, and if so where?
In the Boost Vault - Concurrent Programming there are a couple of libs, check async and boost.task. The documentation is included in the packages. Personally, I have used async and was pleased. Make sure you find the docs, there ARE there in the dir tree. afaik there are no more docs for threadpool.sourceforge.net

How can I create Xcode docsets that look and work like the ones in Apple Core Library

I want to create a docset for my API that looks and works like the Apple Core Library docset. For example, look at the page for NSString.
I've tried Doxygen and I've tried headerdoc2html. Neither does very close to what I want.
The files generated by headerdoc don't have most of the higher-level structure that the Apple files do, and the graphics design is different. Down at the more detailed level, like when looking at a specific method, things are closer, but don't have all the detailed structure.
The files generated by Doxygen have a very different high-level structure, not to mention having a very different graphic design.
What else should I try? Or are there parameters to either of these tools that would give me something closer?
Thanks, Pat
The best I have found so far is Tomaz's appledoc. With it I can create apple style api documentation and instal it directly into the DocSets that Xcode is uisng. Works very well and is based on doxygen.
You can use Doxygen to generate Xcode docsets.
Unfortunatelly, the Doxygen output looking and behaving like an Apple Developer Library Document is still to be discovered...
I'm also really interested in this :( Ive been able to generate docsets and doxygen docs but if I could make them look the same (or approaching) as the "normal" apple docs (like SDK ones), that would be better. :/

how do you make a makefile

I would like to know how to makefile for Unix.
Here's a good Makefile Tutorial (first result on Google after searching "how to create a makefile").
Because (g)make has many non-intuitive aspects, e.g. its backward chaining, I'd highly recommend having a look at Robert Mecklenburg's book Managing Projects with GNU Make.
Or even better is Andrew Talbot's Managing Projects with Make (second edition), which I feel has the better introduction to make. (IMHO naturally).
http://www.opussoftware.com/tutorial/TutMakefile.htm
Run make. ;)
Though you'd be better served by reading the make documentation. Do this by typing 'man make' from the command line. It should be enough to get you started and confused, at which point a Google search will help a lot.
The Gnu make manual would be a good place to look.
I have compiled some notes here: http://ustunozgur.blogspot.com/2008/04/sample-makefile.html
can check out documentation on automake (which most unix-y projects use) as well

.Net XML comment into API Documentation

Is there an easy way to produce MSDN-style documentation from the Visual Studio XML output?
I'm not patient enough to set up a good xslt for it because I know I'm not the first person to cross this bridge.
Also, I tried setting up sandcastle recently, but it really made my eyes cross. Either I was missing something important in the process or it is just way too involved.
I know somebody out there has a really nice dead-simple solution.
I'm reiterating here because I think my formatting made that paragraph non-inviting to read:
I gave sandcastle a try but had a really hard time getting it set up.
What I really have in mind is something much simpler.
That is, unless I just don't understand the sandcastle process. It seemed like an awful lot of extra baggage to me just to produce something nice for the testers to work with.
You're looking for Sandcastle
Project Page: Sandcastle Releases
Blog: Sandcastle Blog
NDoc Code Documentation Generator for .NET used to be the tool of choice, but support has all but stopped.
Have a look at Sandcastle, which does exactly that. It's also one of the more simpler solutions out there, and it's more or less the tool of choice, so in the long run, maybe we could help you to set up Sandcastle if you specify what issues you encountered during setup?
You should also use the Sandcastle Help File Builder. It provides you with a ndoc like GUI for generating help files so you don't have to do anything from a command prompt.
Welcome to the Sandcastle Help File Builder Project
I've just set up Sandcastle again. Try installing it (the May 2008 release) and search for SandcastleGui.exe or something similar (it's in the examples folder or so).
Click Add Assembly and add your Assembly or Assemblies, add any .xml Documentation files (the ones generated by the compiler if you enabled that option) and then Build.
It will take some time, but the result will be worth the effort. It will actually look up stuff from MSDN, so your resulting documentation will also have the Class Inheritance all the way down to System.Object with links to MSDN and stuff.
Sandcastle seems a bit complicated at first, especially when you want to use it in an automated build, but I am absolutely sure it will be worth the effort.
Also have a look at Sandcastle Help File Builder, this is a somewhat more advanced GUI for it.
Follow this simple 5 step article and you are pretty much done. As a bonus you can use H2Viewer to view Html Help 2.x files.
I use NDoc3

Resources