private static unsafe ENLINK ConvertFromENLINK64(ENLINK64 es64) { var enlink = new ENLINK(); fixed(byte *numRef = es64.contents) { enlink.nmhdr = new NMHDR(); enlink.charrange = new CHARRANGE(); enlink.nmhdr.hwndFrom = Marshal.ReadIntPtr((IntPtr)numRef); enlink.nmhdr.idFrom = Marshal.ReadIntPtr((IntPtr)(numRef + 8)); enlink.nmhdr.code = Marshal.ReadInt32((IntPtr)(numRef + 0x10)); enlink.msg = Marshal.ReadInt32((IntPtr)(numRef + 0x18)); enlink.wParam = Marshal.ReadIntPtr((IntPtr)(numRef + 0x1c)); enlink.lParam = Marshal.ReadIntPtr((IntPtr)(numRef + 0x24)); enlink.charrange.cpMin = Marshal.ReadInt32((IntPtr)(numRef + 0x2c)); enlink.charrange.cpMax = Marshal.ReadInt32((IntPtr)(numRef + 0x30)); } return(enlink); }
private static unsafe ENLINK ConvertFromENLINK64(ENLINK64 es64) { var enlink = new ENLINK(); fixed (byte* numRef = es64.contents) { enlink.nmhdr = new NMHDR(); enlink.charrange = new CHARRANGE(); enlink.nmhdr.hwndFrom = Marshal.ReadIntPtr((IntPtr) numRef); enlink.nmhdr.idFrom = Marshal.ReadIntPtr((IntPtr) (numRef + 8)); enlink.nmhdr.code = Marshal.ReadInt32((IntPtr) (numRef + 0x10)); enlink.msg = Marshal.ReadInt32((IntPtr) (numRef + 0x18)); enlink.wParam = Marshal.ReadIntPtr((IntPtr) (numRef + 0x1c)); enlink.lParam = Marshal.ReadIntPtr((IntPtr) (numRef + 0x24)); enlink.charrange.cpMin = Marshal.ReadInt32((IntPtr) (numRef + 0x2c)); enlink.charrange.cpMax = Marshal.ReadInt32((IntPtr) (numRef + 0x30)); } return enlink; }