added initial stuff for overlapped IO and event handling