NCS_FindResource

Finds a resource given a volume name or unique string, then the resource name and FDN uniObj Name are filled in the return pRes structure.

Syntax

 #include <ncssdk.h> 
  
 NCS_RETURN NCS_FindResource (
   NCS_HANDLE      Handle,
   UINT8          *VolName,
   UINT32          AnyStringFlag,
   NCS_RESOURCE   *pRes);
 

Parameters

Handle

(IN) Specifies the handle supplied by NCS.

VolName

(IN) Points to the case sensitive name of the volume referenced by a cluster resource.

AnyStringFlag

(IN) If the flag is false, look for a command in the cluster resource load script that matches the <Volume Name> string. If true, the string passed in by VolName is <Any String>, not <Volume Name>.

pRes

(OUT) Points to the cluster resource that must be filled in on call. Uses uniObj Name if available.

Return Values

Name

Description

NCS_RESOURCE_FOUND

A cluster resource was found in the load script.

NCS_RESOURCE_NOT_FOUND

A cluster resource was not found in the load script.

Remarks

NCS_FindResource has two selection criteria:

  1. Look for a cluster resource in the load script that contains a volume by name, enabled by passing in false in AnyStringFlag

  2. Look for any cluster resource in the load script that contains a string with any name, enabled by passing in true in AnyStringFlag.

If a cluster resource is found that satisfies either of these criteria, a pointer returns to that resource in pRes. Use NCS_ReadResource to get static information or NCS_ResourceControl to get or set runtime values.

IMPORTANT:The volume and any string names are case sensitive.