|
From: Abhijit S. <mu...@gm...> - 2002-09-10 15:51:43
|
> Hi List,
>
> I want to start a function in x threads e.g:
>
> I have a function print, print does nothing else as print a number
>
> void print(int i);
>
> Now I want to start 5 threads (or 30) where everey thread print another
> number.
>
> How can I realize that ??
>
Look up CreateThread().
HANDLE CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes, // address of thread security
attributes
DWORD dwStackSize, // initial thread stack size, in bytes
LPTHREAD_START_ROUTINE lpStartAddress, // address of thread function
LPVOID lpParameter, // argument for new thread
DWORD dwCreationFlags, // creation flags
LPDWORD lpThreadId // address of returned thread identifier
);
|