Answer the question
In order to leave comments, you need to log in
How to call CreateThread inside a Form?
Hello, I have a question due to ignorance of the programming language.
I can't figure out how to call a function CreateThread
inside a Form .
The called line looks like this.
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ClientHandler_second, NULL, NULL, NULL);
void ClientHandler_second() { ... }
Answer the question
In order to leave comments, you need to log in
Tony is right, but there is one more thing.
CreateThread must NOT be used. More precisely, you can - but for this you need to know what you are doing. And so for the application program, the rule is that you need to transfer the runtime library to multithreaded mode, and for this, call an analog from this very library. In C++, the beginthreadex() function is used for this, in Delphi - BeginThread.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question