http://bugs.winehq.org/show_bug.cgi?id=4742
------- Additional Comments From wine_bugzilla@lez.ath.cx 2006-18-03 14:14 ------- The code from NoteXpad is based on this code, look in the about box ;)
The ansi/unicode case sounds like a sticky situation. The code is based on what Notepad.exe does internally when it loads a file, the author of NoteXpad was wondering how it did it so fast so I took a look.. since they're opaque handles that are locked when they're actually used, and just handles until then, realloc is of no consequence, especially when drawing is locked. (Which notepad does when it changes handles)
Feel free to email or catch me on winehackers if I can help.