internal static V_RESULT CopyOut(ref v_incompatibleQosInfo from, OfferedIncompatibleQosStatus to)
        {
            to.TotalCount       = from.totalCount;
            to.TotalCountChange = from.totalChanged;
            to.LastPolicyId     = (QosPolicyId)from.lastPolicyId;
            if (from.totalCount > 0)
            {
                int arrSize = 0;
                for (int i = 0; i < Constants.V_POLICY_ID_COUNT; i++)
                {
                    int v = from.policyCount[i];

                    if (v != 0)
                    {
                        arrSize++;
                    }
                }

                int n = 0;
                to.Policies = new QosPolicyCount[arrSize];
                for (int i = 0; i < Constants.V_POLICY_ID_COUNT; i++)
                {
                    int v = from.policyCount[i];

                    if (v != 0)
                    {
                        to.Policies[n]          = new QosPolicyCount();
                        to.Policies[n].PolicyId = (QosPolicyId)i;
                        to.Policies[n].Count    = v;
                        n++;
                    }
                }
            }
            return(V_RESULT.OK);
        }
        internal static V_RESULT CopyOut(IntPtr fromPtr, IntPtr toPtr)
        {
            v_incompatibleQosInfo from = (v_incompatibleQosInfo)Marshal.PtrToStructure(fromPtr, type);

            GCHandle toGCHandle             = GCHandle.FromIntPtr(toPtr);
            OfferedIncompatibleQosStatus to = toGCHandle.Target as OfferedIncompatibleQosStatus;

            V_RESULT result = CopyOut(ref from, to);

            toGCHandle.Target = to;
            return(result);
        }
        internal static V_RESULT CopyOut(ref v_incompatibleQosInfo from, RequestedIncompatibleQosStatus to)
        {
            to.TotalCount       = from.totalCount;
            to.TotalCountChange = from.totalChanged;
            to.LastPolicyId     = (QosPolicyId)from.lastPolicyId;
            if (from.totalCount > 0)
            {
                int arrSize = 0;
                for (int i = 0; i < Constants.V_POLICY_ID_COUNT; i++)
                {
//                    int v = BaseMarshaler.ReadInt32(from.policyCount, i * 4); // Offset = index * sizeof(int)
                    int v = from.policyCount[i];
                    if (v != 0)
                    {
                        arrSize++;
                    }
                }

                int n = 0;
                to.Policies = new QosPolicyCount[arrSize];
                for (int i = 0; i < Constants.V_POLICY_ID_COUNT; i++)
                {
//                    int v = BaseMarshaler.ReadInt32(from.policyCount, i * 4); // Offset = index * sizeof(int)
                    int v = from.policyCount[i];

                    if (v != 0)
                    {
                        to.Policies[n]          = new QosPolicyCount();
                        to.Policies[n].PolicyId = (QosPolicyId)i;
                        to.Policies[n].Count    = v;
                        n++;
                    }
                }
            }
            return(V_RESULT.OK);
        }