Solved

Catching stop message of SrvAny

Posted on 2002-06-28
4
357 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now