Solved

how to detect when is made logoff and perform an action?

Posted on 2008-10-09
9
1,051 Views
Last Modified: 2010-04-21
Hi,

how to detect when is made logoff and perform an action?
or its not possible ?

thanks in advance.
0
Comment
Question by:davizinx
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 14

Expert Comment

by:SteveBay
ID: 22682183
It look like logoff activity is pretty well explain here:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_20525770
0
 
LVL 14

Assisted Solution

by:SteveBay
SteveBay earned 200 total points
ID: 22682196
0
 

Author Comment

by:davizinx
ID: 22682214
SteveBay:
when i try go to your link:
show this message:
Zone Not Found
0
 

Author Comment

by:davizinx
ID: 22682224
god, forget what I said above.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 6

Assisted Solution

by:ChristianWimmer
ChristianWimmer earned 20 total points
ID: 22682662
Some problems here:
1. Winlogon Notification Packages are not supported in Windows Vista.
2. WTSRegisterSessionNotification cannot be used in a service since it uses Window messages which are blocked over session barriers.
3. RegisterServiceCtrlHandlerEx/HandlerEx could be used if TService implementation would allow it. However if you write your own service implementation this can be an option. (Some problems exists in Windows 2000)

However SENS COM API can be a good option. (https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwapi/branches/2.2a/Examples/SENS/WinLogonLogo/)
0
 

Author Comment

by:davizinx
ID: 22688778
ChristianWimmer:
Your example is missing several files .dcu
-
SteveBay:
It seems to be what I want, but because I understand little English could not do what he wanted and fully understand.
 could make a ready example of what I want?
Thanks in advance.
0
 
LVL 6

Expert Comment

by:ChristianWimmer
ID: 22688983
The example is using the JEDI API Windows Headers that are also available here: blog.delphi-jedi.net
I just pointed to the subversion repository. If you download the sources you'll also get the examples.
0
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 280 total points
ID: 22698765
don't you just capture the wm_QueryEndSession message?
e.g.

private
  procedure WMQueryEndSession(var Msg : TWMQueryEndSession) ; message WM_QueryEndSession;


...
procedure TForm1.WMQueryEndSession(var Msg : TWMQueryEndSession) ;
begin
// If you want to stop the log off/ shut down do the next line
//   Msg.Result := 0
// otherwise, except that we are logging off/ shutting down
  // do any clean up you want here then do the folllowing
   Msg.Result := 1 ;
end;
0
 

Author Closing Comment

by:davizinx
ID: 31504819
good
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

12 Experts available now in Live!

Get 1:1 Help Now