WaitforThread function

等待指定线程退出


Function:

bool UAPI WaitforThread(
        int hThread,
        dword dwOvertime
);

Parameters:

  • hThread [in]:线程句柄
  • dwOvertime [in]:等待超时(ms),可以是以下标志的其中之一,或为 NULL 以及任意 >=0 的数值
Constant Value Notes
THREAD_OVERTIME_INVALID -1 无限制的等待

Return value:

  • Type:BOOL
  • Text:成功返回 TRUE,失败返回 FALSE,函数失败返回 FALSE

Remarks:

  1. WaitforThread function 在等待失败(如指定线程句柄在等待中途被关闭)以及函数失败时的返回值均为 FALSE

  2. WaitforThread function 通常用于安全退出线程前等待其自行返回

Requirements:

Keyword Value
Minimum Agine Version 171012.1
Minimum SDK Version 171012.1
Header File h.thread
Library Server kext

results matching ""

    No results matching ""