There is a program on the vbAccelerator website called .NET Icon Explorer.
It shows how to read and write icons to a disk or from a resource within an
executable or DLL. It also has a batch extractor utility that will extract
icons from all resources within a given directory.
Use the link below and then click on the download link in the upper left
hand corner to download the source as a zip file or to view individual
files. The code actually appears to be in C#, but maybe this will at least
give you some ideas....