Previous in Contents Next in Contents

AddCodebase Method

The AddCodebase method first creates an instance of a Codebase class and sets the new object's HREF and Filename properties to the strings passed as arguments to the method. It then adds the dispinterface to the Codebases collection and returns it.

VBScript Syntax

IImplementation.AddCodebase  href [, filename]

Parameters

href

A string to set the HREF property to.

filename

An optional string to set the optional Filename property to.

Return Value

The new Codebase object's dispinterface that was added to the collection.

Remarks

The Codebases collection is an IList dispinterface containing ICodebase dispinterfaces.

Example

' Using Windows Scripting Host and VBScript
Set Impl = CreateObject("Push.Implementation")
oCodebase = Impl.AddCodeBase("URL","filename")
wscript.echo Impl.GetCDFString

produces

<IMPLEMENTATION>
<CODEBASE HREF="http://www.somecompany.com/code"
FILENAME="c:\code\code"/> 
</IMPLEMENTATION>

See Also

Codebases Collection


© 1997-2000 Microsoft Corporation. All rights reserved.