MPQ Archives


Dynamic Library "Storm.dll"

Blizzard games released since 1996 to 2004 (Diablo, Diablo II, Starcraft, Warcraft II and Warcraft III) shipped with Storm.dll, a dynamic library that contained functions that were able to read data from the archives. This DLL also contained memory management functions, network support, compression functions and other. There was also a Mac version of this library, named Storm.bin. Storm.dll only contained functions for reading MPQs. The MPQ writing functions (saving games, creating maps etc.) were compiled inside the main game executable.

The very early version of Storm.dll was usable by any programmer that has figured out function parameters. All that was necessary was to load the DLL using LoadLibrary, then get the address of a procedure by GetProcAddress and then use the procedure. Any tool that can show export names from a DLL was able to show function names.

This reason violated one of the requirements for Blizzard archives, which was security of the data. Because of this, beginning with Diablo version 1.04, Blizzard made using Storm.dll by third party people more difficult:

Using Storm.dll

Using Storm.dll in your applications is not recomended. Existing Storm.dll no longer supports newer archive versions, and its code is now in the game executable. If you still want to use Storm.dll in your applications, you have to link it using import library. This import library with header file is now part of StormLib, and is available for download in the Download section. Note that you also need to get Storm.dll. The latest version was shipped with Warcraft III: The Frozen Throne.

StarEdit.exe and LMPQAPI.dll

StarEdit is the map editor, released with the game of Starcraft. Because Starcraft maps (and also Warcraft III and Starcraft II maps) are just MPQ archives, StarEdit.exe contains functions which can create and edit MPQ archives. But StarEdit is not a DLL, so you cannot load it using the LoadLibrary API. A Russian programmer Andrej Lelikov wrote a code which loads StarEdit.exe to memory, performs necessary relocations and allows to call functions for creating MPQs. The code has been published as LMPQAPI, a package that has been able to create MPQs.