internal static V_RESULT CopyOut(ref v_handle_s from, ref InstanceHandle to)
        {
            IntPtr   instance;
            V_RESULT result = V_RESULT.INTERNAL_ERROR;

            if (from.server == IntPtr.Zero && from.index == 0 && from.serial == 0)
            {
                to     = 0;
                result = V_RESULT.OK;
            }
            else
            {
                if (v_handle.Claim(from, out instance) == v_handleResult.V_HANDLE_OK)
                {
                    to = User.InstanceHandle.New(instance);
                    if (v_handle.Release(from) == v_handleResult.V_HANDLE_OK)
                    {
                        result = V_RESULT.OK;
                    }
                }
            }

            return(result);
        }
Esempio n. 2
0
 internal static extern v_handleResult Release(v_handle_s handle);
Esempio n. 3
0
 internal static extern v_handleResult Claim(v_handle_s handle, out IntPtr o);