Because of limited environment in DllMain, a better appoach is to provide a
it's loaded.
You could always use a multimedia timer
joe
unfortunately there are the same problems about threads,
http://support.microsoft.com/kb/153867
now I am considering two alternatives, the first creating a invisible
window in CWinApp::InitInstance with related SetTimer(), the second an
asynchronous creation of additional thread, see the above Microsoft
note 153867
"Do not create a Multimedia Timer in InitInstance() of an MFC DLL.
Create the Multimedia Timer in a DLL function that is exported and is
therefore called from outside the scope of DLLMain"
Still I am concerned about a safe way to stop the additional (Timer)
thread, ideally I would stop the thread in CWinApp::ExitInstance
MyDll::ExitInstance()
{ DeleteTimerQueue(m_timer_queue); return CWinApp::ExitInstance();}
but I am not sure that Windows likes it... (I mean memory/resources
cleanups etc.) looks like a nasty problem...