C# Last Logon

C# Last Logon

Post by Dom Roch » Wed, 02 Jul 2003 04:46:13



How in the world do I convert the System___ComObject to a
date using directory services for the LastLogon property
in C Sharp?
 
 
 

C# Last Logon

Post by MVP - ADS » Wed, 02 Jul 2003 05:40:18


I suggest reading this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netd...

If you don't want to add the assembly reference to activeds.dll, then you
can use reflection to call InvokeMember on the HighPart and LowPart
properties, but that is probably much slower.  This posting shows a VB.NET
version of such a function that you could use:

http://groups.google.com/groups?selm=ecwh9R%24GDHA.1600%40tk2msftngp1...

Another thing that works is if you get an INTEGER8 from an AD search (using
DirectorySearcher) instead of from a DirectoryEntry, then the interop layer
will marshal the value as an Int64 directly instead of the
System.__ComObject IDispatch pointer.

HTH,

Joe K.


Quote:> How in the world do I convert the System___ComObject to a
> date using directory services for the LastLogon property
> in C Sharp?


 
 
 

1. Problems with LAST LOGON USER NAME and LAST LOGON USER DOMAIN

I have a SMS 2.0 SP3 in NT 4.0 domain.

I have a 95 / 98 machines.

Some of this machines didn't report the LAST LOGON USER NAME and LAST LOGON USER DOMAIN.

I think the problem is WBEM, in some of this machines i delete the smsclient, using 20clicln.bat, and delete all the Wbem registry entries, and reinstall the client again, but the LAST LOGON USER NAME and LAST LOGON USER DOMAIN didn't show.

Someone have a answer for this ?

Thanks

2. Need help with Best Data 14400/.42 and Procomm/Win

3. hp laserjet 5m and decnet

4. Last Logon User Name/Last Logon User Domain does not always show up

5. CDwriter 4x4x32 - Who makes this unit ?

6. Last Logon/Last Logoff

7. Oxygen 402 and Pro/E crashs ???

8. First Last vs Last, First

9. Last Login and Last Logoff property

10. Removing last user name from logon

11. Last Logon User Name

12. Last logon user name