When a native function or delegate encounters an error with the arguments sent,
the last reference parameter should be set to the appropriate enum value.
A specific exception can be thrown by setting the flag to RETURN_VALUE_IS_EXCEPTION and
returning a string.
When a native function or delegate encounters an error with the arguments sent, the last reference parameter should be set to the appropriate enum value. A specific exception can be thrown by setting the flag to RETURN_VALUE_IS_EXCEPTION and returning a string.