Board index » delphi » com server, late bound, wm_queryendsession

com server, late bound, wm_queryendsession

I have an application that minimizes to the tray.  This application uses a
com server that
is late bound.  When the com server is opened,  and the app has been
minimized to the
tray, it doesn't seem to get the "WM_QUERYENDSESSION" message and it does
get
the WM_ENDSESSION but its parm is set to FALSE (aka not allowing shutdown).
If I take out the
open of the com server object, then the "WM_QUERYENDSESSION" works properly,
as
well as the WM_ENDSESSION.

I am using Delphi 5.

Anybody have any clues as to what my problem is, or where to look for it?

Thanks in advance,

Tom

 

Re:com server, late bound, wm_queryendsession


It is likely that some other app (probably the COM server) declined
WM_QUERYENDSESSION which is why your app does not get it. As for
WM_ENDSESSION, Windows always sends it out after calling WM_QUERYENDSESSION,
and because it is FALSE that means some other app declined
WM_QUERYENDSESSION.

--
have fun
Binh Ly
www.techvanguards.com

Quote
"_TPietrzakPinnnacle" <tpietr...@automation.pinncorp.com> wrote in message

news:3b167a3c$1_2@dnews...
Quote
> I have an application that minimizes to the tray.  This application uses a
> com server that
> is late bound.  When the com server is opened,  and the app has been
> minimized to the
> tray, it doesn't seem to get the "WM_QUERYENDSESSION" message and it does
> get
> the WM_ENDSESSION but its parm is set to FALSE (aka not allowing
shutdown).
> If I take out the
> open of the com server object, then the "WM_QUERYENDSESSION" works
properly,
> as
> well as the WM_ENDSESSION.

Re:com server, late bound, wm_queryendsession


Do you have any suggestions of how to handle this within the com
server?  All the com servers being used are internally developed, so I
can modify them if necessary.  Would it be as simple as intercepting
the WM_QUERYENDSESSION within the COM server and responding back with
Msg.Result = 1?

Thanks for your earlier response!

Tom P.

Other Threads