In the following definition:

HANDLE WINAPI CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
SIZE_T dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter,
DWORD dwCreationFlags,
LPDWORD lpThreadId
);

What is lpThreadId used for?

http://msdn2.microsoft.com/en-us/library/ms682453.aspx

Re: CreateThread and lp by ctacke/>

ctacke/>
Wed Aug 01 16:21:53 CDT 2007

It returns a thread identifier. Use it for whatever you want (any API that
takes a thread identifier for example) or just ignore it. In older versions
of Windows (98? and before) and CE (3.0? and earlier), this was not an
optional parameter, but in anything recent it is.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com



"jp2code" <poojo.com/mail> wrote in message
news:eSUU6BI1HHA.1100@TK2MSFTNGP06.phx.gbl...
> In the following definition:
>
> HANDLE WINAPI CreateThread(
> LPSECURITY_ATTRIBUTES lpThreadAttributes,
> SIZE_T dwStackSize,
> LPTHREAD_START_ROUTINE lpStartAddress,
> LPVOID lpParameter,
> DWORD dwCreationFlags,
> LPDWORD lpThreadId
> );
>
> What is lpThreadId used for?
>
> http://msdn2.microsoft.com/en-us/library/ms682453.aspx
>