- Simple way to get exception code, error message and stack trace in the handler block for SEH exceptions (as well as unhandled C++ exceptions which cause them)
- Executing user-defined callback function on unhandled SEH exception
- Helper macros for converting Win32/COM errors into exceptions
- Configurable logging: can write diagnostic information into log file, stderr stream, Windows Event Log or other targets
- Multithreaded: all functionality can be used from different threads independently
- All string processing in Unicode (wide characters)
суббота, 1 сентября 2018 г.
суббота, 19 мая 2018 г.
Sometimes there's a need to create or parse HTML documents programmatically. Windows Forms framework in .NET has a nice HtmlDocument class for HTML manupulation. However, it can only work with documents from WebBrowser control, and there's no public constructor to create new HtmlDocument instance from scratch or from arbitrary HTML content. However, it can be done by accessing MSHTML COM interfaces directly and invoking private HtmlDocument constructor via reflection. I have implemented this approach in HtmlDocumentFactory library.
Download binaries: https://yadi.sk/d/lPk5bGov3WCXsD
The library consists of a single static class HtmlLib.HtmlDocumentFactory that provides helper methods for creating and destroying HTML documents and converting them to strings. Use CreateHtmlDocument method to create a new document, modify its content via HtmlDocument methods, use HtmlDocumentToString method to obtain whole HTML string, then call ReleaseHtmlDocument when you no longer need it.