Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function is a placeholder for an application-defined function that serves as the starting address for a thread. Specify this address when calling the CreateThreadfunction.

The LPTHREAD_START_ROUTINE type defines a pointer to this callback function.

Syntax

DWORD WINAPI ThreadProc(
  LPVOID 
lpParameter
);

Parameters

lpParameter

[in] Thread data passed to the function using the lpParameter parameter of the CreateThreadfunction.

Return Value

Nonzero indicates success. Zero indicates failure.

Remarks

A process can obtain the return value of the ThreadProcof a thread it created with CreateThreadby calling the GetExitCodeThreadfunction.

Requirements

Header Developer Implemented
Library Developer Implemented
Windows Embedded CE Windows CE 1.01 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also