handle_to_integerT_handle_to_integerHandleToIntegerHandleToInteger (Operator)

Name

handle_to_integerT_handle_to_integerHandleToIntegerHandleToInteger — Convert a handle into an integer.

Warning

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

Signature

handle_to_integer( : : Handle : CastedHandle)

Herror T_handle_to_integer(const Htuple Handle, Htuple* CastedHandle)

void HandleToInteger(const HTuple& Handle, HTuple* CastedHandle)

static void HOperatorSet.HandleToInteger(HTuple handle, out HTuple castedHandle)

Description

handle_to_integerhandle_to_integerHandleToIntegerHandleToIntegerHandleToInteger converts the handle HandleHandleHandleHandlehandle into an integer representation and returns it in CastedHandleCastedHandleCastedHandleCastedHandlecastedHandle.

If the legacy handle mode is disabled (the default), the ownership of the handle is not transferred. Once all instances of the handle, such as in the tuple HandleHandleHandleHandlehandle, were overwritten, the handle and its content will be destroyed and CastedHandleCastedHandleCastedHandleCastedHandlecastedHandle will become invalid. In that case, if CastedHandleCastedHandleCastedHandleCastedHandlecastedHandle should be passed to code parts that run in legacy handle mode, a reference to the original HandleHandleHandleHandlehandle must be kept in order to avoid clearing the handle.

If the legacy handle mode is enabled, the ownership of the handle is transferred. The handle must then be cleared using clear_handleclear_handleClearHandleClearHandleClearHandle or the clear operator of the corresponding semantic type of the handle.

Attention

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

Execution Information

Parameters

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

The handle to be casted.

CastedHandleCastedHandleCastedHandleCastedHandlecastedHandle (output_control)  pointer(-array) HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

The handle casted to an integer value.

Result

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

See also

integer_to_handleinteger_to_handleIntegerToHandleIntegerToHandleIntegerToHandle

Module

Foundation