question for ATL Service 
Author Message
 question for ATL Service

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



Sun, 11 Jul 2004 17:30:33 GMT  
 question for ATL Service
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



Sun, 11 Jul 2004 23:14:20 GMT  
 question for ATL Service
Steven ,Think you ,the service is working well.



Quote:
> 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



Mon, 12 Jul 2004 13:01:17 GMT  
 question for ATL Service
Hi Steven
    I have another question about the Service,I want get the path from the
user,It is to say the user can set the path that he want to monitor,Can you
help me ,Thinks

Frank



Mon, 12 Jul 2004 17:59:29 GMT  
 question for ATL Service
I have an admin app that the users can use.  The directory that they enter
here is saved in the registry.  When the directory is modified in the admin
app it tells the service to stop and restart to reinitialize the Observer.

Steven


Quote:
> Hi Steven
>     I have another question about the Service,I want get the path from the
> user,It is to say the user can set the path that he want to monitor,Can
you
> help me ,Thinks

> Frank



Mon, 12 Jul 2004 23:37:10 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Simple Question About ATL Service Wizard?

2. Question about ATL services, where to put user code

3. Simple ATL 7.0 Service question

4. ATL 7.0 NT Service question...

5. ATL Service and ADO Question...

6. Quick question on message loop in ATL service

7. ATL service questions...

8. ATL service - amateur question

9. Additional ATL service question

10. ATL service question

11. ATL NT service question

12. Help creating a simple service using ATL Service

 

 
Powered by phpBB® Forum Software