This VS2008 C++ project uses the STL and the Boost 1.35.0 library to produce a simple command line utility that takes the arguments of an icon file name, an executable file name, and optionally an integer in the range [1, 64K]. It then adds the icons in the icon file and adds them to the executable.
This project came about as I had to add an icon resource to a product of a build which utilises the Qt qmake build system. As far as I could determine, this system does not allow for the required flexibility in assigning icon resources and versioning resources for a WinXP build. I initially solved my problem using batch files to parse rc files as a pre-link activity but after a post resource compilation. I decided that it was not very elegant and resolved to create a utility, to be used post-link, in my own time.
Information to achieve this simple goal is not very plentiful and what does exist is not concise.
Points of Interest
The C++ code uses STL file streams for getting the data out of the file and the
boost::shared_array smart pointer for memory management.
Doxygen is used to provide the HTML documentation. Look for 'index.html' in the HTML bucket. It gives a nice way to explore the code.
I hope that this helps somebody!