I have an application written C/C++(windows) from my C++ part I call CreateThread to start a thread, socket calls and etc. When I am ready to shut down the application I would like to call into one of the functions in the running thread, i.e. to close sockets, release memory and general cleanup. Can someone explain how to do this? An example with source code would be best.
Thanks
Start Free Trial