Example #1
0
        private bool Open(string file, uint Prio, OpenArchiveFlags Flags)
        {
            bool r = StormLib.SFileOpenArchive(file, Prio, Flags, out handle);

            if (r)
            {
                OpenPatch(file);
            }
            return(r);
        }
Example #2
0
 public MpqArchive(string filename)
 {
     if (!File.Exists(filename))
     {
         throw new FileNotFoundException(filename);
     }
     if (!StormLib.SFileOpenArchive(filename, 0, OpenArchiveFlags.READ_ONLY, out handle))
     {
         throw new IOException("SFileOpenArchive failed");
     }
 }
Example #3
0
        private unsafe bool Open(string file, uint Prio, OpenArchiveFlags Flags)
        {
            IntPtr h;
            IntPtr hp = (IntPtr)(&h);
            bool   r  = StormLib.SFileOpenArchive(file, Prio, Flags, hp);

            if (r)
            {
                handle = h;
                OpenPatch(file);
            }
            return(r);
        }