共用方式為


Implementing Resource DLLs

For each resource type supported by your resource DLL, you must provide implementations for all of the entry point functions except for Arbitrate and Release. You need to implement Arbitrate and Release only if your resource type is quorum-capable.

Implementing a resource DLL involves tasks that are qualified as follows:

  • Required: Your implementation must perform these tasks or the resource type or resource DLL will not function.
  • Recommended: Although not strictly required, these tasks are recommended for convenience, optimization, or improved performance.
  • Optional: Identifies tasks you can perform as a matter of preference.

To implement a resource DLL

  1. Required: Implement DllMain and Startup to initialize the DLL and each supported resource type. See Performing Initialization.
  2. Required: Implement Open and Close to manage the creation and deletion of resource instances. See Managing Instances.
  3. Required: Implement Online, Offline, and Terminate to start and stop resource instances on demand. See Managing State Transitions.
  4. Required: Implement IsAlive and LooksAlive to detect and respond to possible resource failures. See Detecting Resource Failure.
  5. Required: Implement ResourceControl and ResourceTypeControl to handle control codes. See Supporting Control Codes.

For an example, see the ClipBookServer sample (previously known as ClipBook) that is included with the Windows SDK.