adaptions to win32