суббота, 1 сентября 2018 г.

ErrLib 1.0 released

ErrLib is a library to assist in dealing with exceptions and errors in C/C++ Windows Applications

Author: MSDN.WhiteKnight
License: BSD 3-clause
Requirements: Windows Vista (or newer), Visual Studio 2010 (or newer)

  • 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)

Download binaries: https://yadi.sk/d/jNEO7HJV3akod5

Source code: https://github.com/MSDN-WhiteKnight/ErrLib

суббота, 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


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.