M
Mario Rodriguez
I'm trying the following code, but never finds the IADsPropertyList and
IADsPropertyEntry interfaces, I added the System.DirectoryServices reference
but the error persists, any idea ?
foreach(string sPropName in deCurrEntry.Properties.PropertyNames)
{
ListViewItem lvItem = lsvDetails.Items.Add(sPropName);
// get the native ADSI interface, for additional information
try
{
IADsPropertyList oPropList = (deCurrEntry.NativeObject as IADsPropertyList);
IADsPropertyEntry oPropEntry = (oPropList.GetPropertyItem(sPropName,
(int)ADSTYPEENUM.ADSTYPE_UNKNOWN) as IADsPropertyEntry);
int iADsType = oPropEntry.ADsType;
lvItem.SubItems.Add(ADsTypeToString(iADsType));
lvItem.SubItems.Add(PropertyToString(deCurrEntry, oPropEntry, iADsType));
}
catch (Exception)
{
}
}
IADsPropertyEntry interfaces, I added the System.DirectoryServices reference
but the error persists, any idea ?
foreach(string sPropName in deCurrEntry.Properties.PropertyNames)
{
ListViewItem lvItem = lsvDetails.Items.Add(sPropName);
// get the native ADSI interface, for additional information
try
{
IADsPropertyList oPropList = (deCurrEntry.NativeObject as IADsPropertyList);
IADsPropertyEntry oPropEntry = (oPropList.GetPropertyItem(sPropName,
(int)ADSTYPEENUM.ADSTYPE_UNKNOWN) as IADsPropertyEntry);
int iADsType = oPropEntry.ADsType;
lvItem.SubItems.Add(ADsTypeToString(iADsType));
lvItem.SubItems.Add(PropertyToString(deCurrEntry, oPropEntry, iADsType));
}
catch (Exception)
{
}
}