01-17-2014, 03:53 PM
In this cases the memory is used only for the CHARFORMAT2W variable.
Windows knows EM_REPLACESEL and copies the string, don't need shared memory for it. Same with WM_SETTEXT, maybe with several other known messages. For other messages where text used need __ProcessMemory, allocate enough memory for the string.
Windows knows EM_REPLACESEL and copies the string, don't need shared memory for it. Same with WM_SETTEXT, maybe with several other known messages. For other messages where text used need __ProcessMemory, allocate enough memory for the string.