ResUtilGetResourceDependency

The ResUtilGetResourceDependency utility function returns a handle to a dependent resource of a specified type.

HRESOURCE WINAPI ResUtilGetResourceDependency(
  HANDLE hSelf,
  LPCWSTR lpszResourceType  
);
 

Parameters

hSelf
[in] Handle to the resource upon which the dependent resource depends.
lpszResourceType
[in] Pointer to the type of the dependent resource.

Return Values

If the operation was successful, ResUtilGetResourceDependency returns a handle to the dependent resource. The caller is responsible for closing that handle by calling CloseClusterResource.

If the operation was unsuccessful, ResUtilGetResourceDependency returns NULL. A call can be made to the Win32 function GetLastError for more information.

Notes to Callers

ResUtilGetResourceDependency returns the name of a dependent resource by calling:

  1. OpenCluster to open the current cluster.
  2. ClusterResourceOpenEnum with dwType set to CLUSTER_RESOURCE_ENUM_DEPENDS to open the appropriate enumerator for the resource identified by hSelf.
  3. ClusterResourceEnum to enumerate a dependent resource.
  4. OpenClusterResource to open the enumerated resource.
  5. ResUtilResourceTypesEqual to compare the type of the enumerated resource with the type pointed to by lpszResourceType. If it matches, a handle to the dependent resource is returned. If it does not match, steps 3 through 5 are repeated.

QuickInfo

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