Share via


createContainer.onTransferProgress event

The onTransferProgress event indicates the progress of a data transfer operation from an IStream.

Syntax

createContainer.onTransferProgress(
  numBytesTransferred,
  numTotalBytes
)

Parameters

numBytesTransferred

The number of bytes that have been transferred so far.

numTotalBytes

The total number of bytes that will be transferred.

Return value

This event does not return a value.

Remarks

This event will occur only if the Data property is set to a valid IStream, and the AddChild method is called to assign this container object to a parent object and to persist the data. If the Data property is not assigned, this event will not be triggered.

For an example of how to use the onTransferProgress event, see the examples in the topic Asynchronous Functions.

Examples

The following code shows the handler-function syntax for the onTransferProgress event.

function HandlerFunction(numBytesTransferred, numTotalBytes)
{

   // Code to handle an asynchronous transfer operation.              

}

// Set the event handler.
createContainerObject.onTransferProgress = HandlerFunction;

Requirements

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

See also

Creation Container Object

Service Object

Storage Object