ArcObjects Library Reference  (GeoDatabase)    

IWorkspaceExtension.PrivateDatasetNames Property

The private datasets that should not be exposed to browsers.

[Visual Basic 6.0]
Property PrivateDatasetNames(
    ByVal dtype As esriDatasetType _
) As IEnumBSTR
[Visual Basic .NET]
Public Function get_PrivateDatasetNames ( _
    ByVal dtype As esriDatasetType _
) As IEnumBSTR
[C#]
public IEnumBSTR get_PrivateDatasetNames (
    esriDatasetType dtype
);
[Java]
public IEnumBSTR getPrivateDatasetNames (
    esriDatasetType dtype
)
[C++]
HRESULT get_PrivateDatasetNames(
  esriDatasetType dtype,
  IEnumBSTR** ppPrivateNames
);
[C++]

Parameters

dtype [in]

  dtype is a parameter of type esriDatasetType

ppPrivateNames [out, retval]

  ppPrivateNames is a parameter of type IEnumBSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The PrivateDatasetNames and DataDictionaryNames properties return the names of tables and datasets that are private to the extension and will not be exposed by the workspace to browsing clients.  Since they return an EnumBSTR object that is not cocreatable, you must create your own object that implements IEnumBSTR. 

[Visual Basic 6.0]

Here is an example of how you can implement IEnumBSTR to pass back from this property.

Implements IEnumBSTR
Private Const S_FALSE As Long = 1
Private m_index As Long
Private colStrings As Collection
'Helper sub to add a string to the EnumBSTR
Public Sub Add(ByVal sString As String)
  colStrings.Add sString
End Sub
'Helper sub so don't have to QI to IEnumBSTR to reset
Public Sub Reset()
  IEnumBSTR_Reset
End Sub
'Setup a new collection and reset to the beginning
Private Sub Class_Initialize()
  m_index = 1
  Set colStrings = New Collection
End Sub
'Free the collection of strings
Private Sub Class_Terminate()
  Set colStrings = Nothing
End Sub
'Return the next String.  Raise S_FALSE to signify at the end
Private Function IEnumBSTR_Next() As String
  If m_index > colStrings.Count Or m_index < 1 Then
    IEnumBSTR_Next = ""
    Err.Raise S_FALSE
  Else
    IEnumBSTR_Next = colStrings.Item(m_index)
    m_index = m_index + 1
  End If
End Function
'Reset the Enumeration
Private Sub IEnumBSTR_Reset()
  m_index = 1
End Sub

See Also

IWorkspaceExtension Interface

 


Feedback Send feedback on this page