ResourceCallback

The ResourceCallback function is called by the cluster utility function ResUtilEnumResources for each resource that it enumerates to perform resource-specific tasks.

DWORD ResourceCallback(
  RESOURCE_HANDLE hOriginal,   
  RESOURCE_HANDLE hResource,  
  PVOID lpParams   
);
 

Parameters

hOriginal
[in] Handle identifying the original resource, the resource identified by hSelf in ResUtilEnumResources. If hSelf is specified as NULL, hOriginal will also be NULL.
hResource
[in] Handle to a resource of the same type as the original resource.
lpParams
[in] Pointer to the parameter passed to ResUtilEnumResources.

Return Values

ERROR_STATUS
The operation associated with the ResourceCallback function was successful.
If the operation is unsuccessful, ResourceCallback returns one or more Win32 error values that are appropriate for the functionality included in the callback. For example, the IIS Virtual Root resource DLL's implementation of ResourceCallback returns ERROR_DUP_NAME for a duplicate resource error and ERROR_INVALID_PARAMETER for a parameter error.

Notes to Implementers

If a non-NULL value is specified for hSelf in the call to ResUtilEnumResources, your ResourceCallback function will be invoked for each resource except the hSelf resource. Also, if lpszResourceType is specified in the call to ResUtilEnumResources, it will only be called for resources of that type.

Implement whatever tasks make sense for your resource DLL. For example, Cluster Server's Print Spooler resource DLL checks that the group for the resource contains a single Print Spooler resource. The IIS Virtual Root resource DLL validates that the resource's properties are unique and returns ERROR_DUP_NAME if the resource is the same as the resource identified by hOriginal.

QuickInfo

  Version: Use Windows NT Server Enterprise Edition 4.0.
  Windows CE: Unsupported.
  Header: Declared in resapi.h.