Esempio n. 1
0
 /// <summary>
 /// Returns true if any of the handle flds has changed else returns false
 /// </summary>
 public static bool IsChangedStructWithManySHFlds(StructWithManySHFlds s, Int32[] arrInt32s)
 {
     if (SHInt32(s.hnd1) != arrInt32s[0] || SHInt32(s.hnd2) != arrInt32s[1] || SHInt32(s.hnd3) != arrInt32s[2] ||
         SHInt32(s.hnd4) != arrInt32s[3] || SHInt32(s.hnd5) != arrInt32s[4] || SHInt32(s.hnd6) != arrInt32s[5] ||
         SHInt32(s.hnd7) != arrInt32s[6] || SHInt32(s.hnd8) != arrInt32s[7] || SHInt32(s.hnd9) != arrInt32s[8] ||
         SHInt32(s.hnd10) != arrInt32s[9] || SHInt32(s.hnd11) != arrInt32s[10] || SHInt32(s.hnd12) != arrInt32s[11] ||
         SHInt32(s.hnd13) != arrInt32s[12] || SHInt32(s.hnd14) != arrInt32s[13] || SHInt32(s.hnd15) != arrInt32s[14])
     {
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
        /// <summary>
        /// Creates a new StructWithManySHFlds; Fills in arrInt32s with the 32-bit values
        /// of the handle flds of the struct
        /// </summary>
        /// <returns>StructWithManySHFlds</returns>
        public static StructWithManySHFlds NewStructWithManySHFlds(ref Int32[] arrInt32s)
        {
            arrInt32s = new Int32[15]; //size corresponds to the number of flds
            StructWithManySHFlds s = new StructWithManySHFlds();

            s.hnd1        = NewSFH();      //get a new SH
            arrInt32s[0]  = SHInt32(s.hnd1);
            s.hnd2        = NewSFH();      //get a new SH
            arrInt32s[1]  = SHInt32(s.hnd2);
            s.hnd3        = NewChildSFH(); //get a new SH
            arrInt32s[2]  = SHInt32(s.hnd3);
            s.hnd4        = NewSFH();      //get a new SH
            arrInt32s[3]  = SHInt32(s.hnd4);
            s.hnd5        = NewSFH();      //get a new SH
            arrInt32s[4]  = SHInt32(s.hnd5);
            s.hnd6        = NewChildSFH(); //get a new SH
            arrInt32s[5]  = SHInt32(s.hnd6);
            s.hnd7        = NewSFH();      //get a new SH
            arrInt32s[6]  = SHInt32(s.hnd7);
            s.hnd8        = NewSFH();      //get a new SH
            arrInt32s[7]  = SHInt32(s.hnd8);
            s.hnd9        = NewChildSFH(); //get a new SH
            arrInt32s[8]  = SHInt32(s.hnd9);
            s.hnd10       = NewSFH();      //get a new SH
            arrInt32s[9]  = SHInt32(s.hnd10);
            s.hnd11       = NewSFH();      //get a new SH
            arrInt32s[10] = SHInt32(s.hnd11);
            s.hnd12       = NewChildSFH(); //get a new SH
            arrInt32s[11] = SHInt32(s.hnd12);
            s.hnd13       = NewSFH();      //get a new SH
            arrInt32s[12] = SHInt32(s.hnd13);
            s.hnd14       = NewSFH();      //get a new SH
            arrInt32s[13] = SHInt32(s.hnd14);
            s.hnd15       = NewChildSFH(); //get a new SH
            arrInt32s[14] = SHInt32(s.hnd15);

            return(s);
        }