Cancels a running operation.
- operation [in, out]
A pointer to an operation handle that was returned from a call to one of the MI_Session operation functions. For asynchronous callbacks, this value can be the operation handle that is passed into the callback.
MI_CancellationReason enumeration value.
This function does not return a value.
Cancellation is asynchronous. Cancelled operations still need to be closed. Cancellation will cause the operation to finish as soon as possible. For an asynchronous operation, this will cause final callback to happen with the final result. For a synchronous operation, the final result should be available soon.
After cancellation, there may be more than just one result, because cancellation happens as soon as possible, so a few extra results may still get delivered. Not all operation cancellations get through to the provider for notification, though. (For example, enum can, but invoke cannot.) The client does disconnect from the server as soon as possible, though, so it will not wait for the entire operation to complete before giving a final result. Because not all operation cancellation can get to the server, it means that if the operation is taking quota (in terms of running operations, memory usage, and so on), then new operations may possibly fail with quota violations until the provider finally realizes the operation is canceled, and it shuts itself down.
Minimum supported client
Minimum supported server
|Windows Server 2012|
|Windows Management Framework 3.0 on Windows Server 2008 R2 with SP1, Windows 7 with SP1, and Windows Server 2008 with SP2|
Build date: 11/18/2013