Microsoft.Protocols.TestSuites.MS_OXORULE.AdapterHelper.ParseStat C# (CSharp) Method

ParseStat() public static method

Parse a STAT structure instance from pointer.
public static ParseStat ( IntPtr ptr ) : STAT
ptr System.IntPtr Pointer points to the memory.
return STAT
        public static STAT ParseStat(IntPtr ptr)
        {
            STAT stat = new STAT();
            int offset = 0;

            stat.SortType = (uint)Marshal.ReadInt32(ptr, offset);
            offset += sizeof(int);

            stat.ContainerID = (uint)Marshal.ReadInt32(ptr, offset);
            offset += sizeof(int);

            stat.CurrentRec = (uint)Marshal.ReadInt32(ptr, offset);
            offset += sizeof(int);

            stat.Delta = Marshal.ReadInt32(ptr, offset);
            offset += sizeof(int);

            stat.NumPos = (uint)Marshal.ReadInt32(ptr, offset);
            offset += sizeof(int);

            stat.TotalRecs = (uint)Marshal.ReadInt32(ptr, offset);
            offset += sizeof(int);

            stat.CodePage = (uint)Marshal.ReadInt32(ptr, offset);
            offset += sizeof(int);

            stat.TemplateLocale = (uint)Marshal.ReadInt32(ptr, offset);
            offset += sizeof(int);

            stat.SortLocale = (uint)Marshal.ReadInt32(ptr, offset);

            return stat;
        }