Hello All,<BR><BR>I&#039;ve been having a terrible time extracting custom LDAP attributes from my third party (i.e. non MS) LDAP server using vbscript/ASP. The custom attributes are all of ads type ADS_PROV_SPECIFIC. I have seen a lot of discussion concerning how to do this, such as the MS KB article, Q251195, but have not seen much in the way of actual vbscript code to point me in the right direction.<BR><BR>Here is some sample code to show you where I am coming from...<BR>&#060;%<BR> Dim propList, propEnty, propVal, iPropCount<BR> Dim i,v, ProperyObj<BR><BR> Set propList = GetObject<BR>"LDAP://somehost.corp.somedomain.com:389/CN=Bill E Smith,OU=Accounting,OU=People,O=SomeDomain,C=US")< BR> propList.GetInfo<BR> response.write "Property List: &#060;p /&#062;"<BR><BR> On error resume next<BR><BR> iPropCount=propList.PropertyCount<BR> For i=1 to iPropCount<BR> set PropertyObj = propList.Next<BR> Response.Write PropertyObj.Name & " - &#060;strong&#062;"<BR><BR> &#039; I have a function "showtype()" that expands ADsType<BR><BR> Response.Write showtype(PropertyObj.ADsType) & "&#060;/strong&#062;"<BR> Response.Write "- Control Code = " & PropertyObj.ControlCode<BR>& "&#060;br /&#062;"<BR> On Error Goto 0<BR> If PropertyObj.Name & "" = "sAMAccountName" Then<BR> For each v in PropertyObj.Values<BR> response.write "TypeName is " & TypeName(v) & "&#060;br /&#062;"<BR> response.write "Vartype is " & vartype(v) & "&#060;br /&#062;"<BR> Next<BR> End If<BR> On Error Resume Next<BR> Next<BR>%&#062;<BR><BR>This code does a good job of enumerating all of the properties, their names, ads types, and control codes, but those that I find that have ads type = "ADS_PROV_SPECIFIC" (such as "sAMAccountName") are untouchable.<BR><BR>I get all the way to the point that I have &#039;v&#039;, and can identify from the TypeName, IsObject() and varType that this is a true "object", but can never extract any real values.<BR><BR>I have done some research to determine what custom data type &#039;v&#039; is stored as, it appears to be a "c struct" as follows:<BR><BR>typedef struct ADS_PROV_SPECIFIC {<BR> DWORD dwLength;<BR> LPBYTE lpValue;<BR>} ADS_PROV_SPECIFIC, *PADS_PROV_SPECIFIC;<BR><BR>see this URL for further details:<BR><BR>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/adsi/ads_prov_specific.asp<BR><BR>Can anyone point me in the right direction? I would really appreciate any code that has worked in practice (as well as in theory). Also, if this is a lost cause, please tell me where I can find a third party COM object to do this for me, I am not above admitting defeat, but I wanted to give it a shot in pure ASP before I went with a COM object.<BR><BR>Thanks in advance,<BR><BR>Troy High<BR>thigh@bigfoot.com