/// <summary> /// Read icons. /// </summary> /// <param name="lpData">Pointer to the beginning of a FILEGRPICONDIR structure.</param> /// <returns>Pointer to the end of a FILEGRPICONDIR structure.</returns> internal IntPtr Read(IntPtr lpData) { _icons.Clear(); _header = (FileGrpIconDir)Marshal.PtrToStructure(lpData, typeof(FileGrpIconDir)); var lpEntry = new IntPtr(lpData.ToInt32() + Marshal.SizeOf(_header)); for (var i = 0; i < _header.wCount; i++) { var iconFileIcon = new IconFileIcon(); lpEntry = iconFileIcon.Read(lpEntry, lpData); _icons.Add(iconFileIcon); } return(lpEntry); }
/// <summary> /// Read icons. /// </summary> /// <param name="lpData">Pointer to the beginning of a FILEGRPICONDIR structure.</param> /// <returns>Pointer to the end of a FILEGRPICONDIR structure.</returns> internal IntPtr Read(IntPtr lpData) { _icons.Clear(); _header = (FileGrpIconDir)Marshal.PtrToStructure(lpData, typeof (FileGrpIconDir)); var lpEntry = new IntPtr(lpData.ToInt32() + Marshal.SizeOf(_header)); for (var i = 0; i < _header.wCount; i++) { var iconFileIcon = new IconFileIcon(); lpEntry = iconFileIcon.Read(lpEntry, lpData); _icons.Add(iconFileIcon); } return lpEntry; }