This must be an easy question.
I am trying to create a thread in windows. I am using C as my language.
I am trying to pass a function to the CreateThread function to create a thread. My function has a return type void and paratmeter is void as well. How do I approach this?
Is it something like this?
static void run() {
myThread = CreateThread(
NULL,
0,
MyFunction,
NULL,
0,
NULL);
}
How do I pass my function to CreateThread?
What is this DWORD WINAPI functionName () that I am reading about? Do I need this function?
Thanks in advance,
Sevak.
I am trying to create a thread in windows. I am using C as my language.
I am trying to pass a function to the CreateThread function to create a thread. My function has a return type void and paratmeter is void as well. How do I approach this?
Is it something like this?
static void run() {
myThread = CreateThread(
NULL,
0,
MyFunction,
NULL,
0,
NULL);
}
How do I pass my function to CreateThread?
What is this DWORD WINAPI functionName () that I am reading about? Do I need this function?
Thanks in advance,
Sevak.
Comment