>In my app I have a login procedure and everytime someone login I update my login table and this tell me how many users are login and I also have a logout procedure that update the login table, this will work well in a perfect world, where I see a problem is if the users computer shutdown prematurely, if this happen it would not update my login table, so the login count would be off.
>
>I need some ideals on how many users are login to the application.
>
The Win32 API mechanism would be to have each session create a named mailslot; named mailslots are resolvable within an NT or Win2K domain environment. At termination, have the program destroy its mailslot; if a system is rebooted or a session is terminated abruptly, Windows will act to destroy the unowned mailslot within a very brief period of time.