Previous in Contents Next in Contents

GetCDFStringForChannel Method

The GetCDFStringForChannel method builds and returns the CDF string defined by this Channel object only.

VBScript Syntax

IChannel.GetCDFStringForChannel 
IProject 
 [, ISchedule 
   [, ILogTarget 
      [, fTopLevel ] ] ]

Parameters

IProject (VT_DISPATCH)

An IProject dispinterface

ISchedule (VT_DISPATCH)

An optional ISchedule dispinterface

ILogTarget (VT_DISPATCH)

An optional ILogTarget dispinterface

fTopLevel (VT_I4)

An optional flag specifying whether to build a <GENERATED-BY> element.

Return Value

The CDF formatted string (VT_BSTR)

Remarks

This method differs from GetCDFString only in that it does not enumerate and call GetCDFString on the dispinterfaces contained in the Items, Subchannels, and SoftwarePackages collections. All other collections are used to generate their corresponding elements.

Example

VBScript and Windows Scripting Host

Set IProject = CreateObject("Push.Project")
Set ISchedule = CreateObject("Push.Schedule")
Set ILogTarget = CreateObject("Push.LogTarget")

Set ITopChan = IDispProject.Channel
ITopChan.Title = "Top Channel"
ITopChannel.Base = "http://someserver/channel/"

ITopChan.Addsubchannel
ITopChan.AddItem
ITopChan.AddSoftwarePackage

wscript.echo IDispTopChan.GetCDFStringForChannel(IProject, ISchedule, ILogTarget, 1)

This example code produces the following CDF string:


<CHANNEL BASE="http://someserver/channel/">
<TITLE>Top Channel</TITLE>
<SCHEDULE></SCHEDULE>
<LOGTARGET></LOGTARGET>
<GENERATED-BY/>
</CHANNEL>

See Also

GetCDFString Method


© 1997-2000 Microsoft Corporation. All rights reserved.