Link to home
Start Free TrialLog in
Avatar of splram
splram

asked on

Windows NT Service internal error

Dear All,

I've written a Windows NT Service application using delphi 5. The service application purpose is to transfer files from one location to another location using http.

This application frequently (15 mins) checks the sql server database for new data, and if its there then creates a tab delimited text file from the new data and transfers that created text file to another remote location using http. So this is the basic functionality of the application.

The problem is while it is transferring files if user stops the NT service it gives some windows nt internal error. Subsequently it neither allows us to start/stop the application (though the status is shown as stopped in services applet in control panel).

If this happens I had to restart the server then I can restart the application. How can i stop the service without restarting the server itself. B-coz no one can afford to restard the live server.

The other problem is it is taking maximum cpu time, how can i reduce this.

Thanks in advance
Rammohan
ASKER CERTIFIED SOLUTION
Avatar of geobul
geobul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lee_Nover
Lee_Nover

q:
how did you create that loop ?
can you give us some code ?
what are you using to transfer the file ?

s:
you could stop the file transfer in the OnStop event of the service

and as geobul suggested use Application.ProcessMessages in the OnExecute event loop
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from geobul

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
Mindphaser --> been busy huh? ;)