Skip to content

IADsPropertyValue

The IADsPropertyValue interface is used to represent a value of an IADsPropertyEntry object in a predefined data type.

The IADsPropertyEntry::Values property contains an array of IADsPropertyValue objects. Each of the objects contains a single value of the IADsPropertyEntry object. For more information and a code example on creating entirely new property entries and values, see IADsPropertyList::PutPropertyItem.

When obtaining values in a format not provided by one of the properties of this interface, use the IADsPropertyValue2 interface.

Before calling the methods of this interface, call IADs::GetInfo or IADs::GetInfoEx explicitly to load the assigned values of the object into the cache, if the cache was not initialized. After modifying the properties of this interface, call IADs::SetInfo to save the changes to the directory.

Inheritance: The IADsPropertyValue interface inherits from the IDispatch interface.

Methods

  • Method

  • Description

  • Clear()

  • Clears the current values of the property value object.

Properties

Details

Clear()

Clears the current values of the property value object.

void Clear()

Examples

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

# Connect to the Adaxes service
$admNS = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$admService = $admNS.GetServiceDirectly("localhost")

# Bind to object
$userPath = "Adaxes://CN=John Smith,CN=Users,DC=domain,DC=com"
$user = $admService.OpenObject($userPath, $NULL, $NULL, 0)
$user.GetInfo()

$propertyEntry = $user.GetPropertyItem("description", "ADSTYPE_CASE_IGNORE_STRING")

foreach ($propertyValue in $propertyEntry.Values)
{
    Write-Host "Property Value: $propertyValue"

    $propertyValue.Clear()
    Write-Host "Property Value: $propertyValue"
}
using System;
using Softerra.Adaxes.Interop.Adsi;
using Softerra.Adaxes.Adsi;
using Softerra.Adaxes.Interop.Adsi.Cache;
using Softerra.Adaxes.Interop.Adsi.PersistentObjects;
class Program
{
    static void Main(string[] args)
    {
        // Connect to the Adaxes service
        AdmNamespace adsNS = new AdmNamespace();
        IAdmService admService = adsNS.GetServiceDirectly("localhost");

        // Bind to object
        const string userPath = "Adaxes://CN=John Smith,CN=Users,DC=domain,DC=com";
        IADs user = (IADs)admService.OpenObject(userPath, null, null, 0);

        user.GetInfo();
        IADsPropertyList propertyList = (IADsPropertyList)user;

        IADsPropertyEntry propertyEntry =
            (IADsPropertyEntry)propertyList.GetPropertyItem("description",
            ADSTYPEENUM.ADSTYPE_CASE_IGNORE_STRING);

        foreach (IADsPropertyValue propertyValue in (Array)propertyEntry.Values)
        {
            Console.WriteLine("Property Value: {0}", propertyValue);

            propertyValue.Clear();
            Console.WriteLine("Property Value: {0}", propertyValue);
        }
    }
}

ADsType

Gets or sets the data type of the property. Data types are specified in the ADSTYPEENUM enumeration.

  • Type:
  • Int32
  • Access:
  • Read/Write

Boolean

Gets or sets a Boolean value.

  • Type:
  • Int32
  • Access:
  • Read/Write

CaseExactString

Gets or sets the value of a case-sensitive string.

  • Type:
  • String
  • Access:
  • Read/Write

CaseIgnoreString

Gets or sets the value of a case-insensitive string.

  • Type:
  • String
  • Access:
  • Read/Write

DNString

Gets or sets an object’s distinguished name (DN).

  • Type:
  • String
  • Access:
  • Read/Write

Integer

Gets or sets an integer value.

  • Type:
  • Int32
  • Access:
  • Read/Write

LargeInteger

Gets or sets a large-integer value. Large integers are represented by the IADsLargeInteger interface.

  • Type:
  • Object
  • Access:
  • Read/Write

NumericString

Gets or sets the value of a string consisting of numeric characters.

  • Type:
  • String
  • Access:
  • Read/Write

OctetString

Gets or sets the value of a string of eight-bit characters.

  • Type:
  • Object
  • Access:
  • Read/Write

PrintableString

Gets or sets the value of a printable string.

  • Type:
  • String
  • Access:
  • Read/Write

SecurityDescriptor

Gets or sets a security descriptor. Security descriptors are represented by the IADsSecurityDescriptor interface.

  • Type:
  • Object
  • Access:
  • Read/Write

UTCTime

Gets or sets a Coordinated Universal Time value.

  • Type:
  • DateTime
  • Access:
  • Read/Write

Requirements

Minimum required version: 2009.1

See also