Click here to Skip to main content
15,900,258 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I try so many time to create thread in c..

can u send a simple code how to create a thread in c...
Posted
Updated 22-Jun-11 18:55pm
v2

1 solution

BOOL CreateThread(DWORD dwCreateFlags = 0,
UINT nStackSize = 0,
LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL
BOOL CreateThread(DWORD dwCreateFlags = 0,
UINT nStackSize = 0,
LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL
); );
 
Share this answer
 
Comments
@BangIndia 23-Jun-11 2:12am    
i accept ..
there is an any method for declaring the thread funcation
PrafullaVedante 23-Jun-11 2:48am    
You can give any name to your function but its prototype should be

DWORD WINAPI FunctionName(LPVOID lparam)
@BangIndia 23-Jun-11 5:05am    
why we want to use WINAPI in front of the thread function declaration

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900