Search

Wednesday, September 20, 2006

IADsLargeInteger and conversion errors

If you're working with the IADSLargeInteger to set accountExpires or any other date field in AD, you'll want to know about this bug with the IADsLargeInteger object.
The problem is with the conversion from long to int, if the lowPart is negative, you need to add 1 to the highPart. Otherwise there's a 7 minute, 9.5 second difference with the datetime.

Check here for a detailed explanation:
http://www.rlmueller.net/Integer8Attributes.htm

-pt

No comments: