Thanks for the reply, David. I had considered running it as a service, but I
think the apps may be a little too complex to be simple services - I don't know
all that much about creating service applications.
Meanwhile, I continued to look for a solution and found that if I override
WndProc and call the UDP component's Destroy method in this procedure I am able
to log off:
procedure TForm1.WndProc(var Msg: TMessage);
begin
inherited WndProc(Msg);
if Msg.msg = WM_QUERYENDSESSION then
begin
//Msg.Result:= 1;
//showmessage('End session');
NMUDP1.Destroy;
//Close;
end;
end;
The commented-out lines represent my previous forlorn efforts.
Anyone see inherent dangers here?
Regards
Steve
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of David Smith
Sent: 28 October 2008 15:15
To: [email protected]
Subject: Re: [delphi-en] Can't log off when UDP app is running
is it running in a background thread? Maybe you should reconfigure it to run as
a service
***************************************************************************
This e-mail and any files transmitted with it are confidential. If you are not
the intended recipient, any reading, printing, storage, disclosure, copying or
any other action taken in respect of this e-mail is prohibited and may be
unlawful. If you are not the intended recipient, please notify the sender
immediately by using the reply function and then permanently delete what you
have received.
Content of emails received by this Trust will be subject to disclosure under
the Freedom of Information Act 2000, subject to the specified exemptions,
including the Data Protection Act 1998 and Caldicott Guardian principles.
This footnote also confirms that, unless otherwise stated, this email message
has been swept by Sophos Anti-virus for the presence of computer viruses.
***************************************************************************