Computer/C, CPP, MFC

ReadFile()

๊ฐ„๋‹จ์ •๋ฆฌ RedFile(ํŒŒ์ผํ•ธ๋“ค, ์ €์žฅ๋ฒ„ํผ ํฌ์ธํ„ฐ, ์ฝ์–ด์˜ค๋Š” ๋ฐ”์ดํŠธ์ˆ˜,์ถœ๋ ฅ์šฉ์ธ์ˆ˜, ๋น„๋™๊ธฐ์•„๋‹ˆ๋ฉด NULL) ReadFile() ํŒŒ์ผ์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์–ด์˜ด. ๋™๊ธฐ, ๋น„๋™๊ธฐ ๋ชจ๋‘ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•จ. ์›ํ˜• BOOL ReadFile( HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped ); - HANDLE hFile: ์ฝ๊ณ ์ž ํ•˜๋Š” ํŒŒ์ผ์˜ ํ•ธ๋“ค. ์ด ํŒŒ์ผ์€ GENERIC_READ ์•ก์„ธ์Šค ๊ถŒํ•œ์œผ๋กœ ์—ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. - LPVOID lpBuffer: ์ฝ์–ด ์˜ฌ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•  ๋ฒ„ํผ์˜ ํฌ์ธํ„ฐ ์ž…๋‹ˆ๋‹ค. - DWORD nNumberOfBytesToRead: ์‹ค์ œ ์ฝ์–ด์˜ค๋Š” ๋ฐ”์ดํŠธ ์ˆ˜๋ฅผ ์ง€..

ReadFile()

EIGHTBOX
EIGHTBOX
hwaya.

programmer

๐Ÿ‹์ผ์ƒ์˜ ์†Œ์†Œํ•œ ์ˆœ๊ฐ„๋“ค๋ถ€ํ„ฐ ํฐ ๊ฟˆ๊นŒ์ง€, ํ˜ธ๊ธฐ์‹ฌ์„ ๋งŒ์กฑ์‹œํ‚ฌ ๋‹ค์–‘ํ•œ ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ๋‹ด์€ ๋ธ”๋กœ๊ทธ ์ž…๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ , ์†Œ์†Œํ•œ ํ–‰๋™์— ๊ฐ๋™ํ•˜๋ฉฐ ๊ธฐ๋ปํ•˜๊ณ  ํ•˜๋ฃจํ•˜๋ฃจ์— ๊ฐ์‚ฌํ•˜๋Š” ์‚ฌ๋žŒ๐ŸŒต

Today Yesterday Total
์ตœ์‹ ๊ธ€