Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
3.6 KiB

  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. * Copyright (c) 1992, Microsoft Corp. All rights reserved. *
  10. * *
  11. *******************************************************************************
  12. *
  13. * #define LIB - To be used with LZEXP?.LIB (default is for LZEXPAND.DLL)
  14. * NOTE: Not compatible with windows.h if LIB is #defined
  15. *
  16. \*****************************************************************************/
  17. #ifndef _INC_LZEXPAND
  18. #define _INC_LZEXPAND
  19. #ifdef __cplusplus
  20. extern "C" { /* Assume C declarations for C++ */
  21. #endif /* __cplusplus */
  22. /*
  23. * If .lib version is being used, declare types used in this file.
  24. */
  25. #ifdef LIB
  26. #define LZAPI _pascal
  27. #ifndef WINAPI /* don't declare if they're already declared */
  28. #define WINAPI _far _pascal
  29. #define NEAR _near
  30. #define FAR _far
  31. #define PASCAL _pascal
  32. typedef int BOOL;
  33. #define TRUE 1
  34. #define FALSE 0
  35. typedef unsigned char BYTE;
  36. typedef unsigned short WORD;
  37. typedef unsigned int UINT;
  38. typedef signed long LONG;
  39. typedef unsigned long DWORD;
  40. typedef char far* LPSTR;
  41. typedef const char far* LPCSTR;
  42. typedef int HFILE;
  43. #define OFSTRUCT void /* Not used by the .lib version */
  44. #endif /* WINAPI */
  45. #else /* LIB */
  46. #define LZAPI _far _pascal
  47. /* If .dll version is being used and we're being included with
  48. * the 3.0 windows.h, #define compatible type aliases.
  49. * If included with the 3.0 windows.h, #define compatible aliases
  50. */
  51. #ifndef _INC_WINDOWS
  52. #define UINT WORD
  53. #define LPCSTR LPSTR
  54. #define HFILE int
  55. #endif /* !_INC_WINDOWS */
  56. #endif /* !LIB */
  57. /****** Error return codes ***************************************************/
  58. #define LZERROR_BADINHANDLE (-1) /* invalid input handle */
  59. #define LZERROR_BADOUTHANDLE (-2) /* invalid output handle */
  60. #define LZERROR_READ (-3) /* corrupt compressed file format */
  61. #define LZERROR_WRITE (-4) /* out of space for output file */
  62. #define LZERROR_GLOBALLOC (-5) /* insufficient memory for LZFile struct */
  63. #define LZERROR_GLOBLOCK (-6) /* bad global handle */
  64. #define LZERROR_BADVALUE (-7) /* input parameter out of range */
  65. #define LZERROR_UNKNOWNALG (-8) /* compression algorithm not recognized */
  66. /****** Public functions *****************************************************/
  67. int LZAPI LZStart(void);
  68. void LZAPI LZDone(void);
  69. LONG LZAPI CopyLZFile(HFILE, HFILE);
  70. LONG LZAPI LZCopy(HFILE, HFILE);
  71. HFILE LZAPI LZInit(HFILE);
  72. int LZAPI GetExpandedName(LPCSTR, LPSTR);
  73. HFILE LZAPI LZOpenFile(LPCSTR, OFSTRUCT FAR*, UINT);
  74. LONG LZAPI LZSeek(HFILE, LONG, int);
  75. int LZAPI LZRead(HFILE, void FAR*, int);
  76. void LZAPI LZClose(HFILE);
  77. #ifdef __cplusplus
  78. }
  79. #endif /* __cplusplus */
  80. #endif /* _INC_LZEXPAND */