Creating a Custom Resource Type

It is possible to create a new resource type that you can associate with either a cluster-aware or cluster-unaware application. The advantages to creating your own new resource type are:

When you create a new resource type, you should expect the network administrator to combine your new type with a Network Name resource and its dependent resources to create a virtual server that clients can access. Make sure that the network administrator places all of the necessary dependencies in the same group either by checking for this condition in your Cluster Administrator extension or by failing to load the resource DLL if a dependency is missing.

If there are required dependencies for your new resource type, support the CLUSCTL_RESOURCE_GET_REQUIRED_DEPENDENCIES control code in your resource DLL's ResourceControl entry point and CLUSCTL_RESOURCE_TYPE_GET_REQUIRED_DEPENDENCIES in your ResourceTypeControl entry point. Also, check in Online that all required dependencies are available before allowing a resource to be brought online.

For example, suppose your new resource type manages a cluster-aware application that relies on data files. The network administrator might form a virtual server with this application, a Network Name resource, an IP Address resource, and a Physical Disk resource holding the application's data files.

It is recommended that you use the Resource Type AppWizard to create your new resource type. Because the Resource Type AppWizard creates skeletal implementations of all required entry point functions and interface methods, you will save time and effort and be assured that you are starting with working code.

When you use the Resource Type AppWizard, it will ask for parameters. Parameters are information that is specific to your resource type, also known as private properties. When a network administrator runs Cluster Administrator to create a resource of the new type, your Cluster Administrator extension will prompt him or her to enter values for these properties. These values are stored in the cluster database.

    To create a new resource type
  1. Create a resource type project using the Resource Type AppWizard. See Using the Resource Type AppWizard for a step-by-step description of how to create your project.
  2. Prepare your build environment. For more information, see Preparing a Build Environment.
  3. Add code to customize the source files for your resource and Cluster Administrator extension DLLs. See Customizing a Resource DLL.
  4. Build the resource and Cluster Administrator extension DLLs. See Building a Custom Resource Type.
  5. Register your new resource type. For information about resource type registration, see Registering a Resource DLL.
  6. Register your Cluster Administrator extension DLL and the DebugEx Cluster Administrator extension DLL.
  7. Debug your resource DLL. For information about resource DLL debugging, see Debugging a Resource DLL.
  8. Debug your Cluster Administrator extension DLL. For more information, see Debugging a Cluster Administrator Extension DLL.