Colin Wilson has written code that lets you read pe-files into memory, modify/add resources and write them back to disk. I'm not sure if it lets you create a pe-file from scratch though.

http://www.wilsonc.demon.co.uk/d9resourceutils.htm