This topic has not yet been rated - Rate this topic

Service.onMethodComplete event

The onMethodComplete event occurs after a service-defined method has completed.

Syntax


Service.onMethodComplete(
  MethodResult
)

Parameters

MethodResult

Contains the result of the service-defined method.

Return value

This event does not return a value.

Remarks

The name and parameters of this method are defined by the service. For example, if a service defines a method with the name DoSomething, WPD Automation will expose a method complete handler called service.onDoSomethingComplete. You can assign a JScript function to the method complete handler to be notified whenever this method has completed. Setting this handler will result in the method being called asynchronously rather than synchronously.

Examples

The following code shows the handler-function syntax for the onMethodComplete event. In this example, the name of the service-defined method is DoSomething.


function HandlerFunction(MethodResult)
{

   // Code to handle a completed asynchronous method operation.             

}

// Set the event handler.
Service.onDoSomethingComplete = HandlerFunction;


Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

See also

Service Object

 

 

Send comments about this topic to Microsoft

Build date: 10/27/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.