public override IntPtr Read(IntPtr hModule, IntPtr lpRes) { _icons.Clear(); _header = (Kernel32.GRPICONDIR)Marshal.PtrToStructure( lpRes, typeof(Kernel32.GRPICONDIR)); IntPtr pEntry = new IntPtr(lpRes.ToInt32() + Marshal.SizeOf(_header)); for (int i = 0; i < _header.wImageCount; i++) { IconResource iconResource = new IconResource(); pEntry = iconResource.Read(hModule, pEntry); _icons.Add(iconResource); } return(pEntry); }
public override IntPtr Read(IntPtr hModule, IntPtr lpRes) { _icons.Clear(); _header = (Kernel32.GRPICONDIR) Marshal.PtrToStructure( lpRes, typeof(Kernel32.GRPICONDIR)); IntPtr pEntry = new IntPtr(lpRes.ToInt32() + Marshal.SizeOf(_header)); for (int i = 0; i < _header.wImageCount; i++) { IconResource iconResource = new IconResource(); pEntry = iconResource.Read(hModule, pEntry); _icons.Add(iconResource); } return pEntry; }