Win32 event handling added, plus error class