Home > COM > How to get last login and logoff time of a user?
  1. August 20, 2008 at 5:30 am

    I think you need to set/enable it somehow in Active directory services…(hope you are one who posted a query related to this in codeproject) 🙂

    Try this link… Tell me if it helps…


  2. Joe Schmoe
    August 19, 2008 at 5:23 pm

    Thanks for this article. I, however, have a problem using the code. The line

    hr = pUser->get_LastLogoff( &LastLogoff );

    fails with “Unknown error 0x8000500D”.

    Any ideas? pUser->get_LastLogin( &LastLogin ) works fine.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: