ArchiveResult ITotalCommanderWcxPlugin.OpenArchive(string archiveName, OpenArchiveMode mode, out IntPtr archive)
        {
            archive = IntPtr.Zero;
            var result   = ArchiveResult.Default;
            var unpacker = GetUnpacker(archiveName, mode);

            if (unpacker != null)
            {
                lock (unpackers)
                {
                    unpackers[archive = new IntPtr(unpackers.Count + 1)] = unpacker;
                }
                unpacker.Reset();
                result = ArchiveResult.Success;
            }
            return(result);
        }
示例#2
0
 public WcxUnpacker(string archivename, OpenArchiveMode mode)
 {
     this.archivename = archivename;
     this.mode        = mode;
     files            = Directory.GetFiles("d:\\", "*.*").ToList().GetEnumerator();
 }
 public override IArchiveUnpacker GetUnpacker(string archiveName, OpenArchiveMode mode)
 {
     return new WcxUnpacker(archiveName, mode);
 }
 public override IArchiveUnpacker GetUnpacker(string archiveName, OpenArchiveMode mode)
 {
     return(new WcxUnpacker(archiveName, mode));
 }
 public abstract IArchiveUnpacker GetUnpacker(string archiveName, OpenArchiveMode mode);
 public abstract IArchiveUnpacker GetUnpacker(string archiveName, OpenArchiveMode mode);
 ArchiveResult ITotalCommanderWcxPlugin.OpenArchive(string archiveName, OpenArchiveMode mode, out IntPtr archive)
 {
     archive = IntPtr.Zero;
     var result = ArchiveResult.Default;
     var unpacker = GetUnpacker(archiveName, mode);
     if (unpacker != null)
     {
         lock (unpackers)
         {
             unpackers[archive = new IntPtr(unpackers.Count + 1)] = unpacker;
         }
         unpacker.Reset();
         result = ArchiveResult.Success;
     }
     return result;
 }
 public WcxUnpacker(string archivename, OpenArchiveMode mode)
 {
     this.archivename = archivename;
     this.mode = mode;
     files = Directory.GetFiles("d:\\", "*.*").ToList().GetEnumerator();
 }