Beginning of Win32 implementation