public CabEntryExtractEventArgs(CabEntry entry)
        {
            if (entry == null)
            {
                throw new ArgumentNullException("entry");
            }

            Entry = entry;
        }
        private void OnEntryExtract(CabEntry entry)
        {
            Entries.Add(entry);

            /*
             * EventHandler<CabEntryExtractEventArgs> handler = EntryExtract;
             * if (handler != null)
             * {
             *  handler(this, new CabEntryExtractEventArgs(entry));
             * }
             */
        }
        private int FnClose(IntPtr hf)
        {
            object   o     = _handles[hf];
            CabEntry entry = o as CabEntry;

            if (entry != null)
            {
                entry.Data = _currentEntryData.ToArray();
                _currentEntryData.Dispose();
            }
            _handles.Remove(hf);
            return(0);
        }
        private IntPtr FnNotifyExtract(FDINOTIFICATIONTYPE fdint, FDINOTIFICATION fdin)
        {
            CabEntry entry;

            switch (fdint)
            {
            case FDINOTIFICATIONTYPE.COPY_FILE:
                entry         = new CabEntry(fdin);
                entry._handle = new IntPtr(_handles.Count + 1);
                _handles.Add(entry._handle, entry);
                _currentEntryData = new MemoryStream();
                return(entry._handle);

            case FDINOTIFICATIONTYPE.CLOSE_FILE_INFO:
                entry = (CabEntry)_handles[fdin.hf];
                FnClose(fdin.hf);
                OnEntryExtract(entry);
                return(new IntPtr(1));

            default:
                return(IntPtr.Zero);
            }
        }