It's been some time since I've meddled with DLLs, and it is possible that the file format has been extended significantly. But it should still be documented on MSDN. Try to look for
Portable Executable File Format, there is
a page on MSDN and some other Google hits.
The PE/COFF format consists of blocks and it should be possible to traverse and process them. It's gonna be a messy stuff, though. Some inspiration could probably be gleaned from Wine, which naturally deals with Windows executables.
I believe there are no significant differences in the format between 16/32/64 bit versions of the DLLs, but I'm not sure.