/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. // We need the Windows data types for the Storm prototypes
  16. #include <windows.h>
  17. #ifndef __STORM_H__
  18. #define __STORM_H__
  19. // Somethimes is necessary to change the function names so they
  20. // will not conflict with other MPQ tools.
  21. #ifdef STORM_ALTERNATE_NAMES
  22. #define SFILE(Name) Storm##Name
  23. #define SCOMP(Name) Storm##Name
  24. #else
  25. #define SFILE(Name) SFile##Name
  26. #define SCOMP(Name) SComp##Name
  27. #endif
  28. // Just in case anyone is still using C out there
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32. // Storm file function prototypes
  33. BOOL WINAPI SFILE(OpenArchive)(LPCSTR lpFileName, DWORD dwPriority, DWORD dwFlags, HANDLE *hMPQ);
  34. BOOL WINAPI SFILE(CloseArchive)(HANDLE hMPQ);
  35. BOOL WINAPI SFILE(GetArchiveName)(HANDLE hMPQ, LPCSTR lpBuffer, DWORD dwBufferLength);
  36. BOOL WINAPI SFILE(OpenFile)(LPCSTR lpFileName, HANDLE *hFile);
  37. BOOL WINAPI SFILE(OpenFileEx)(HANDLE hMPQ, LPCSTR lpFileName, DWORD dwSearchScope, HANDLE *hFile);
  38. BOOL WINAPI SFILE(CloseFile)(HANDLE hFile);
  39. DWORD WINAPI SFILE(GetFileSize)(HANDLE hFile, LPDWORD lpFileSizeHigh);
  40. BOOL WINAPI SFILE(GetFileArchive)(HANDLE hFile, HANDLE *hMPQ);
  41. BOOL WINAPI SFILE(GetFileName)(HANDLE hFile, LPCSTR lpBuffer, DWORD dwBufferLength);
  42. DWORD WINAPI SFILE(SetFilePointer)(HANDLE hFile, long lDistanceToMove, PLONG lplDistanceToMoveHigh, DWORD dwMoveMethod);
  43. BOOL WINAPI SFILE(ReadFile)(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,LPOVERLAPPED lpOverlapped);
  44. LCID WINAPI SFILE(SetLocale)(LCID nNewLocale);
  45. BOOL WINAPI SFILE(GetBasePath)(LPCSTR lpBuffer, DWORD dwBufferLength);
  46. BOOL WINAPI SFILE(SetBasePath)(LPCSTR lpNewBasePath);
  47. // Storm (de)compression functions
  48. BOOL WINAPI SCOMP(Compress) (char * pbOutBuffer, int * pdwOutLength, char * pbInBuffer, int dwInLength, int uCmp, int uCmpType, int nCmpLevel);
  49. BOOL WINAPI SCOMP(Decompress)(char * pbOutBuffer, int * pdwOutLength, char * pbInBuffer, int dwInLength);
  50. #if defined(_MSC_VER) && !defined(BUILDING_STORM_CPP)
  51. #pragma comment(lib, "Storm.lib") // Force linking Storm.lib and thus Storm.dll
  52. #endif
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56. #endif // __STORM_H__