// Created: 29/01/98
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/*
break;
}
+#ifdef __WINDOWS__
+ // only read/write bits for "all" are supported by this function under
+ // Windows, and VC++ 8 returns EINVAL if any other bits are used in
+ // accessMode, so clear them as they have at best no effect anyhow
+ accessMode &= wxS_IRUSR | wxS_IWUSR;
+#endif // __WINDOWS__
+
int fd = wxOpen( szFileName, flags ACCESS(accessMode));
#endif
if ( fd == -1 )
wxCHECK( (pBuf != NULL) && IsOpened(), 0 );
#ifdef __WXWINCE__
- DWORD bytesRead = 0;
+ DWORD bytesWritten = 0;
int iRc = 0;
- if (WriteFile((HANDLE) m_fd, pBuf, (DWORD) nCount, & bytesRead, NULL))
- iRc = bytesRead;
+ if (WriteFile((HANDLE) m_fd, pBuf, (DWORD) nCount, & bytesWritten, NULL))
+ iRc = bytesWritten;
else
iRc = -1;
#elif defined(__MWERKS__)