INtime SDK Help
CreateThread (iwin32)
INtime SDK v7 > About INtime > Alternate APIs > iwin32 API > iwin32 API > CreateThread (iwin32)

Creates a thread that executes within the address space of the calling process.

/* sample declaration of thread start */
DWORD WINAPI ThreadProc(
    LPVOID lpParameter
);
HANDLE CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );

Parameters

lpThreadAttributes
Ignored; set to NULL.
dwStackSize
Number of bytes to allocate to the new thread's stack.
lpStartAddress
Pointer to the application-defined function of type LPTHREAD_START_ROUTINE, executed by the thread. Represents the thread's starting address, which must be of the form:
DWORD WINAPI ThreadProc (
    LPVOID lpParameter
);
Note:   Do not set lpStartAddr to NULL. Passing this value in the parameter causes the function to return ERROR_INVALID_PARAMETER.
lpParameter
Pointer passed to the thread.
dwCreationFlags
Specifies flags that control the thread's creation. Valid values include:
CREATE_SUSPENDED
The thread is created in a suspended state and does not run until ResumeThread is called.

If the flag is not specified, the thread starts immediately after creation.

lpThreadId
Pointer to a 32-bit variable that receives the thread identifier. If this parameter is NULL, the thread identifier does not return.

Remarks

Return Values

Handle to new thread
Success.
NULL
Failure. For extended error information, see GetLastError.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/winbase.h windows.h iwin32.lib
See Also