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




CommitLineData
f15b049d 1/* License information for this code is in license.txt */
2
09d0556c 3#ifndef STORM_H_INCLUDED
4#define STORM_H_INCLUDED
5
6#include <windows.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12// This no longer needs to be called
13extern HINSTANCE LoadStorm(char * DllFileName);
14
15#define SFILE_OPEN_HARD_DISK_FILE 0x0000 //Open archive without regard to the drive type it resides on
16#define SFILE_OPEN_CD_ROM_FILE 0x0001 //Open the archive only if it is on a CD-ROM
17
18#define SFILE_SEARCH_CURRENT_ONLY 0x00 //Used with SFileOpenFileEx; only the archive with the handle specified will be searched for the file
19#define SFILE_SEARCH_ALL_OPEN 0x01 //SFileOpenFileEx will look through all open archives for the file
20
21#define MPQHANDLE HANDLE
22
23// Storm Function Prototypes
f15b049d 24extern BOOL (WINAPI* SFileOpenArchive)(LPCSTR lpFilename, DWORD dwPriority, DWORD dwFlags, MPQHANDLE *hMPQ);
25extern BOOL (WINAPI* SFileCloseArchive)(MPQHANDLE hMPQ);
26extern BOOL (WINAPI* SFileOpenFile)(LPCSTR lpFileName, MPQHANDLE *hFile);
27extern BOOL (WINAPI* SFileOpenFileEx)(MPQHANDLE hMPQ, LPCSTR lpFileName, DWORD dwSearchScope, MPQHANDLE *hFile);
28extern BOOL (WINAPI* SFileCloseFile)(MPQHANDLE hFile);
29extern DWORD (WINAPI* SFileGetFileSize)(MPQHANDLE hFile, LPDWORD lpFileSizeHigh);
30extern DWORD (WINAPI* SFileSetFilePointer)(MPQHANDLE hFile, long lDistanceToMove, PLONG lplDistanceToMoveHigh, DWORD dwMoveMethod);
31extern BOOL (WINAPI* SFileReadFile)(MPQHANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped);
32extern LCID (WINAPI* SFileSetLocale)(LCID nNewLocale);
33extern BOOL (WINAPI* SFileDestroy)();
34extern BOOL (WINAPI* SFileGetArchiveName)(MPQHANDLE hMPQ, LPCSTR lpBuffer, DWORD dwBufferLength);
35extern BOOL (WINAPI* SFileGetFileName)(MPQHANDLE hFile, LPCSTR lpBuffer, DWORD dwBufferLength);
36extern BOOL (WINAPI* SFileGetFileArchive)(MPQHANDLE hFile, MPQHANDLE *hMPQ);
37extern BOOL (WINAPI* SFileGetBasePath)(LPCSTR lpBuffer, DWORD dwBufferLength);
38extern BOOL (WINAPI* SFileSetBasePath)(LPCSTR lpNewBasePath);
09d0556c 39
40#ifdef __cplusplus
41}; // extern "C"
42#endif
43
44#endif