DeleteInstance Method

This method clears all entries defined for the specified Membership virtual server instance.

IDL Definition

HRESULT DeleteInstance();

Return Value

a standard HRESULT value

Remarks

You must have previously called GetInfo and specified a Membership virtual server instance. If GetInfo has not been called, an error is returned.

This method only clears the entries within the AuoConfig object. Call SetInfo to commit the changes.

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 and VBScript
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")

' get the entries for Membership Instance ID = 1
AuoConfig.GetInfo(1)

'  Say we wish to redefine all the entries for this ID
'  We call DeleteInstance to remove all the current entries

AuoConfig.DeleteInstance()

© 1997-1998 Microsoft Corporation. All rights reserved.