?
Solved

Catching stop message of SrvAny

Posted on 2002-06-28
4
Medium Priority
?
367 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 300 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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

840 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