.


:




:

































 

 

 

 





BOOL WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped)

: TRUE, FALSE.

. , , , CreateFile FILE_FLAG_WRITE_THROUGH. , Windows .

ReadFileGather WriteFileGather .

UNIX read write, , . . read 0 , 1 . Windows , .

, , , .

read fwrite, / , , UNIX Windows, . , ; feof ferror. , , fgets fputs, .

: Unicode

, , Windows 8-, 16- . , .

Windows 8- ( char CHAR) ( Windows 9x) 16- ( WCHAR, wchar_t). Microsoft 8- ASCII, Latin-1, "ASCII" . Windows Unicode UTF-16 Unicode , , , , , , , .

, (generic) Windows-, , Unicode (UTF-16, , , UCS-4), 8- ASCII-.

1. TCHAR, LPTSTR LPCTSTR.

2. Unicode (wchar_t ANSI ), #define UNICODE #define _UNICODE; , TCHAR CHAR (char ANSI ). #include <windows.h>, . Windows, .

3. , , , ReadFile, sizeof(TCHAR).

4. / , <tchar.h>. , _fgettc, _itot ( itoa), _stprintf ( sprintf), _tstcpy ( strcpy), _ttoi, _totupper, _totlower _tprintf.[12] . _UNICODE. . , , , memchr. .

5. . . ANSI , _ ( TEXT _) Microsoft .

" 8- "

L"B 16- "

_(" ")

6. , <tchar.h>, <windows.h>.

16- Unicode ( UTF-16) Windows ; NTFS Unicode. _UNICODE, Windows , ; 8- . , Windows 9x, Unicode-, UNICODE _UNICODE . NT , Windows 9x.

char TCHAR, - 8- . , LPTSTR , LPCTSTR . , , , Unicode, 8- , Unicode, . , , , , .

, , TCHAR , UNICODE _UNICODE. :

#ifdef UNICODE

#define TCHAR WCHAR

#else

#define TCHAR CHAR

#endif





:


: 2015-09-20; !; : 456 |


:

:

, , .
==> ...

1335 - | 1256 -


© 2015-2024 lektsii.org - -

: 0.011 .