thread alertable state and APC
#define _WIN32_WINNT 0x400 #include #include #include VOID CALLBACK APCProc(ULONG_PTR dwParam) { printf("APCProc callback\n"); } unsigned int _stdcall ThreadProc(LPVOID pParam) { printf("wait 2 seconds in child thread\n"); Sleep(2*1000); HANDLE hThread = (HANDLE)pParam; DWORD dwRet = QueueUserAPC(APCProc, hThread, (ULONG_PTR)NULL); CloseHandle(hThread); return 1; } int main(int argc, char* argv[..
연구실/파편화된 기록들
2008. 10. 25. 18:59
최근댓글