I just finished a service that does something similar. Did you start the
Directory Observer code before it entered the message pump loop. If you
did, did you spawn it off in a thread such that the service module code can
keep going into the message pump code? Once you send the Stop service
message to the app you will fall out of the messaging loop and you have to
clean up you thread.
This is one way of doing it.
Hope this helps.
Steven
Quote:
> Hi,everyone:
> Sorry for my English.
> I am writing a program which can monitor a folder and delete the old
> file, and I use the ATL COM Wizard to create a ATL service project, I have
> finished the function that delete old file and put it into the loop in the
> CServiceModule::Run(),the service is running,but it is not work.
> I couldn't find easy answer on MSDN :(
> Thanks in advance !
> Bye.
> Frank