User-Defined Type Functions

ihuUserDefinedTypeAdd

Use the ihuUserDefineTypeAdd function to create or add MultiField type tags. The user-defined type you pass to this function can have multiple fields defined, or you can add fields later by using ihUserDefinedTypeSetProperties().

You can also use this function to modify user-defined data types. To modify an existing type, add a user-defined data type with the same name.

Prototype

ihuUserDefinedTypeAdd
(
long serverhandle, // [in] connected server handle
ihuUserDefinedTypeProperties *InUserDefinedType //[in] UserDefined type that needs to be added / modified
)

Remarks

Existing types are overwritten by new types with the same names. You must be a member of the ihTag Admin group to add or modify a type.

Returns

  • ihuSTATUS_OK: on success
  • ihuSTATUS_INVALID_PARAMETER: NULL value or invalid server handle
  • ihuSTATUS_FAILED: on any error

ihuUserDefinedTypeDelete

Use the ihuUserDefinedTypeDelete function to delete a user-defined type that you no longer use.

Prototype

ihuUserDefinedTypeDelete
(
long serverhandle, // [in] connected server handle
MSO_Char * UserDefinedTypeName //[in] UserDefined type name to be deleted
)

Remarks

You must be a member of the ihTag Admin group to delete a type.

Returns

  • ihuSTATUS_OK: on success
  • ihuSTATUS_INVALID_PARAMETER: NULL value or invalid server handle
  • ihuSTATUS_FAILED: on any error

ihuUserDefinedTypeRename

Use the ihuUserDefinedTypeRename function to rename a user-defined type.

Prototype

ihuUserDefinedTypeRename
(
long serverhandle, // [in] connected server handle
MSO_Char * UserDefinedTypeName, //[in] UserDefined type name which needs to be renamed
MSO_Char *NewUserDefinedTypeName //[in] new UserDefined type name
)

Remarks

You must be a member of the ihTag Admin group to rename a type.

Returns

  • ihuSTATUS_OK: on success
  • ihuSTATUS_INVALID_PARAMETER: NULL value or invalid server handle
  • ihuSTATUS_FAILED: on any error

ihuUserDefinedTypeExists

Use the ihuUserDefinedTypeExists function to check whether a specific user-defined type exists.

Prototype

ihuUserDefinedTypeExists
(
long serverhandle, // [in] connected server handle
MSO_Char * UserDefinedTypeName // [in] UserDefined type name
)

Returns

  • ihuSTATUS_OK: if the type exists
  • ihuSTATUS_INVALID_PARAMETER: NULL value or invalid server handle
  • ihuSTATUS_FAILED: if the type does not exist or the server cannot be reached

ihuGetUserDefinedTypes

Use the ihuGetUserDefinedTypes function to return a list of user-defined types and their values. After you call this function, you must call ihuUserDefinedTypeFreeProperties() to release memory allocations.

Prototype

ihuGetUserDefinedTypes
(
long serverhandle, // [in] connected server handle
MSO_Char *StructSetMask, //[in] Pass * to get the all the Structure or pass the name of the structure you want
long *numberofrecords, //[out] Number of records
ihuUserDefinedTypeRecordSet *RecordSet //[out] returns the records for the UserDefined defined types
)

Remarks

You must be a member of the ihReader group to get a list of user-defined types. The list is returned in the RecordSet parameter.

Returns

  • ihuSTATUS_OK: on success
  • ihuSTATUS_INVALID_PARAMETER: NULL value passed for StructSetMask or RecordSet or numberofrecords
  • ihuSTATUS_FAILED: on any error

ihuUserDefinedTypeSetProperties

Use the ihuUserDefinedTypeSetProperties function to set user-defined type properties after you add types by using ihuUserDefinedTypeAdd().

Prototype

ihuUserDefinedTypeSetProperties
(
long serverhandle, // [in] connected server handle
ihuUserDefinedTypeProperties *UserDefinedType //[in] UserDefined type that needs to be added / created
)

Remarks

You must be a member of the ihTag Admin group to set type properties.

Returns

  • ihuSTATUS_OK: on success
  • ihuSTATUS_INVALID_PARAMETER: invalid server handle or NULL property pointer value passed
  • ihuSTATUS_FAILED: on any error

ihuUserDefinedTypeFreeProperties

Use the ihuUserDefinedTypeFreeProperties function to free the memory allocated by the ihuGetUserDefinedTypes() function.

Prototype

ihuUserDefinedTypeFreeProperties
(
ihuUserDefinedTypeRecordSet *UserDefinedTypeRecordSet //[in] UserDefinedTypeRecordSet that needs to be fr
)

Remarks

Call the ihuUserDefinedTypeFreeProperties function once to release all memory in the recordset returned by ihuGetUserDefinedTypes(). Do not free the memory in your program.

Returns

Void