Need to use WriteFile not write on Win32.