- 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 г.
ErrLib 1.0 released
суббота, 19 мая 2018 г.
HtmlDocumentFactory library - Working with HTML documents in .NET
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.
Source code: https://github.com/MSDN-WhiteKnight/HtmlDocumentFactory
Download binaries: https://yadi.sk/d/lPk5bGov3WCXsD
Usage
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.