G
Guest
If anyone has an example of this I'd appreciate seeing it.
I'm having a problem with assigning the value of an object's
lastLogonTimeStamp property to a variable. I can do it with VbScript, but
can't get it in .Net.
The value is 64 bit. I'm trying to assign it to a Long variable.
dateLastLogon =
mySearchResult.GetDirectoryEntry.Properties("lastLogonTimestamp").Value
The above line doesn't work, but the below line does. The error I get is:
"An unhandled exception of type 'System.InvalidCastException' occurred in
microsoft.visualbasic.dll
Additional information: Cast from type '_ComObject' to type 'Long' is not
valid."
lstComputers.Items.Add(mySearchResult.GetDirectoryEntry.Properties("Name").Value)
Any ideas? If more info is needed, let me know.
TIA
-Ian
I'm having a problem with assigning the value of an object's
lastLogonTimeStamp property to a variable. I can do it with VbScript, but
can't get it in .Net.
The value is 64 bit. I'm trying to assign it to a Long variable.
dateLastLogon =
mySearchResult.GetDirectoryEntry.Properties("lastLogonTimestamp").Value
The above line doesn't work, but the below line does. The error I get is:
"An unhandled exception of type 'System.InvalidCastException' occurred in
microsoft.visualbasic.dll
Additional information: Cast from type '_ComObject' to type 'Long' is not
valid."
lstComputers.Items.Add(mySearchResult.GetDirectoryEntry.Properties("Name").Value)
Any ideas? If more info is needed, let me know.
TIA
-Ian