Solved

Catching stop message of SrvAny

Posted on 2002-06-28
4
359 Views
Last Modified: 2008-02-01
hi
I am using srvany.exe to invoke a GUI application.
 My problem is that my application uses threads and database connections, I want to close those resources when stopping the service.

What can I do to supply an orderly termination for my application?

thanks,
   udi
0
Comment
Question by:udic
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
raidos earned 100 total points
ID: 7116082
I havn't been able to find any information how to do this with SrvAny.Exe, however i found another "start application as server" program that can do it...called SrvStart it can be found here: http://www.nick.rozanski.com/software.htm

Regards
//raidos
0
 
LVL 7

Expert Comment

by:Cynna
ID: 7118870
udic,

This might help you:

type
  TForm1 = class(TForm)
  (...)
  protected
     procedure WMEndSession(var WMsg: TWMEndSession);  message WM_ENDSESSION;
  (...)
  end;


procedure TForm1.WMEndSession(var WMsg: TWMEndSession);
begin

  // ... your cleanup code here...

  inherited;
end;
0
 

Author Comment

by:udic
ID: 7123848
hi
Cynna- i tried this before and no success.
Raidos- i take the ideas from your link (i didnt success to use SrvStart).

thanks,
udi
0
 

Author Comment

by:udic
ID: 7123854
hi
thank u as i wrote before i didnt success to use thos but i take the ideas.
now i cant catch stop process from windows task manager.

thanks again
udi
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question