レイヤー プロパティの説明・著作権

//レイヤ プロパティの説明
ILayerGeneralProperties::LayerDescription

//////////////////////////////////////////////////////////////////////
c pLExt = (ILayerExtensions)axMapControl1.get_Layer(0);
IServerLayerExtension pSLE;
IPropertySet pProps;
object names;
object values;
String CopyrightTextstr = null;

for (int l = 0; l <= pLExt.ExtensionCount - 1; l++) {
    pSLE = pLExt.get_Extension(l) as IServerLayerExtension;
    pProps = pSLE.ServerProperties;
    pProps.GetAllProperties(out names, out  values);
    string[] namearray = (string[])names;
    object[] valuesarray = (object[])values;

    for (int k = 0; k < namearray.Length; k++)
    {
        System.Diagnostics.Debug.Print(namearray[k] + "," + valuesarray[k]);
        if (namearray[k].Equals("CopyrightText"))
        {
            CopyrightTextstr = (String)valuesarray[k];

        }
    }
}
System.Diagnostics.Debug.Print("Value = " + CopyrightTextstr);
//////////////////////////////////////////////////////////////////////
ILayerGeneralProperties::LayerDescription

'レイヤ プロパティの著作権
'http://forums.esri.com/thread.asp?c=93&f=993&t=220817
Option Explicit
Sub Test()
    Dim pMxDoc As IMxDocument
    Set pMxDoc = ThisDocument
    
    Dim pLExt As ILayerExtensions
    Set pLExt = pMxDoc.FocusMap.Layer(0)
    Dim l As Long
    For l = 0 To pLExt.ExtensionCount - 1
        If TypeOf pLExt.Extension(l) Is IServerLayerExtension Then
            Dim pSLE As IServerLayerExtension
            Set pSLE = pLExt.Extension(l)
            
            Dim pProps As IPropertySet
            Set pProps = pSLE.ServerProperties
            
            Dim vNames As Variant, vVals As Variant
            pProps.GetAllProperties vNames, vVals
            Dim k As Long
            For k = 0 To UBound(vNames)
                If UCase(vNames(k)) = UCase("CopyrightText") Then
                    Debug.Print vVals(k)
                    pProps.SetProperty "CopyrightText", "updated " & Now
                End If
            Next k
            pSLE.ServerProperties = pProps
        End If
    Next l
End Sub