Поделиться через


CRTThreadTraits::CreateThread

Call this function to create a thread that can use CRT functions.

static HANDLE CreateThread(
   LPSECURITY_ATTRIBUTES lpsa,
   DWORD dwStackSize,
   LPTHREAD_START_ROUTINE pfnThreadProc,
   void* pvParam,
   DWORD dwCreationFlags,
   DWORD* pdwThreadId 
) throw( );

Параметры

  • lpsa
    The security attributes for the new thread.

  • dwStackSize
    The stack size for the new thread.

  • pfnThreadProc
    The thread procedure of the new thread.

  • pvParam
    The parameter to be passed to the thread procedure.

  • dwCreationFlags
    The creation flags (0 or CREATE_SUSPENDED).

  • pdwThreadId
    [out] Address of the DWORD variable that, on success, receives the thread ID of the newly created thread.

Возвращаемое значение

Returns the handle to the newly created thread or NULL on failure. Call GetLastError to get extended error information.

Заметки

See CreateThread for further information on the parameters to this function.

This function calls _beginthreadex to create the thread.

Требования

Header: atlbase.h

См. также

Основные понятия

CRTThreadTraits Class

CRTThreadTraits Members