読者です 読者をやめる 読者になる 読者になる

ExitThread

ExitThreadは、スレッドを終了させるWindowsAPI・・・。

ExitThread 関数

returnで終了コードを指定してもスレッドは終了するが、スレッド終了関数としてExitThreadもある・・・。

ExitThreadに差し替えて、引数に終了コードを渡しただけ・・・。

i = 1, m_iNo = 0, m_tszMessage = No.0
i = 1, m_iNo = 4, m_tszMessage = No.4
i = 1, m_iNo = 3, m_tszMessage = No.3
i = 1, m_iNo = 1, m_tszMessage = No.1
i = 1, m_iNo = 2, m_tszMessage = No.2
i = 2, m_iNo = 0, m_tszMessage = No.0
i = 2, m_iNo = 1, m_tszMessage = No.1
i = 2, m_iNo = 4, m_tszMessage = No.4
i = 2, m_iNo = 3, m_tszMessage = No.3
i = 2, m_iNo = 2, m_tszMessage = No.2
i = 3, m_iNo = 0, m_tszMessage = No.0
i = 3, m_iNo = 1, m_tszMessage = No.1
i = 3, m_iNo = 4, m_tszMessage = No.4
i = 3, m_iNo = 3, m_tszMessage = No.3
i = 3, m_iNo = 2, m_tszMessage = No.2
i = 4, m_iNo = 0, m_tszMessage = No.0
i = 4, m_iNo = 1, m_tszMessage = No.1
i = 4, m_iNo = 3, m_tszMessage = No.3
i = 4, m_iNo = 4, m_tszMessage = No.4
i = 4, m_iNo = 2, m_tszMessage = No.2
i = 5, m_iNo = 0, m_tszMessage = No.0
i = 5, m_iNo = 3, m_tszMessage = No.3
i = 5, m_iNo = 4, m_tszMessage = No.4
i = 5, m_iNo = 2, m_tszMessage = No.2
i = 5, m_iNo = 1, m_tszMessage = No.1
dwExitCode[0] = 0
dwExitCode[1] = 1
dwExitCode[2] = 2
dwExitCode[3] = 3
dwExitCode[4] = 4
続行するには何かキーを押してください . . .

return文と変わらない・・・。

Sample/ExitThread.cpp at master · bg1bgst333/Sample · GitHub