In Windows C ++, the following creates a stream:
CreateThread(NULL, NULL, function, parameter, NULL, &threadID);
This will launch the “function” in the new thread and pass the “parameter” as void * or LPVOID.
Suppose I want to pass two parameters to a “function”, is there a better way to do this, besides creating a data structure containing two variables, and then casting the data structure as an LPVOID?
source share