示例#1
0
 public static List <byte> GetList(ref List <byte> rList, long L, int nIndex)
 {
     try
     {
         long VM = FCLibHelper.fc_get_vm_ptr(L);
         if (rList == null)
         {
             rList = new List <byte>();
         }
         else
         {
             rList.Clear();
         }
         long   ptr        = FCLibHelper.fc_get_param_ptr(L, nIndex);
         int    nArraySize = FCLibHelper.fc_get_array_size(ptr);
         byte[] buffer     = new byte[nArraySize];
         FCLibHelper.fc_get_array_byte(ptr, buffer, 0, nArraySize);
         rList.AddRange(buffer);
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
     return(rList);
 }
示例#2
0
    //----------------------------------------------------------------------------
    public static byte[] GetArray(ref byte[] rList, long L, int nIndex)
    {
        long ptr        = FCLibHelper.fc_get_param_ptr(L, nIndex);
        int  nArraySize = FCLibHelper.fc_get_array_size(ptr);

        rList = new byte[nArraySize];
        FCLibHelper.fc_get_array_byte(ptr, rList, 0, nArraySize);
        return(rList);
    }
示例#3
0
 public static byte[] GetArray(ref byte[] rList, long L, int nIndex)
 {
     try
     {
         long ptr        = FCLibHelper.fc_get_param_ptr(L, nIndex);
         int  nArraySize = FCLibHelper.fc_get_array_size(ptr);
         rList = new byte[nArraySize];
         FCLibHelper.fc_get_array_byte(ptr, rList, 0, nArraySize);
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
     return(rList);
 }
示例#4
0
    public static List <byte> GetList(ref List <byte> rList, long L, int nIndex)
    {
        if (rList == null)
        {
            rList = new List <byte>();
        }
        else
        {
            rList.Clear();
        }
        long ptr        = FCLibHelper.fc_get_param_ptr(L, nIndex);
        int  nArraySize = FCLibHelper.fc_get_array_size(ptr);

        byte[] buffer = new byte[nArraySize];
        FCLibHelper.fc_get_array_byte(ptr, buffer, 0, nArraySize);
        rList.AddRange(buffer);
        return(rList);
    }