nsRichEdit plug-in
* Load a file into a rich edit control (using EM_STREAMIN).
* Provides formatted printing of a rich edit control.
* Allows oneself to add a print button to the NSIS license pages.
http://nsis.sourceforge.net/File:NsRichEdit.zip
Note to JasonFriday13 for CustomLicense plug-in: There are a number of errors in your code (which is one reason why I added my own function to this plug-in).
29: Should be TCHAR* FileName.
42: !FileHandle is not a valid test for an invalid handle (only use INVALID_HANDLE_VALUE).
46, 56, 60: You're not closing the file handle.
87, 88: The amount of memory to allocate should be sizeof(TCHAR) * string_size (because Unicode characters are 2 bytes).
105: You are casting the return value from GetLastError to (const TCHAR*) and pushing it onto the stack. This will (in most cases) cause a crash. To convert an integer to a string, use wsprintf. Besides, I'm not sure why you are using GetLastError because GlobalAlloc does not set it.
I'd recommend using EM_STREAMIN too as right now you are reading the entire license file into memory before setting it.
Stu