- /* Align on WORD boundary for the strings */
- template_data = align_pointer(template_data, 2);
I don't see how it could be not aligned to WORD, could you explain?
I wasn't sure about the alignment of LocalAlloc, so I added that check. Does it guarantee an aligned pointer?
GlobalAlloc() is documented to align at 8 bytes, and in practice HeapAlloc() does the same I think.
I see, thanks. Then I'll remove that align_pointer call.
I'll improve the other things you mentioned, too.
Regards Fabian Maurer