Share via


Storage object

The Storage object represents an individual legacy storage on the device and provides access to the properties that are exposed by the storage.

A Storage object is retrieved by using a zero-based numeric index into Device.Storages, which is a collection of all the storages on the device.

var storageObject = deviceObject.Storages[0];

Members

The Storage object has these types of members:

Events

The Storage object has these events.

Event Description
onAddChildComplete Occurs when a Storage.AddChild operation has completed.
onGetChildrenByFormatComplete Occurs when a Storage.GetChildrenByFormat method operation has completed.
onObjectAdded Occurs after an object has been added to this Storage object.
onObjectRemoved Occurs after an object has been removed from this Storage object.
onObjectUpdated Occurs after an object has been updated on this Storage object.
onRemoveChildComplete Occurs when a Storage.RemoveChild operation has completed.

Methods

The Storage object has these methods.

Method Description
AddChild Adds a WPDObject obtained from the Storage.CreateNewObject method, as a child of this Storage object.
CreateNewObject Creates and initializes a WPDObject to the specified data format.
GetChildrenByFormat Returns a collection of the immediate children of this Storage object filtered by one or more formats.
RemoveChild Removes a child object from this Storage object.

Properties

The Storage object has these properties.

Property Access type Description
Children
Read-only
Gets a collection of all of the immediate children of this Storage object.
WpdProperty
Read/write
Gets or sets a predefined WPD property on this Storage object.

Requirements

Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
Windows Server 2008 R2 [desktop apps only]

See also

About the Storage Object

Device Object

WPD Automation Reference

WPDObject