HP Operations Manager for Windows

opcdata_copy()


   #include opcapi.h

   int opcdata_copy(
          const         opcdata data,           /* in */
          opcdata       *copy                   /* out */
                   );

Parameters

data
HPOM data structure that will be copied.

copy
Copy of data.

Description

The API creates a copy of the data area and returns it in copy. It creates a complete copy, that is, the string fields of data are copied and not shared between data and copy. The allocated memory has to be deallocated using opcdata_free() before using this function.

Return Values

OPC_ERR_OK:
OK

OPC_ERR_INVALID_INPARAM:
data is NULL or of wrong type

OPC_ERR_INVALID_OUTPARAM:
copy is invalid; probably NULL

OPC_ERR_NO_MEMORY:
memory allocation failed

Versions

HPOM for Windows A.07.50 and later

See Also

HPOM Data Structures