home *** CD-ROM | disk | FTP | other *** search
/ Software Recommendations - 1998 Season 1 / DNBCD4.iso / develop / lib / addzip / ADDZIP.ZIP / C / ADDUNZIP.H next >
Encoding:
C/C++ Source or Header  |  1997-08-15  |  4.1 KB  |  137 lines

  1. // aunzip.h
  2. //
  3. // C/C++ header file for addUNZIP compression libraries
  4. //
  5. // Copyright ⌐ 1995,1997 Stephen Darlington. All rights reserved.
  6. //
  7.  
  8. #ifndef _ADDUNZIP_H_
  9. #define _ADDUNZIP_H_
  10.  
  11. #ifdef _BUILD_DLL
  12. #    define DLLENTRY CALLBACK _export
  13. #else
  14. #    if defined(_WIN32) && defined(_MSC_VER)
  15. #        define DLLENTRY _declspec(dllimport)
  16. #    else
  17. #        define DLLENTRY CALLBACK
  18. #    endif
  19. #endif
  20.  
  21. typedef unsigned char BYTE;
  22. typedef unsigned short UINT16;
  23. typedef unsigned long UINT32;
  24. typedef char CHAR;
  25. typedef short INT16;
  26. typedef long INT32;
  27.  
  28. typedef INT16 (CALLBACK *CALLBACKFN)(INT16, INT16, LPSTR);
  29.  
  30. // function prototypes
  31. #ifdef __cplusplus
  32. extern "C"
  33. {
  34. #endif
  35.  
  36. INT32 DLLENTRY addUNZIP(void);
  37. INT16 DLLENTRY addUNZIP_Abort(INT16 bAbort);
  38. INT16 DLLENTRY addUNZIP_ArchiveName(LPCSTR filename);
  39. INT16 DLLENTRY addUNZIP_Decrypt(LPCSTR cPassword);
  40. INT16 DLLENTRY addUNZIP_DisplayComment(INT16 bFlag);
  41. INT16 DLLENTRY addUNZIP_Exclude(LPCSTR files);
  42. INT16 DLLENTRY addUNZIP_ExcludeListFile(LPCSTR cFile);
  43. INT16 DLLENTRY addUNZIP_ExtractTo(LPCSTR cPath);
  44. INT16 DLLENTRY addUNZIP_Freshen(INT16 iFlag);
  45. INT16 DLLENTRY addUNZIP_GetLastError(void);
  46. INT16 DLLENTRY addUNZIP_GetLastWarning(void);
  47. void DLLENTRY addUNZIP_GetVersion(UINT16 *, UINT16 *);
  48. INT16 DLLENTRY addUNZIP_Include(LPCSTR files);
  49. INT16 DLLENTRY addUNZIP_IncludeListFile(LPCSTR cFile);
  50. void  DLLENTRY addUNZIP_Initialise(void);
  51. INT16 DLLENTRY addUNZIP_InstallCallback(CALLBACKFN fn);
  52. INT16 DLLENTRY addUNZIP_Overwrite(INT16 iFlag);
  53. INT16 DLLENTRY addUNZIP_Register(LPCSTR cName, UINT32 iNumber);
  54. INT16 DLLENTRY addUNZIP_RestoreAttributes(INT16 iFlag);
  55. INT16 DLLENTRY addUNZIP_RestoreStructure(INT16 iFlag);
  56. #ifndef _SFX_
  57. INT16 DLLENTRY addUNZIP_SetParentWindowHandle(HWND hwnd);
  58. INT16 DLLENTRY addUNZIP_SetWindowHandle(HWND hwnd);
  59. #endif
  60. INT16 DLLENTRY addUNZIP_Test(INT16 iFlag);
  61. INT16 DLLENTRY addUNZIP_ToMemory(LPSTR, UINT32);
  62. INT16 DLLENTRY addUNZIP_Update(INT16 iFlag);
  63. INT16 DLLENTRY addUNZIP_View(INT16 bFlag);
  64.  
  65. // constants for addUNZIP_Overwrite(...)
  66. #define azOVERWRITE_QUERY 0x0a
  67. #define azOVERWRITE_ALL   0x0b
  68. #define azOVERWRITE_NONE  0x0c
  69.  
  70. // constants used in messages
  71. #define azLIBRARY_ADDUNZIP 1
  72.  
  73. // constants for addUNZIP_RestoreAttributes(...)
  74. #define azATTR_NONE 0
  75. #define azATTR_READONLY 1
  76. #define azATTR_HIDDEN 2
  77. #define azATTR_SYSTEM 4
  78. #define azATTR_ARCHIVE 32
  79. #define azATTR_ALL 39
  80.  
  81. // addZIP & addUNZIP messages
  82. #define AM_SEARCHING      0x0a
  83. #define AM_ZIPCOMMENT     0x0b
  84. #define AM_ZIPPING        0x0c
  85. #define AM_ZIPPED         0x0d
  86. #define AM_UNZIPPING      0x0e
  87. #define AM_UNZIPPED       0x0f
  88. #define AM_TESTING        0x10
  89. #define AM_TESTED         0x11
  90. #define AM_DELETING       0x12
  91. #define AM_DELETED        0x13
  92. #define AM_DISKCHANGE     0x14
  93. #define AM_VIEW           0x15
  94. #define AM_ERROR          0x16
  95. #define AM_WARNING        0x17
  96. #define AM_QUERYOVERWRITE 0x18
  97. #define AM_COPYING        0x19
  98. #define AM_COPIED         0x1a
  99. //#define AM_REPAIRING      0x1b
  100. //#define AM_FILECOMMENT    0x1c
  101. //#define AM_PASSWORD       0x1d
  102. #define AM_ABORT          0xff
  103.  
  104. // Constants for compression method in AM_VIEW
  105. #define azCM_NONE 0              0x00
  106. #define azCM_SHRUNK              0x0a
  107. #define azCM_REDUCED_1           0x14
  108. #define azCM_REDUCED_2           0x1e
  109. #define azCM_REDUCED_3           0x28
  110. #define azCM_REDUCED_4           0x32
  111. #define azCM_IMPLODED            0x3c
  112. #define azCM_TOKENISED           0x46
  113. #define azCM_DEFLATED_NORMAL     0x50
  114. #define azCM_DEFLATED_MAXIMUM    0x51
  115. #define azCM_DEFLATED_FAST       0x52
  116. #define azCM_DEFLATED_SUPERFAST  0x53
  117. #define azCM_UNKNOWN             0xff
  118.  
  119. //Constants for whether file is encrypted or not in AM_VIEW
  120. #define azFT_NOT_ENCRYPTED 0x00
  121. #define azFT_ENCRYPTED     0x01
  122.  
  123. //Constants for whether file is text or binary in AM_VIEW
  124. #define azFT_TEXT   0x00
  125. #define azFT_BINARY 0x01
  126.  
  127. // Constants used in returning from a AM_QUERYOVERWRITE message
  128. #define azOW_YES        0x00
  129. #define azOW_YES_TO_ALL 0x01
  130. #define azOW_NO         0x02
  131. #define azOW_NO_TO_ALL  0x03
  132.  
  133. #ifdef __cplusplus
  134. }
  135. #endif
  136. #endif
  137.