Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




1 <html>
2 <title>About ShadowFlare MPQ API Library</title>
3 <pre>  ShadowFlare MPQ API Library v1.08 (c) ShadowFlare Software 2002-2010
5   This library emulates the interface of Lmpqapi and Storm MPQ
6   functions, so it may be used as a replacement for them in
7   MPQ extractors/archivers without even needing to recompile
8   the program that uses Lmpqapi or Storm.  It has a few features
9   not included in Lmpqapi and Storm, such as extra flags for some
10   functions, setting the locale ID of existing files, and adding
11   files without having to write them somewhere else first.  Also,
12   MPQ handles used by functions prefixed with "SFile" and "Mpq"
13   can be used interchangably; all functions use the same type
14   of MPQ handles.  You cannot, however, use handles from this
15   library with storm or lmpqapi or vice-versa.  Doing so will
16   most likely result in a crash.
18   This library does not require Storm to be able to decompress
19   or compress files.
21   Revision History:
22   (Release date) 1.08 (<a href="mailto:blakflare@hotmail.com">ShadowFlare</a>)
23   - Fixed a buffer overflow that would occur when reading files
24     if neither using a buffer that is large enough to contain the
25     entire file nor has a size that is a multiple of 4096
26   - Added SFileOpenFileAsArchive which opens an archive that is
27     contained within an already open archive
28   - Added MpqRenameAndSetFileLocale and MpqDeleteFileWithLocale.
29     These have extra parameters that allow you to use them with
30     files having language codes other than what was last set
31     using SFileSetLocale
32   - Fixed a bug that caused (listfile) to get cleared if adding
33     files with a locale ID other than 0
34   - Added MpqOpenArchiveForUpdateEx which allows creating
35     archives with different block sizes
36   - SFileListFiles can list the contents of bncache.dat without
37     needing an external list
39   06/12/2002 1.07 (<a href="mailto:blakflare@hotmail.com">ShadowFlare</a>)
40   - No longer requires Storm.dll to compress or decompress
41     Warcraft III files
42   - Added SFileListFiles for getting names and information
43     about all of the files in an archive
44   - Fixed a bug with renaming and deleting files
45   - Fixed a bug with adding wave compressed files with
46     low compression setting
47   - Added a check in MpqOpenArchiveForUpdate for proper
48     dwMaximumFilesInArchive values (should be a number that
49     is a power of 2).  If it is not a proper value, it will
50     be rounded up to the next higher power of 2
52   05/09/2002 1.06 (<a href="mailto:blakflare@hotmail.com">ShadowFlare</a>)
53   - Compresses files without Storm.dll!
54   - If Warcraft III is installed, this library will be able to
55     find Storm.dll on its own. (Storm.dll is needed to
56     decompress Warcraft III files)
57   - Fixed a bug where an embedded archive and the file that
58     contains it would be corrupted if the archive was modified
59   - Able to open all .w3m maps now
61   29/06/2002 1.05 (<a href="mailto:blakflare@hotmail.com">ShadowFlare</a>)
62   - Supports decompressing files from Warcraft III MPQ archives
63     if using Storm.dll from Warcraft III
64   - Added MpqAddFileToArchiveEx and MpqAddFileFromBufferEx for
65     using extra compression types
67   29/05/2002 1.04 (<a href="mailto:blakflare@hotmail.com">ShadowFlare</a>)
68   - Files can be compressed now!
69   - Fixed a bug in SFileReadFile when reading data not aligned
70     to the block size
71   - Optimized some of SFileReadFile's code.  It can read files
72     faster now
73   - SFile functions may now be used to access files not in mpq
74     archives as you can with the real storm functions
75   - MpqCompactArchive will no longer corrupt files with the
76     MODCRYPTKEY flag as long as the file is either compressed,
77     listed in "(listfile)", is "(listfile)", or is located in
78     the same place in the compacted archive; so it is safe
79     enough to use it on almost any archive
80   - Added MpqAddWaveFromBuffer
81   - Better handling of archives with no files
82   - Fixed compression with COMPRESS2 flag
84   15/05/2002 1.03 (<a href="mailto:blakflare@hotmail.com">ShadowFlare</a>)
85   - Supports adding files with the compression attribute (does
86     not actually compress files).  Now archives created with
87     this dll can have files added to them through lmpqapi
88     without causing staredit to crash
89   - SFileGetBasePath and SFileSetBasePath work more like their
90     Storm equivalents now
91   - Implemented MpqCompactArchive, but it is not finished yet.
92     In its current state, I would recommend against using it
93     on archives that contain files with the MODCRYPTKEY flag,
94     since it will corrupt any files with that flag
95   - Added SFMpqGetVersionString2 which may be used in Visual
96     Basic to get the version string
98   07/05/2002 1.02 (<a href="mailto:blakflare@hotmail.com">ShadowFlare</a>)
99   - SFileReadFile no longer passes the lpOverlapped parameter it
100     receives to ReadFile.  This is what was causing the function
101     to fail when used in Visual Basic
102   - Added support for more Storm MPQ functions
103   - GetLastError may now be used to get information about why a
104     function failed
106   01/05/2002 1.01 (<a href="mailto:blakflare@hotmail.com">ShadowFlare</a>)
107   - Added ordinals for Storm MPQ functions
108   - Fixed MPQ searching functionality of SFileOpenFileEx
109   - Added a check for whether a valid handle is given when
110     SFileCloseArchive is called
111   - Fixed functionality of SFileSetArchivePriority when multiple
112     files are open
113   - File renaming works for all filenames now
114   - SFileReadFile no longer reallocates the buffer for each block
115     that is decompressed.  This should make SFileReadFile at least
116     a little faster
118   30/04/2002 1.00 (<a href="mailto:blakflare@hotmail.com">ShadowFlare</a>)
119   - First version.
120   - Compression not yet supported
121   - Does not use SetLastError yet, so GetLastError will not return any
122     errors that have to do with this library
123   - MpqCompactArchive not implemented
125   Any comments or suggestions are accepted at <a href="mailto:blakflare@hotmail.com">blakflare@hotmail.com</a> (ShadowFlare)
126   Download the newest version from ShadowFlare's Realm at <a href="http://sfsrealm.hopto.org/">http://sfsrealm.hopto.org/</a>
128   License information:
130   Copyright (c) 2002-2010, ShadowFlare &lt;<a href="mailto:blakflare@hotmail.com">blakflare@hotmail.com</a>&gt;
131   All rights reserved.
133   Redistribution and use in source and binary forms, with or without
134   modification, are permitted provided that the following conditions
135   are met:
137   1. Redistributions of source code must retain the above copyright
138      notice, this list of conditions and the following disclaimer.
139   2. Redistributions in binary form must reproduce the above copyright
140      notice, this list of conditions and the following disclaimer in the
141      documentation and/or other materials provided with the distribution.
143   THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
144   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
145   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
146   ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
147   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
148   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
149   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
150   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
151   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
152   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
153   SUCH DAMAGE.</pre>
154 </html>