コード例 #1
0
ファイル: Util.cs プロジェクト: joke325/Dotrop
        public static string GetRopString(RopLib rop, int ret, RopHandle ropStr, bool freeBuf = true)
        {
            string sval = RopHandle.Str(ropStr);

            if (freeBuf)
            {
                rop.rnp_buffer_destroy(ropStr);
            }
            if (ret != ROPE.RNP_SUCCESS)
            {
                throw new RopError(ret);
            }
            return(sval);
        }
コード例 #2
0
ファイル: Util.cs プロジェクト: joke325/Dotrop
 public static string[] GetRopStrings(RopLib rop, int ret, RopHandle[] ropStrs, bool freeBuf = true)
 {
     string[] svals = new string[ropStrs.Length];
     for (int idx = 0; idx < ropStrs.Length; idx++)
     {
         svals[idx] = RopHandle.Str(ropStrs[idx]);
         if (freeBuf)
         {
             rop.rnp_buffer_destroy(ropStrs[idx]);
         }
     }
     if (ret != ROPE.RNP_SUCCESS)
     {
         throw new RopError(ret);
     }
     return(svals);
 }