NT Services without threads
-
Hello Friends, Is it possible to create a windowsNT/2000 services without threads.The problem I am facing is that i cant set a timer inside a service. Is there any workaround for this prob? regards, John
Yeah, if you don't mind i have a suggestion use Waitforsingleobject api inside the thread for wait for event which would set it self every time timer message arrived for example--> your thread -> void thread(lpvoid p) { while(1) { WaitForSingleObject(event); ---- your functioning ------- - -- } } and OnTimer(UINT nIdEvent)//timer function { SetEvent(event); } simple and consise way for creating service ----------------------------- "I Think It will Work" Formerly Known As "Alok The Programmer" at CP ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk