home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 14.ddi / GENINC.PAK / LZEXPAND.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  5.4 KB  |  221 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * lzexpand.h    Public interfaces for LZEXPAND.DLL.                           *
  4. *                                                                             *
  5. *               Version 3.10                                                  *
  6. *                                                                             *
  7. *               NOTE: windows.h must be included first if LIB is NOT #defined *
  8. *                                                                             *
  9. *******************************************************************************
  10. *
  11. * #define LIB   - To be used with LZEXP?.LIB (default is for LZEXPAND.DLL)
  12. *                 NOTE: Not compatible with windows.h if LIB is #defined
  13. *
  14. \*****************************************************************************/
  15.  
  16. /*
  17.  *      C/C++ Run Time Library - Version 6.0
  18.  *
  19.  *      Copyright (c) 1987, 1993 by Borland International
  20.  *      All Rights Reserved.
  21.  *
  22.  */
  23.  
  24. #ifndef __LZEXPAND_H    /* prevent multiple includes */
  25. #define __LZEXPAND_H
  26.  
  27. #ifdef __cplusplus
  28. extern "C" {            /* Assume C declarations for C++ */
  29. #endif  /* __cplusplus */
  30.  
  31. #if !defined(__WINDOWS_H) && !defined(LIB)
  32. #include <windows.h>    /* <windows.h> must be included */
  33. #endif  /* __WINDOWS_H */
  34.  
  35. #if !defined(__FLAT__)
  36.  
  37. /*
  38.  * If .lib version is being used, declare types used in this file.
  39.  */
  40. #ifdef LIB
  41.  
  42. #define LZAPI           _pascal
  43.  
  44. #ifndef WINAPI          /* don't declare if they're already declared */
  45. #define WINAPI          _far _pascal
  46. #define NEAR            _near
  47. #define FAR             _far
  48. #define PASCAL          _pascal
  49. typedef int             BOOL;
  50. #define TRUE            1
  51. #define FALSE           0
  52. typedef unsigned char   BYTE;
  53. typedef unsigned short  WORD;
  54. typedef unsigned int    UINT;
  55. typedef signed long     LONG;
  56. typedef unsigned long   DWORD;
  57. typedef char far*       LPSTR;
  58. typedef const char far* LPCSTR;
  59. typedef int             HFILE;
  60. #define OFSTRUCT        void            /* Not used by the .lib version */
  61. #endif  /* WINAPI */
  62.  
  63. #else   /* LIB */
  64.  
  65. #define LZAPI           _far _pascal
  66.  
  67. /* If included with the 3.0 windows.h, define compatible aliases */
  68. #if !defined(WINVER) || (WINVER < 0x030a)
  69. #define UINT        WORD
  70. #define LPCSTR      LPSTR
  71. #define HFILE       int
  72. #endif  /* WIN3.0 */
  73.  
  74. #endif  /* !LIB */
  75.  
  76. /****** Error return codes ***************************************************/
  77.  
  78. #define LZERROR_BADINHANDLE   (-1)  /* invalid input handle */
  79. #define LZERROR_BADOUTHANDLE  (-2)  /* invalid output handle */
  80. #define LZERROR_READ          (-3)  /* corrupt compressed file format */
  81. #define LZERROR_WRITE         (-4)  /* out of space for output file */
  82. #define LZERROR_GLOBALLOC     (-5)  /* insufficient memory for LZFile struct */
  83. #define LZERROR_GLOBLOCK      (-6)  /* bad global handle */
  84. #define LZERROR_BADVALUE      (-7)  /* input parameter out of range */
  85. #define LZERROR_UNKNOWNALG    (-8)  /* compression algorithm not recognized */
  86.  
  87. /****** Public functions *****************************************************/
  88.  
  89. int     LZAPI LZStart(void);
  90. void    LZAPI LZDone(void);
  91. LONG    LZAPI CopyLZFile(HFILE, HFILE);
  92. LONG    LZAPI LZCopy(HFILE, HFILE);
  93. HFILE   LZAPI LZInit(HFILE);
  94. int     LZAPI GetExpandedName(LPCSTR, LPSTR);
  95. HFILE   LZAPI LZOpenFile(LPCSTR, OFSTRUCT FAR*, UINT);
  96. LONG    LZAPI LZSeek(HFILE, LONG, int);
  97. int     LZAPI LZRead(HFILE, void FAR*, int);
  98. void    LZAPI LZClose(HFILE);
  99.  
  100. #else    /* defined __FLAT__ */
  101.  
  102. /*
  103. ** Error Return Codes
  104. */
  105.  
  106. #define LZERROR_BADINHANDLE   (-1)  /* invalid input handle */
  107. #define LZERROR_BADOUTHANDLE  (-2)  /* invalid output handle */
  108. #define LZERROR_READ          (-3)  /* corrupt compressed file format */
  109. #define LZERROR_WRITE         (-4)  /* out of space for output file */
  110. #define LZERROR_GLOBALLOC     (-5)  /* insufficient memory for LZFile struct */
  111. #define LZERROR_GLOBLOCK      (-6)  /* bad global handle */
  112. #define LZERROR_BADVALUE      (-7)  /* input parameter out of acceptable range*/
  113. #define LZERROR_UNKNOWNALG    (-8)  /* compression algorithm not recognized */
  114.  
  115.  
  116. /*
  117. ** Prototypes
  118. */
  119.  
  120. INT
  121. APIENTRY
  122. LZStart(
  123.         VOID
  124.         );
  125.  
  126. VOID
  127. APIENTRY
  128. LZDone(
  129.         VOID
  130.         );
  131.  
  132. LONG
  133. APIENTRY
  134. CopyLZFile(
  135.         INT,
  136.         INT
  137.         );
  138.  
  139. LONG
  140. APIENTRY
  141. LZCopy(
  142.         INT,
  143.         INT
  144.         );
  145.  
  146.  
  147. INT
  148. APIENTRY
  149. LZInit(
  150.         INT
  151.         );
  152.  
  153. INT
  154. APIENTRY
  155. GetExpandedNameA(
  156.         LPSTR,
  157.         LPSTR
  158.         );
  159. INT
  160. APIENTRY
  161. GetExpandedNameW(
  162.         LPWSTR,
  163.         LPWSTR
  164.         );
  165. #ifdef UNICODE
  166. #define GetExpandedName GetExpandedNameW
  167. #else
  168. #define GetExpandedName GetExpandedNameA
  169. #endif // !UNICODE
  170.  
  171. INT
  172. APIENTRY
  173. LZOpenFileA(
  174.         LPSTR,
  175.         LPOFSTRUCT,
  176.         WORD
  177.         );
  178. INT
  179. APIENTRY
  180. LZOpenFileW(
  181.         LPWSTR,
  182.         LPOFSTRUCT,
  183.         WORD
  184.         );
  185. #ifdef UNICODE
  186. #define LZOpenFile LZOpenFileW
  187. #else
  188. #define LZOpenFile LZOpenFileA
  189. #endif // !UNICODE
  190.  
  191. LONG
  192. APIENTRY
  193. LZSeek(
  194.         INT,
  195.         LONG,
  196.         INT
  197.         );
  198.  
  199. INT
  200. APIENTRY
  201. LZRead(
  202.         INT,
  203.         LPSTR,
  204.         INT
  205.         );
  206.  
  207. VOID
  208. APIENTRY
  209. LZClose(
  210.         INT
  211.         );
  212.  
  213. #endif  /* __FLAT__ */
  214.  
  215. #ifdef __cplusplus
  216. }       /* End of extern "C" { */
  217. #endif  /* __cplusplus */
  218.  
  219.  
  220. #endif // _LZEXPAND_INCLUDED_
  221.