AddUsage Method

The AddUsage method first creates an instance of the Usage class and sets the new object's Type and Content properties to the strings passed as arguments to the method. It then adds the associated dispinterface to the Usages collection and returns it.

VBScript Syntax

IObject.AddUsage type [, content]

Parameters

type (VT_BSTR)

The string to set the Type property on the new class Usage object.

content (VT_BSTR)

The optional string to set the Content property on the new class Usage object.

Return Value

The IUsage dispinterface added to the collection (VT_DISPATCH).

Example

VBScript and Windows Scripting Host

Set oChannel = CreateObject("Push.Channel")
Set Usage = oChannel.AddUsage("screensaver")

See Also

The Usage Class


© 1997-1998 Microsoft Corporation. All rights reserved.