티스토리 뷰
반응형
#include <Windows.h>
DWORD WINAPI DoStuff(LPVOID lpParameter)
{
// The new thread will start here
return 0;
}
int main()
{
// Create a new thread which will start at the DoStuff function
HANDLE hThread = CreateThread(
NULL, // Thread attributes
0, // Stack size (0 = use default)
DoStuff, // Thread start address
NULL, // Parameter to pass to the thread
0, // Creation flags
NULL); // Thread id
if (hThread == NULL)
{
// Thread creation failed.
// More details can be retrieved by calling GetLastError()
return 1;
}
// Wait for thread to finish execution
WaitForSingleObject(hThread, INFINITE);
// Thread handle must be closed when no longer needed
CloseHandle(hThread);
return 0;
}
반응형
'프로그래밍' 카테고리의 다른 글
python으로 http 요청 보내기 예제 (0) | 2023.01.20 |
---|---|
winapi CreateFile 예제 (0) | 2022.01.27 |
winapi 프로세스 생성, exit code 확인하기 (0) | 2022.01.27 |
스핀락을 사용하는 지원 루틴 호출 (0) | 2020.03.02 |
스핀 락 초기화 (0) | 2020.03.02 |
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- react
- Python
- JavaScript
- 내집마련
- Linux
- Java
- 카톡업데이트
- 오리역
- 부동산
- openai
- go
- MacOS
- SWiFT
- ios
- HTML
- 프로그래밍
- reactjs
- 부동산분석
- AI
- 개발자
- Backend
- 재테크
- Frontend
- Spring
- 카카오톡
- ChatGPT
- CSS
- WinAPI
- golang
- 생각
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함