SetEntry Method

SetEntry creates or updates the specified AUO entry.

IDL Definition

HRESULT SetEntry(
[in] BSTR bszName,
[in] BSTR bszADsPathPrefix,
[in] BSTR bszSchema,
[in] BSTR bszClass,
[in] LONG lSuffix,
[in] BSTR bszDepObject,
[in] BSTR bszDepProp,
[in] BSTR bszBindAsName,
[in] BSTR bszBindAsPassword
);

Parameter

bszName

the name of the entry.

pbszADsPathPrefix

the ADsPathPrefix value for the entry.

pbszSchema

the Schema value for the entry.

pbszClass

the Class value for the entry.

plSuffix

the Suffix value for the entry. (1=username;2=dependent property;3=cookie)

pbszDepObject

the DepObject value for the entry. (an AUO entry name)

pbszDepProp

the DepProp value for the entry.

pbszBindAsName

the BindAsName value for the entry.

pbszBindAsPassword

the BindAsPassword value for the entry.

Return Value

a standard HRESULT value

Remarks

SetEntry puts an entry in the AuoConfig object with the specified name. If an entry with the specified name does not exist in the object, SetEntry creates a new one.

You must have previously called GetInfo and specified a Membership virtual server instance. If GetInfo has not been called, this method will return an error.

The process or thread invoking this method must have NT administrative credentials associated with it for the method to succeed.

Example

' Using Windows Scripting Host Runtime Env  (cscript.exe)
Option Explicit

' 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")

' We want to work with Membership Instance 1
AuoConfig.GetInfo(1)

Dim Name, Path, Schema, Class, Suffix
Name = ""   ' default entry
Path = "LDAP://ldapsvr1:389/o=somecompany/ou=members"
Schema = "LDAP://ldapsvr1:389/o=somecompany/cn=schema/cn=member"
Class = "member"
Suffix = "1"
AuoConfig.SetEntry(Name,Path,Schema,Class,Suffix, "","","","")

© 1997-1998 Microsoft Corporation. All rights reserved.