============================================================================= DirList_TerminateIconThread() Terminate Icon Thread and reset multithreading control structures
| 174 | // Terminate Icon Thread and reset multithreading control structures |
| 175 | // |
| 176 | BOOL DirList_TerminateIconThread(HWND hwnd) |
| 177 | { |
| 178 | |
| 179 | LPDLDATA lpdl = (LPVOID)GetProp(hwnd,pDirListProp); |
| 180 | |
| 181 | SetEvent(lpdl->hExitThread); |
| 182 | |
| 183 | //WaitForSingleObject(lpdl->hTerminatedThread,INFINITE); |
| 184 | while (WaitForSingleObject(lpdl->hTerminatedThread,0) != WAIT_OBJECT_0) |
| 185 | { |
| 186 | MSG msg; |
| 187 | if (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) { |
| 188 | TranslateMessage(&msg); |
| 189 | DispatchMessage(&msg); |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | ResetEvent(lpdl->hExitThread); |
| 194 | SetEvent(lpdl->hTerminatedThread); |
| 195 | |
| 196 | return TRUE; |
| 197 | |
| 198 | } |
| 199 | |
| 200 | |
| 201 | //============================================================================= |
no outgoing calls
no test coverage detected