Creation Container object

The Creation Container object is used to temporarily hold properties and data that must be set during the creation of a new object. It does not represent an actual object on the device.

A Creation Container object is created when the Storage.CreateNewObject method or the Service.CreateNewObject method is called. The properties of the Creation Container are used to set property values and data for the creation of a new WPDObject. However, a new object is not created, and the values and data set in the Creation Container are not persisted until the Creation Container is passed as a parameter to the AddChild method.

This JScript example demonstrates creating a Creation Container, setting the properties and data in the Creation Container, and persisting the properties and data by calling the Service.AddChild method.

var createContainer = serviceObject.CreateNewObject("Mp3");

// Set the value of some service-defined properties.
createContainer.MusicAlbum = "Album Name";
createContainer.MusicArtist = "Artist Name";

// Receive object data from a completed XML HTTP Request and use the
// Data property to assign it to the createContainer.
var stream = xmlHttpRequest.getResponseStream();
createContainer.Data = stream;

// This method creates a new WPDObject (in this case, a Service object)
// using the properties and data in the createContainer, and adds it to
// the parent object.
serviceObject.AddChild(createContainer);

Members

The Creation Container object has these types of members:

  • Events
  • Properties

Events

The Creation Container object has these events.

Event Description
onTransferProgress

Indicates the progress of a data transfer operation from an IStream.

 

Properties

The Creation Container object has these properties.

Property Access type Description

Data

Write-only

Assigns an IStream returned by IXMLHttpRequest.getResponseStream to add data to this Creation Container object.

ServiceProperty

Write-only

Sets the value of a service-defined property on this Creation Container object.

WpdProperty

Write-only

Sets the value of a predefined WPD property on this Creation Container object.

 

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

See also

About the Creation Container Object

Service Object

Storage Object

WPD Automation Reference

WPDObject