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()

Computer/C, CPP, MFC

SetFilePointer()

๊ฐ„๋‹จ์ •๋ณดSetFilePointer(๋Œ€์ƒ ํŒŒ์ผ์˜ ํ•ธ๋“ค, ์˜ฎ๊ธธ ์œ„์น˜, NULL, ์‹œ์ž‘์œ„์น˜)ํŒŒ์ผ์„ ์ฒ˜์Œ ์—ด์—ˆ์„๋•Œ, ํฌ์ธํ„ฐ์˜ ์œ„์น˜๋Š” ํŒŒ์ผ์˜ ์ฒ˜์Œ, IO ์ฒ˜๋ฆฌ์— ๋”ฐ๋ผ ํŒŒ์ผํฌ์ธํ„ฐ๊ฐ€ ์ž๋™์œผ๋กœ ์ด๋™. SetFilePointer()ํŒŒ์ผ ํฌ์ธํ„ฐ๋ฅผ ์›ํ•˜๋Š” ์œ„์น˜๋กœ ์˜ฎ๊ธธ๋•Œ ์‚ฌ์šฉ.32๋น„ํŠธ์™€ 64๋น„ํŠธ๋ฅผ ๋™์‹œ์— ์ง€์›ํ•˜๊ธฐ ์œ„ํ•ด 2๋ฒˆ์งธ ์ธ์ˆ˜์™€ 3๋ฒˆ์งธ ์ธ์ˆ˜๋ฅผ ํ†ตํ•ด ๊ฐ 4๋ฐ”์ดํŠธ์”ฉ 64๋น„ํŠธ, ์˜คํ”„์…‹์„ ์ „๋‹ฌํ• ์ˆ˜ ์žˆ๋‹ค.SetFilePointerEx ๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๊ฒƒ์ด ์ข‹๋‹ค. ์›ํ˜•DWORD SetFilePointer( HANDLE hFile, LONG IDistanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod); - HANDLE hFile: ํŒŒ์ผํฌ์ธํ„ฐ๋ฅผ ์˜ฎ๊ธฐ๊ณ ์ž ํ•˜๋Š” ๋Œ€์ƒ ํŒŒ์ผ์˜ ํ•ธ๋“ค. - LO..
Computer/C, CPP, MFC

ํ•˜์œ„ํด๋”๊นŒ์ง€ ์ „์ฒด ๋ณต์‚ฌํ•˜๊ธฐ

BOOL ---------------::XCopy(char *Src, char *Dest, int my94) { HANDLE hSrch; WIN32_FIND_DATA wfd; BOOL bResult = TRUE; char fname[MAX_PATH]; char WildCard[MAX_PATH];// ์›๋ณธ char HoneyCard[MAX_PATH];// ์‚ฌ๋ณธ char SrcFile[MAX_PATH]; char DestFile[MAX_PATH]; strcpy_s(WildCard, Src); strcat_s(WildCard, "\*.*"); strcpy_s(HoneyCard, Dest); // ํด๋”์œ„์น˜ if (my94 == 0) // ์žฌ๊ท€ { } else if (my94 == 1) // EZ-Raschel ..
EIGHTBOX
EIGHTBOX
hwaya.

programmer

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

Today Yesterday Total
์ตœ์‹ ๊ธ€