Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Implementing Pending Operations
Collapse the table of content
Expand the table of content

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.

 

 

Show:
© 2015 Microsoft