GetEntries retrieves AUO entry names and their associated ADSI namespaces (also called Providers). The namespace is determined from the ADsPathPrefix value defined for each entry.
IDL Definition
HRESULT GetEntries(
[in,out] VARIANT* pNames,
[in,out] VARIANT* pNamespaces
) ;
Parameters
pNames
upon return, the VARIANT subtype SAFEARRAY contains VARIANT subtype BSTR variables that are the AUO entry names defined for the current Membership virtual server instance. (VT_ARRAY|VT_VARIANT)
pNamespaces
upon return, the VARIANT subtype SAFEARRAY contains VARIANT subtype BSTR variables each of which contains the namespace portion of the ADsPathPrefix for the associated AUO entry. (VT_ARRAY|VT_VARIANT)
Return Value
a standard HRESULT value
Remarks
The names and namespaces are associated by index in the arrays. For example, the array elements Names(1) and Namespaces(1) (using VB syntax) represent an AUO name/namespace association.
You must have previously called GetInfo and specified a Membership server instance. If GetInfo has not been called, this method will return an error.
The returned variant type discriminator is of type VT_ARRAY|VT_VARIANT. Each VARIANT variable in the array has the discriminator type VT_BSTR.
Example
' Using Windows Scripting Host and VBScript
Option Explicit
' Here we wish to fetch all the entry names and their
' associated providers for Membership Instance 1
' First the AuoConfig object gets instantiated
' using the special creator object
Dim ObjCreator
Set ObjCreator = CreateObject("ObjCreator.ObjCreator.1")
Dim AuoConfig
set AuoConfig = Obj.Creator.CreateObjAuth("MemAdmin.AuoConfig.1")
' Call Getinfo for ID = 1
call AuoConfigObjRef.GetInfo ( 1 )
' Now get a list of the defined entries
Dim Names
Dim ADSProv
call AuoconfigObj.GetEntries( Names, NameSpaces )
' We'd now have an array of names and providers for ID = 1
Dim i
For i = LBound(Names) to UBound(Names)
wscript.echo "Name: " & Names(i)
wscript.echo "Namespace: " & NameSpaces(i)
Next