home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / msinc.pak / LZEXPAND.H < prev    next >
C/C++ Source or Header  |  1997-07-23  |  6KB  |  240 lines

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