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

ParsePropertyValue_r() public static method

Parse PropertyValue_r structure.
public static ParsePropertyValue_r ( IntPtr ptr ) : PropertyValue_r
ptr System.IntPtr A pointer points to the allocated memory.
return PropertyValue_r
        public static PropertyValue_r ParsePropertyValue_r(IntPtr ptr)
        {
            PropertyValue_r protertyValue = new PropertyValue_r();

            int offset = 0;

            protertyValue.PropTag = (uint)Marshal.ReadInt32(ptr, offset);
            offset += sizeof(uint);

            protertyValue.Reserved = (uint)Marshal.ReadInt32(ptr, offset);
            offset += sizeof(uint);

            IntPtr newPtr = new IntPtr(ptr.ToInt32() + offset);
            protertyValue.Value = ParsePROP_VAL_UNION(newPtr, (PropertyTypeValue)(protertyValue.PropTag & 0x0000FFFF));

            return protertyValue;
        }