コード例 #1
0
 /// <summary>
 /// �õ���άƫ���������ָ��
 /// </summary>
 /// <param name="pSrc">Դָ��</param>
 /// <param name="idx1">[1]����ֵ</param>
 /// <param name="PointerOffset1">[1]ָ��ƫ�Ʊ�������</param>
 /// <param name="idx2">[2]����ֵ</param>
 /// <param name="PointerOffset2">[2]ָ��ƫ�Ʊ�������</param>
 /// <param name="idx3">[3]����ֵ</param>
 /// <param name="PointerOffset3">[3]ָ��ƫ�Ʊ�������</param>
 /// <returns>�������ָ��</returns>
 public static unsafe byte* ItfPtr3D(byte* pSrc,
     int idx1, IPointerOffset PointerOffset1,
     int idx2, IPointerOffset PointerOffset2,
     int idx3, IPointerOffset PointerOffset3)
 {
     Debug.Assert(null != PointerOffset1, "PointerOffset1 is null!");
     Debug.Assert(null != PointerOffset2, "PointerOffset2 is null!");
     Debug.Assert(null != PointerOffset3, "PointerOffset3 is null!");
     byte* p = pSrc;
     if (PointerOffset1.PtrEx(out p, p, idx1))
     {
         if (PointerOffset2.PtrEx(out p, p, idx2))
         {
             if (PointerOffset3.PtrEx(out p, p, idx3))
             {
                 //
             }
         }
     }
     return p;
 }
コード例 #2
0
 /// <summary>
 /// �õ�һάƫ���������ָ��
 /// </summary>
 /// <param name="pSrc">Դָ��</param>
 /// <param name="idx1">[1]����ֵ</param>
 /// <param name="PointerOffset1">[1]ָ��ƫ�Ʊ�������</param>
 /// <returns>�������ָ��</returns>
 public static unsafe byte* ItfPtr1D(byte* pSrc, int idx1, IPointerOffset PointerOffset1)
 {
     Debug.Assert(null != PointerOffset1, "PointerOffset1 is null!");
     return PointerOffset1.Ptr(pSrc, idx1);
 }