So just by looking at the msdn document of the following kernal32 function,
Code:
HANDLE WINAPI CreateThread(
__in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes,
__in SIZE_T dwStackSize,
__in LPTHREAD_START_ROUTINE lpStartAddress,
__in_opt LPVOID lpParameter,
__in DWORD dwCreationFlags,
__out_opt LPDWORD lpThreadId
);
lpStartAddress [in]
A pointer to the application-defined function to be executed by the thread. This pointer represents the starting address of the thread. For more information on the thread function, see ThreadProc.
I am not sure whether the function specified by the argument should be defined within the same .cpp file where I call the CreateThread() from. Right now, within the .cpp file that I call the CreateThread() function, I included a header file that has the declaration of the function and the definition of the function is in a .obj file that I am linking my program against.
Thanks!