Platform/File(장치 IO)
Windows
jjryu
2010. 11. 15. 00:14
CreateFile()
GENERIC_READ
GENERIC_WRITE
FILE_SHARE_READ
FILE_SHARE_WRITE
CREATE_NEW
CREATE_ALWAYS
OPEN_EXISTING
TRUNCATE_EXISTING
GENERIC_WRITE
OPEN_ALWAYS
CREATE_NEW
FILE_FLAG_OVERLAPPED
CloseHandle()
GetStdHandle()
ReadFile()
WriteFile()
The function starts writing data to the file at the position indicated by the file pointer. After the write operation has been completed, the file pointer is adjusted by the number of bytes actually written, except when the file is opened with FILE_FLAG_OVERLAPPED. If the file handle was created for overlapped input and output (I/O), the application must adjust the position of the file pointer after the write operation is finished.
nNumberOfBytesToWrite
Number of bytes to write to the file.
A value of zero specifies a null write operation. A null write operation does not write any bytes but does cause the time stamp to change.
c.f. SetEndOfFile()
Named pipe write operations across a network are limited to 65,535 bytes.
표준 출력?
GetLastError()
ERROR_NOT_ENOUGH_MEMORY?
SetEndOfFile()
비동기(중첩된 입출력)
참조 사이트:
GENERIC_READ
GENERIC_WRITE
FILE_SHARE_READ
FILE_SHARE_WRITE
CREATE_NEW
CREATE_ALWAYS
OPEN_EXISTING
TRUNCATE_EXISTING
GENERIC_WRITE
OPEN_ALWAYS
CREATE_NEW
FILE_FLAG_OVERLAPPED
CloseHandle()
GetStdHandle()
ReadFile()
WriteFile()
The function starts writing data to the file at the position indicated by the file pointer. After the write operation has been completed, the file pointer is adjusted by the number of bytes actually written, except when the file is opened with FILE_FLAG_OVERLAPPED. If the file handle was created for overlapped input and output (I/O), the application must adjust the position of the file pointer after the write operation is finished.
nNumberOfBytesToWrite
Number of bytes to write to the file.
A value of zero specifies a null write operation. A null write operation does not write any bytes but does cause the time stamp to change.
c.f. SetEndOfFile()
Named pipe write operations across a network are limited to 65,535 bytes.
표준 출력?
GetLastError()
ERROR_NOT_ENOUGH_MEMORY?
SetEndOfFile()
비동기(중첩된 입출력)
쓰레드
중첩 입출력
확장 입출력
입출력 완료 포트
중첩 입출력
확장 입출력
입출력 완료 포트
참조 사이트: