PageRenderTime 18ms CodeModel.GetById 12ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/StormLib/stormlib/StormDll.h

http://ghostcb.googlecode.com/
C++ Header | 67 lines | 36 code | 11 blank | 20 comment | 1 complexity | 5b5ca8f3289ecff59368b977dda0a124 MD5 | raw file
 1/*****************************************************************************/
 2/* Storm.h                           Copyright Justin Olbrantz(Quantam) 2000 */
 3/*---------------------------------------------------------------------------*/
 4/* Storm Interface Library v1.0 for Windows                                  */
 5/*                                                                           */
 6/* Author : Justin Olbrantz(Quantam)                                         */
 7/* E-mail : omega@dragonfire.net                                             */
 8/* WWW    : www.campaigncreations.com/starcraft/mpq2k/inside_mopaq/          */
 9/*---------------------------------------------------------------------------*/
10/*   Date    Ver   Who  Comment                                              */
11/* --------  ----  ---  -------                                              */
12/* xx.xx.00  1.00  Qua  The first version of Storm.h                         */
13/* 11.04.03  1.00  Lad  Added some functions                                 */
14/*****************************************************************************/
15
16// We need the Windows data types for the Storm prototypes
17#include <windows.h>
18
19#ifndef __STORM_H__
20#define __STORM_H__
21
22// Somethimes is necessary to change the function names so they
23// will not conflict with other MPQ tools.
24#ifdef STORM_ALTERNATE_NAMES
25  #define SFILE(Name) Storm##Name
26  #define SCOMP(Name) Storm##Name
27#else
28  #define SFILE(Name) SFile##Name
29  #define SCOMP(Name) SComp##Name
30#endif
31
32
33// Just in case anyone is still using C out there
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38// Storm file function prototypes
39BOOL  WINAPI SFILE(OpenArchive)(LPCSTR lpFileName, DWORD dwPriority, DWORD dwFlags, HANDLE *hMPQ);
40BOOL  WINAPI SFILE(CloseArchive)(HANDLE hMPQ);
41BOOL  WINAPI SFILE(GetArchiveName)(HANDLE hMPQ, LPCSTR lpBuffer, DWORD dwBufferLength);
42BOOL  WINAPI SFILE(OpenFile)(LPCSTR lpFileName, HANDLE *hFile);
43BOOL  WINAPI SFILE(OpenFileEx)(HANDLE hMPQ, LPCSTR lpFileName, DWORD dwSearchScope, HANDLE *hFile);
44BOOL  WINAPI SFILE(CloseFile)(HANDLE hFile);
45DWORD WINAPI SFILE(GetFileSize)(HANDLE hFile, LPDWORD lpFileSizeHigh);
46BOOL  WINAPI SFILE(GetFileArchive)(HANDLE hFile, HANDLE *hMPQ);
47BOOL  WINAPI SFILE(GetFileName)(HANDLE hFile, LPCSTR lpBuffer, DWORD dwBufferLength);
48DWORD WINAPI SFILE(SetFilePointer)(HANDLE hFile, long lDistanceToMove, PLONG lplDistanceToMoveHigh, DWORD dwMoveMethod);
49BOOL  WINAPI SFILE(ReadFile)(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,LPOVERLAPPED lpOverlapped);
50LCID  WINAPI SFILE(SetLocale)(LCID nNewLocale);
51BOOL  WINAPI SFILE(GetBasePath)(LPCSTR lpBuffer, DWORD dwBufferLength);
52BOOL  WINAPI SFILE(SetBasePath)(LPCSTR lpNewBasePath);
53
54// Storm (de)compression functions
55BOOL  WINAPI SCOMP(Compress)  (char * pbOutBuffer, int * pdwOutLength, char * pbInBuffer, int dwInLength, int uCmp, int uCmpType, int nCmpLevel);
56BOOL  WINAPI SCOMP(Decompress)(char * pbOutBuffer, int * pdwOutLength, char * pbInBuffer, int dwInLength);
57
58
59#if defined(_MSC_VER) && !defined(BUILDING_STORM_CPP)
60#pragma comment(lib, "Storm.lib")    // Force linking Storm.lib and thus Storm.dll
61#endif
62
63#ifdef __cplusplus
64}
65#endif
66
67#endif // __STORM_H__