Share via


WPDObject.onAddChildComplete event

The onAddChildComplete event occurs, and a callback handler is invoked, when an AddChild operation has completed.

Syntax

WPDObject.onAddChildComplete(
  hrStatus,
  childObject
)

Parameters

hrStatus

Contains the overall status of the add operation (success or failure).

childObject

A reference to the newly added child WPDObject.

Return value

This event does not return a value.

Remarks

To enable asynchronous behavior, set the handler for this event before calling the AddChild method.

Examples

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

function HandlerFunction(hrStatus, childObject)
{

   // Code to handle a completed asynchronous AddChild operation.             

}

// Set the event handler.
WPDObject.onAddChildComplete = HandlerFunction;

Requirements

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

See also

WPDObject