integer_to_handleT_integer_to_handleIntegerToHandleIntegerToHandle (Operator)


integer_to_handleT_integer_to_handleIntegerToHandleIntegerToHandle — Convert an integer into a handle.


It is not recommended to use this operator in HDevelop. This operator is only provided for reasons of backward compatibility.


integer_to_handle( : : IntegerHandle : Handle)

Herror T_integer_to_handle(const Htuple IntegerHandle, Htuple* Handle)

void IntegerToHandle(const HTuple& IntegerHandle, HTuple* Handle)

static void HOperatorSet.IntegerToHandle(HTuple integerHandle, out HTuple handle)


integer_to_handleinteger_to_handleIntegerToHandleIntegerToHandleIntegerToHandle converts the integer IntegerHandleIntegerHandleIntegerHandleIntegerHandleintegerHandle, that represents a handle, to a handle of type HANDLE_PAR and returns it in HandleHandleHandleHandlehandle. This allows to convert handles created in code parts where the legacy handle mode is enabled into proper handles.

If the legacy handle mode is disabled (the default), the ownership of the handle is transferred onto the handle. In this case, the handle will automatically be cleared once all references to that handle, such as in the tuple HandleHandleHandleHandlehandle, are overwritten. In that case, if the original IntegerHandleIntegerHandleIntegerHandleIntegerHandleintegerHandle should continue to be used, a reference to the returned HandleHandleHandleHandlehandle must be kept in order to avoid clearing the handle.

If the legacy handle mode is enabled, the returned value will again be an integer. Additionally, the handle must then be cleared using clear_handleclear_handleClearHandleClearHandleClearHandle or the clear operator of the corresponding semantic type of the handle.


It is not recommended to use this operator in HDevelop. This operator is solely provided to enable backward compatibility with legacy code.

Execution Information

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.


IntegerHandleIntegerHandleIntegerHandleIntegerHandleintegerHandle (input_control)  pointer(-array) HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

The handle as integer.

HandleHandleHandleHandlehandle (output_control)  handle(-array) HHandle, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

The handle as handle.


If the parameters are valid, the operator integer_to_handleinteger_to_handleIntegerToHandleIntegerToHandleIntegerToHandle returns the value 2 (H_MSG_TRUE). Otherwise, an exception is raised.

See also