Howto access thread data outside a thread
问题 Question: I start the MS Text-to-speech engine in a thread, in order to avoid a crash on DLL_attach. It starts fine, and the text to speech engine gets initialized, but I can't access ISpVoice outside the thread. How can I access ISpVoice outside the thread ? It's a global variable after all... You find XPThreads here: http://www.codeproject.com/KB/threads/XPThreads.aspx #include <windows.h> #include <sapi.h> #include "XPThreads.h" ISpVoice * pVoice = NULL; unsigned long init_engine_thread