home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 6.ddi / WINCLUDE.ZIP / LZEXPAND.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  3.5 KB  |  95 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. #ifndef __LZEXPAND_H    /* prevent multiple includes */
  17. #define __LZEXPAND_H
  18.  
  19. #if !defined(__WINDOWS_H) && !defined(LIB)
  20. #include <windows.h>    /* <windows.h> must be included */
  21. #endif  /* __WINDOWS_H */
  22.  
  23. #ifdef __cplusplus
  24. extern "C" {            /* Assume C declarations for C++ */
  25. #endif  /* __cplusplus */
  26.  
  27. /*
  28.  * If .lib version is being used, declare types used in this file.
  29.  */
  30. #ifdef LIB
  31.  
  32. #define LZAPI           _pascal
  33.  
  34. #ifndef WINAPI          /* don't declare if they're already declared */
  35. #define WINAPI          _far _pascal
  36. #define NEAR            _near
  37. #define FAR             _far
  38. #define PASCAL          _pascal
  39. typedef int             BOOL;
  40. #define TRUE            1
  41. #define FALSE           0
  42. typedef unsigned char   BYTE;
  43. typedef unsigned short  WORD;
  44. typedef unsigned int    UINT;
  45. typedef signed long     LONG;
  46. typedef unsigned long   DWORD;
  47. typedef char far*       LPSTR;
  48. typedef const char far* LPCSTR;
  49. typedef int             HFILE;
  50. #define OFSTRUCT        void            /* Not used by the .lib version */
  51. #endif  /* WINAPI */
  52.  
  53. #else   /* LIB */
  54.  
  55. #define LZAPI           _far _pascal
  56.  
  57. /* If included with the 3.0 windows.h, define compatible aliases */
  58. #if !defined(WINVER) || (WINVER < 0x030a)
  59. #define UINT        WORD
  60. #define LPCSTR      LPSTR
  61. #define HFILE       int
  62. #endif  /* WIN3.0 */
  63.  
  64. #endif  /* !LIB */
  65.  
  66. /****** Error return codes ***************************************************/
  67.  
  68. #define LZERROR_BADINHANDLE   (-1)  /* invalid input handle */
  69. #define LZERROR_BADOUTHANDLE  (-2)  /* invalid output handle */
  70. #define LZERROR_READ          (-3)  /* corrupt compressed file format */
  71. #define LZERROR_WRITE         (-4)  /* out of space for output file */
  72. #define LZERROR_GLOBALLOC     (-5)  /* insufficient memory for LZFile struct */
  73. #define LZERROR_GLOBLOCK      (-6)  /* bad global handle */
  74. #define LZERROR_BADVALUE      (-7)  /* input parameter out of range */
  75. #define LZERROR_UNKNOWNALG    (-8)  /* compression algorithm not recognized */
  76.  
  77. /****** Public functions *****************************************************/
  78.  
  79. int     LZAPI LZStart(void);
  80. void    LZAPI LZDone(void);
  81. LONG    LZAPI CopyLZFile(HFILE, HFILE);
  82. LONG    LZAPI LZCopy(HFILE, HFILE);
  83. HFILE   LZAPI LZInit(HFILE);
  84. int     LZAPI GetExpandedName(LPCSTR, LPSTR);
  85. HFILE   LZAPI LZOpenFile(LPCSTR, OFSTRUCT FAR*, UINT);
  86. LONG    LZAPI LZSeek(HFILE, LONG, int);
  87. int     LZAPI LZRead(HFILE, void FAR*, int);
  88. void    LZAPI LZClose(HFILE);
  89.  
  90. #ifdef __cplusplus
  91. }       /* End of extern "C" { */
  92. #endif  /* __cplusplus */
  93.  
  94. #endif  /* __LZEXPAND_H */
  95.