Partager via


Creating Resource Types

One of the most common programming tasks for failover clusters is to create a resource type that allows an application, service, or device to be managed as a highly available cluster resource. This section of the documentation contains topics that describe how to create a resource type, and how to perform related tasks such as debugging and deploying resource types.

When to create a resource DLL

Resource DLLs provide more advanced resource availability for failover clusters than the generic resource types. The resource management tasks performed by resource DLLs are more specialized and can be configured to manage hardware, software, and services. You should use a resource DLL if any of these conditions are true:

  • The resource is a device.
  • The resource depends on other resources.
  • The resource manages critical transaction-based data.
  • The resource is stateful.
  • The resource requires special initialization, shutdown, or emergency termination procedures.
  • The resource has unique attributes that should be managed as private properties.
  • The resource has special functionality that should be exposed through user-defined control codes.

When to use the generic application or generic resource type

The generic application and generic service resources types provide basic implementations of the resource DLL entry point functions. These implementations start and stop resources by starting and terminating a process, and look for resource failure by verifying whether the process still exists. Because generic resource types provide more basic implementations than resource DLLs, they should only be when all of these conditions are true:

  • The resource is not a device. The generic resource types are not designed to manage hardware.
  • The resource is stateless.
  • The resource is not dependent on other resources.
  • The resource does not have unique attributes that should be managed with private properties.
  • The resource does not have special functionality that should be exposed through control codes.
  • The resource can be started and stopped easily without using special procedures.

In this section

Implementing Resource DLLs

Create a resource DLL that defines resource types for failover clusters by using specialized resource management tasks.

Using the Generic Script Resource Type

The generic script resource type can be used with applications that can be controlled by a script interface such as an ActiveX object, or WMI.

Implementing Extension DLLs

An extension DLL allows administrators to mange resource types with the Failover Cluster Administrator user interface.

Debugging Resource DLLs

Debug a resource DLL.

Debugging Extension DLLs

Debug an extension DLL for a resource type.

Manually Deploying Resource Types

Manually deploy resource types in order to design and test the resource type.

Creating Setup Applications that Deploy Resource Types

Create a setup application that deploys resource types by installing files, registering the resource types, and initializing groups.

Using the Failover Cluster APIs