NCS_ReadResource

Reads resources available in cluster node, once you call NCS_ListResources.

Syntax

 #include <ncssdk.h> 
  
 NCS_RETURN NCS_ReadResource (
   NCS_HANDLE      Handle,
   NCS_RESOURCE   *pRes,
   UINT32          buf_len);
 

Parameters

Handle

(IN) Specifies the current NCS handle.

pRes

(IN/OUT) Points to the name that must be filled in on call. Uses uniObjName (see NCS_RESOURCE) if available.

buf_len

(IN) Establishes load and unload script buffer length; 2000 bytes is sufficient.

Return Values

Name

Description

SUCCESS

NCS_SUCCESS.

NCS_BAD_PARAMETER

See NDS Error Codes.

NCS_ALLOC_ERROR

Insufficient memory to perform the operation.

Remarks

You pass in a pointer to a structure of type NCS_RESOURCE. The name of the resource for which you need more information is only data that needs to be filled in for this structure. NCS_ReadResource then returns having all other fields in the structure filled in. LoadScript and unloadScript pointers must be allocated of buf_len size.