コード例 #1
0
        public static IntPtr ReadOffset(this PPTMemory pm, IntPtr pOffset, params Int32[] offsets)
        {
            IntPtr candidate = pOffset;

            foreach (Int32 tokenOffset in offsets)
            {
                try
                {
                    candidate = new IntPtr(pm.ReadInt32(candidate) + tokenOffset);
                }
                catch
                {
                    throw new InvalidOperationException(string.Format("ReadOffset for {0} broken, ({1})", pOffset, tokenOffset));
                }
            }
            return(candidate);
        }
コード例 #2
0
 public static Int32 ReadInt32(this PPTMemory pm, IntPtr pOffset, params Int32[] offsets)
 {
     return(pm.ReadInt32(pm.ReadOffset(pOffset, offsets)));
 }