Here is a useful snippet for extracting a binary resource from a compiled resource in a exe or dll. I haven't really seen any thing demonstrates how to do this exactly. So hopefully this helps someone. Maybe next time I will post the code to extract into memory and execute a PE file.
In a few of the tools that I have written, I have needed to list the windows file system recursively. While .Net makes this much easier, all of the tools I write are in win32 C. Hopefully this will help someone else, as when I looked for information on this I did not find very much.
I seem to always need this skeleton code to build a window but I can never seem to memorize the whole thing.
I figured I would post it here to make it easier for me to find. The #programa comments are not cross platform
and only work on Microsoft based compilers, so watch out.
This is a tool I wrote for windows, that will list all of the drives currently mounted. I didn't know of a better way to show this information from the command line. This is using the windows api and is very straight forward, it should work on every version of windows.