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] |