loading
๋ฐ”๋กœ๋ณด๊ธฐ
Computer/C, CPP, MFC

CRegKey/SetValue ๋ฐ”๊พธ์ž

๋””์ž์ธ๋ณ€ํ™˜ ํ”„๋กœ๊ทธ๋žจ์„ ๋งŒ๋“ค์ผ์ด ์žˆ์–ด์„œ ์˜ค๋žœ๋งŒ์— C++๋ฅผ ๋งŒ์ง€์ž‘ ๋งŒ์ง€์ž‘ ํ•˜๋˜ ์ค‘, ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์— ์ €์žฅ๋œ ๊ฐ’์„ ๋ถˆ๋Ÿฌ์˜ค๊ณ , ์ €์žฅํ•  ์ผ์ด ์ƒ๊ฒผ๋‹ค. ๊ทธ๋ž˜์„œ ์ƒ๊ฐ์—†์ด, ์˜ˆ์ „์— ๋งŽ์ด ์‚ฌ์šฉํ•˜๋˜ ๊ทธ๋•Œ ๊ทธ ์ฝ”๋“œ๋กœ ์‚ฌ์šฉํ–ˆ๋‹ค. ์ €์žฅํ• ๋•Œ, SetValue๋ฅผ... CRegKey RegKey; RegKey.Create(HKEY_CURRENT_USER, "๋ธ”๋ผ๋ธ”๋ผ"); RegKey.SetValue(nConversionEnabled, "์ด๊ฑฐ๋ธ”๋ผ๋ธ”๋ผ"); RegKey.Close(); ๊ทธ๋ฆฌ๊ณ  ๋นŒ๋“œ. ๋นŒ๋“œ. ๋นŒ๋“œ... ์œผ์›€? ์™œ!!!!!!!! C4996์ด ๋œจ๋ƒ๊ณ !!!!! ๊ทธ๋žฌ๋‹ค. ๋˜, ๋ฌด์–ธ์ธ๊ฐ€ ๊ณ ์ „ํ‹ฑํ•œ ๊ณ ์ „๊ณ ์ „์˜ ๋Š๋‚Œ์ด๋ผ ์ทจ์•ฝ์ ์ด ์žˆ๊ฒ ์ง€. ์˜ค๋ฒ„ํ”Œ๋กœ์šฐ๊ฐ€ ์ƒ๊ธธ์ˆ˜ ์žˆ์„๋ ค๋‚˜... ๋ฐ”๋กœ ๊ฒ€์ƒ‰! ๋šœ๋šฑ! ํ•ด๋‹นํ•จ์ˆ˜๋Š” QueryValueEx , Setval..
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: ์‹ค์ œ ์ฝ์–ด์˜ค๋Š” ๋ฐ”์ดํŠธ ์ˆ˜๋ฅผ ์ง€..
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/ETC

Thread(์Šค๋ ˆ๋“œ)

๋ฉ”์ธ์Šค๋ ˆ๋“œ ์™ธ์— ๋‹ค๋ฅธ ์Šค๋ ˆ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋น„๋™๊ธฐ๋กœ ๋™์ž‘ํ•  ํ•„์š”์„ฑ์„ ๋Š๋ผ๊ฒŒ๋œ๋‹ค.์ด๋Ÿด๋•Œ ์Šค๋ ˆ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ๊ฐ ๋…๋ฆฝ์ ์ธ ๋™์ž‘์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.์Šค๋ ˆ๋“œ๋ฅผ ๋ถ„๋ฆฌํ•˜์ง€ ์•Š๊ณ  ๋ฉ”์ธ์Šค๋ ˆ๋“œ๋กœ๋งŒ ์ด์šฉํ•œ๋‹ค๋ฉด ๋‹ค๋Ÿ‰์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์—ฐ์‚ฐ, ๊ด€๋ฆฌํ•˜๋Š” ๋ถ€๋ถ„์—์„œ ๋™์ž‘์„ ์‹คํ–‰์ค‘์ด๊ธฐ ๋•Œ๋ฌธ์— ๋‹ค๋ฅธ๊ฒƒ๋“ค์€ ํ•˜์ง€ ๋ชปํ•˜๊ณ  ๊ทธ ๋™์ž‘์ด ๋๋‚ ๋•Œ ๊นŒ์ง€ ๊ธฐ๋‹ค๋ ค์•ผํ•œ๋‹ค. ์Šค๋ ˆ๋“œ๋Š” ๋ฉ”์ธ์Šค๋ ˆ๋“œ์™€ ๋…๋ฆฝ๋œ ๋™์ž‘์ด๊ธฐ ๋•Œ๋ฌธ์— ๋ฉค๋ฒ„๋ณ€์ˆ˜๋‚˜ ํ•ด๋‹นํด๋ž˜์Šค์˜ ๊ฐ์ฒด๋ฅผ ์ด์šฉํ•ด์„œ ์ ‘๊ทผํ•ด์•ผํ•œ๋‹ค.์Šค๋ ˆ๋“œ ํ•จ์ˆ˜ ์•ˆ์—์„œ ํ•ด๋‹นํด๋ž˜์Šค์˜ ๋ณ€์ˆ˜๋‚˜ ํ•จ์ˆ˜๋กœ ๋ฐ”๋กœ ์ ‘๊ทผํ•  ์ˆ˜ ์—†๋‹ค. .h ํ—ค๋”//ํƒ€์ž…์€ UINT๋ฅผ ํ•ด์•ผ ํ•˜๊ณ  ๋งค๊ฐœ๋ณ€์ˆ˜ lParam์„ ๋„˜๊ฒจ ์ฃผ์–ด์•ผ ํ•œ๋‹คstatic UINT ThreadProc(void *lParam); .cpp ๊ตฌํ˜„AfxBeginThread(ThreadProc, this); nNum1..
EIGHTBOX
EIGHTBOX
hwaya.

programmer

๐ŸŒต๋‚˜๋ˆ„๊ณ  ์‹ถ์€ ์ด์•ผ๊ธฐ์™€ ์ƒํ™œ์ •๋ณด : ์†Œ์†Œํ•œ ํ–‰๋™์— ๊ฐ๋™ํ•˜๋ฉฐ ๊ธฐ๋ปํ•˜๊ณ  ํ•˜๋ฃจํ•˜๋ฃจ์— ๊ฐ์‚ฌํ•˜๋Š” ์‚ฌ๋žŒ

Today0 Yesterday113 Total270,972
์ตœ์‹ ๊ธ€
STORY/์ƒํ™œ์ •๋ณด
2023 ์ œ42ํšŒ ๋Œ€๊ตฌ๊ตญ์ œ์Œ์•…์ œ
2023.05.13 23:24