Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Using
TerminateThreaddoes not allow proper thread clean up.
Remarks
This warning indicates that a call to TerminateThread has been detected.
TerminateThread is a dangerous function that should only be used in the most extreme cases. For more information about problems associated with TerminateThread call, see TerminateThread function.
Code analysis name: USINGTERMINATETHREAD
To properly terminate threads
Create an event object using the
CreateEventfunction.Create the threads.
Each thread monitors the event state by calling the
WaitForSingleObjectfunction.Each thread ends its own execution when the event is set to the signaled state (
WaitForSingleObjectreturnsWAIT_OBJECT_0).