<div>Sorry for the long content!!</div>
<div>I am trying to recover, in date format, the "AccountExpires" attribute from an Active Directory database.<br>When an account never expires, "AccountExpires" attribute can have two possible values: zero or 9223372036854775807,
<br>the last large value is System.Int64 but I need to convert it to IADsLargeInteger which is an "COM Interop Type" object of Active Directory that then, lets me convert to date format.<br>I have the next C# example I took from a publication that would like to write in ipy:
</div>
<p>using ActivedsNET;<br>public static IADsLargeInteger GetLargeInteger(long value)<br>{<br> IADsLargeInteger largeInteger = new LargeInteger();<br> largeInteger.HighPart = (int) (value << 32);<br> largeInteger.LowPart
= (int) (value & 0xFFFFFFFF);<br> return largeInteger;<br>}</p>
<p>Observe that I need to have ActivedsNET which is a runtime-callable wrapper (RCW). After some investigation to get this as an assembly, I used next SDK command: </p>
<p>tlbimp.exe activeds.tlb /out:activedsNET.dll /namespace:ActivedsNET</p>
<p>getting next warning messages during conversion:<br>TlbImp : warning TI0000 : The type library importer could not convert the signature for the member 'ADS_OCTET_STRING.lpValue'.<br>TlbImp : warning TI0000 : The type library importer could not convert the signature for the member '__MIDL___MIDL_itf_ads_0000_0002.lpValue'.
<br>.<br>.<br>.<br>TlbImp : warning TI0000 : At least one of the arguments for 'IDirectorySchemaMgmt.EnumAttributes' cannot be marshaled by the runtime marshaler. Such arguments will therefore be passed as a pointer and may require unsafe code to manipulate.
<br>TlbImp : warning TI0000 : At least one of the arguments for 'IDirectorySchemaMgmt.EnumClasses' cannot be marshaled by the runtime marshaler. Such arguments will therefore be passed as a pointer and may require unsafe code to manipulate.
<br>Type library imported to c:\os\ipy\src\activedsNET.dll</p>
<p>After getting the .dll expected, I attempted to import into ipy 2.0a4 and ipy 2.0a5 having the next behavior:<br>>>> import clr<br>>>> clr.AddReferenceToFile("activedsNET.dll") #Seems not be problem here
<br>>>> dir(activedsNET)<br>Traceback (most recent call last):<br> File , line 0, in ##245<br>NameError: name 'activedsNET' is not defined</p>
<p>>>> dir()<br>['__builtins__', '__doc__', '__name__', 'clr', 'sys'] #ActivedsNET is not showed<br>>>></p>
<div>What do you think is bad here?<br>Is this possible to help me with the info I gave? or do you need additional one.<br>Really, thanks for your attention.</div><span class="sg">
<div>Vizcayno.</div>
<div><br> </div></span>