Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2006

Tip: Looking for answers? Try searching our database.

System.DirectoryServices

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Trevor Lawrence - 21 Jul 2006 07:38 GMT
Having connected to a domain object, I want to read the minPwdAge and
maxPwdAge properties.  These, however, are of type "Large Integer/Interval"
and there doesn't seem to be marsalling support for these.  They come across
as System.__ComObject, and I can't do much with that.

Any ideas how I can get the data?

Trevor
Luc E. Mistiaen - 22 Jul 2006 04:52 GMT
Something like:

   public static long FromLargeInteger (DirectoryEntry Entry, string
LargeAttribName)
   {
     ActiveDs.LargeInteger Work = (ActiveDs.LargeInteger)
Entry.Properties[LargeAttribName].Value ;
     return (((long) Work.HighPart) << 32) | (Work.LowPart & 0xFFFFFFFF) ;
   }

/LM

> Having connected to a domain object, I want to read the minPwdAge and
> maxPwdAge properties.  These, however, are of type "Large
[quoted text clipped - 5 lines]
>
> Trevor
Trevor Lawrence - 24 Jul 2006 06:23 GMT
Thanks.  Works fine.

(I was close.  Was fiddling with ActiveDS._LARGE_INTEGER.Quadpart but that
didn't get me there.)

Trevor

> Something like:
>
[quoted text clipped - 17 lines]
>>
>> Trevor
Marc Scheuner - 24 Jul 2006 05:48 GMT
>Having connected to a domain object, I want to read the minPwdAge and
>maxPwdAge properties.  These, however, are of type "Large Integer/Interval"
>and there doesn't seem to be marsalling support for these.  

Hi Trevor,

A good place to go look for answers for these kind of questions is the
System.DirectoryServices portal on MSDN:

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

There's a Quick List for C# Code Examples under the "Using
System.DirectoryServices" node, which contains lots of code snippets
for common operations.

One of them is called "Large Integer Property Type" and gives you an
explanation and code sample as to how to access (read) and set (write)
a Large Integer property in AD.

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


HTH
Marc

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.