ResUtilGetResourceNameDependency

The ResUtilGetResourceNameDependency utility function returns a handle to a dependent resource with a specified name and type.

HRESOURCE WINAPI ResUtilGetResourceNameDependency(
  LPCWSTR lpszResourceName,
  LPCWSTR lpszResourceType  
);
 

Parameters

lpszResourceName
[in] Pointer to the name of the resource whose dependency is to be retrieved.
lpszResourceType
[in] Pointer to the type of the dependent resource.

Return Values

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

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

Notes to Callers

ResUtilGetResourceNameDependency returns the name of a dependent resource by calling:

  1. OpenCluster to open the current cluster.
  2. OpenClusterResource to open the resource pointed to by lpszResourceName.
  3. ClusterResourceOpenEnum with dwType set to CLUSTER_RESOURCE_ENUM_DEPENDS to open the appropriate enumerator.
  4. ClusterResourceEnum to enumerate a dependent resource.
  5. OpenClusterResource to open the enumerated resource.
  6. 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 4 through 6 are repeated.

For more information, see ResUtilGetResourceDependency.

QuickInfo

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