EnumFeatureGeometry の使用方法

Sub test()
    '基本レイヤ中の
    Dim pFeatureSelectionB As IFeatureSelection
    Set pFeatureSelectionB = pFeatureLayerB

    Dim pSelectionSet As ISelectionSet
    Set pSelectionSet = pFeatureSelectionB.SelectionSet
    
    Dim pEnumGeometryBind As IEnumGeometryBind
    Set pEnumGeometryBind = New EnumFeatureGeometry
    
    pEnumGeometryBind.BindGeometrySource Nothing, pSelectionSet

    Dim pGeomeFactory As IGeometryFactory
    Set pGeomeFactory = New GeometryEnvironment

    Dim pSelectedGeometry As IGeometry
    Set pSelectedGeometry = pGeomeFactory.CreateGeometryFromEnumerator(pEnumGeometryBind)

End Sub