Esempio n. 1
0
        /// <summary>
        ///     Read a single icon (.ico).
        /// </summary>
        /// <param name="lpData">Pointer to the beginning of this icon's data.</param>
        /// <param name="lpAllData">Pointer to the beginning of all icon data.</param>
        /// <returns>Pointer to the end of this icon's data.</returns>
        internal IntPtr Read(IntPtr lpData, IntPtr lpAllData)
        {
            _header = (FileGrpIconDirEntry)Marshal.PtrToStructure(lpData, typeof(FileGrpIconDirEntry));

            var lpImage = new IntPtr(lpAllData.ToInt32() + _header.dwFileOffset);

            _image.Read(lpImage, _header.dwImageSize);

            return(new IntPtr(lpData.ToInt32() + Marshal.SizeOf(_header)));
        }
Esempio n. 2
0
        /// <summary>
        ///     Read a single icon (.ico).
        /// </summary>
        /// <param name="lpData">Pointer to the beginning of this icon's data.</param>
        /// <param name="lpAllData">Pointer to the beginning of all icon data.</param>
        /// <returns>Pointer to the end of this icon's data.</returns>
        internal IntPtr Read(IntPtr lpData, IntPtr lpAllData) {
            _header = (FileGrpIconDirEntry)Marshal.PtrToStructure(lpData, typeof (FileGrpIconDirEntry));

            var lpImage = new IntPtr(lpAllData.ToInt32() + _header.dwFileOffset);
            _image.Read(lpImage, _header.dwImageSize);

            return new IntPtr(lpData.ToInt32() + Marshal.SizeOf(_header));
        }