Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Implementing Pending Operations

If your Online or Offline entry point functions require more than 300 milliseconds, it is recommended that you use a worker thread to perform the operation asynchronously.

The following steps are all required:

Aa370471.wedge(en-us,VS.85).gifTo Implement a Pending Operation

  1. In your Online or Offline entry point function, call ClusWorkerCreate to start a worker thread and return ERROR_IO_PENDING immediately.
  2. Have the thread perform the necessary online or offline tasks.
  3. Periodically call ClusWorkerCheckTerminate to see if the Terminate entry point function has been called.
  4. Use the SetResourceStatus function pointer obtained from the Startup entry point function to report status information to the Resource Monitor.

If the resource does not transition within the time specified by the resource's PendingTimeout property, the Resource Monitor calls the Terminate entry point function.

Example

See Resource DLL Examples.

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.