home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / wincom / download / mltwcx.1.0.0.8-src.cab / mltwcx-src / wcx.h < prev   
Encoding:
C/C++ Source or Header  |  2000-12-16  |  3.1 KB  |  88 lines

  1. /*
  2.         wcx.h
  3.  
  4.         Mmmmmmmm ... Christian, now is your turn to describe that ... 8-) 
  5. */
  6.  
  7. #ifndef _WCX_H_
  8.     #define _WCX_H_
  9.  
  10. /* Error codes returned to calling application */
  11. #define E_END_ARCHIVE     10            /* No more files in archive */
  12. #define E_NO_MEMORY       11            /* Not enough memory */
  13. #define E_BAD_DATA        12            /* Data is bad */
  14. #define E_BAD_ARCHIVE     13            /* CRC error in archive data */
  15. #define E_UNKNOWN_FORMAT  14            /* Archive format unknown */
  16. #define E_EOPEN           15            /* Cannot open existing file */
  17. #define E_ECREATE         16            /* Cannot create file */
  18. #define E_ECLOSE          17            /* Error closing file */
  19. #define E_EREAD           18            /* Error reading from file */
  20. #define E_EWRITE          19            /* Error writing to file */
  21. #define E_SMALL_BUF       20            /* Buffer too small */
  22. #define E_EABORTED        21            /* Function aborted by user */
  23. #define E_NO_FILES        22            /* No files found */
  24. #define E_TOO_MANY_FILES  23            /* Too many files to pack */
  25. #define E_NOT_SUPPORTED   24            /* Function not supported */
  26.  
  27. /* flags for unpacking */
  28. #define PK_OM_LIST         0
  29. #define PK_OM_EXTRACT      1
  30.  
  31. /* flags for ProcessFile */
  32. #define PK_SKIP            0            /* Skip this file */
  33. #define PK_TEST            1            /* Test file integrity */
  34. #define PK_EXTRACT         2            /* Extract to disk */
  35.  
  36. /* Flags passed through ChangeVolProc */
  37. #define PK_VOL_ASK         0            /* Ask user for location of next volume */
  38. #define PK_VOL_NOTIFY      1            /* Notify app that next volume will be unpacked */
  39.  
  40. /* Flags for packing */
  41.  
  42. /* For PackFiles */
  43. #define PK_PACK_MOVE_FILES 1    /* Delete original after packing        */
  44. #define PK_PACK_SAVE_PATHS 2    /* Save path names of files             */
  45.  
  46. /* Returned by GetPackCaps */
  47. #define PK_CAPS_NEW        1    /* Can create new archives              */
  48. #define PK_CAPS_MODIFY     2    /* Can modify exisiting archives        */
  49. #define PK_CAPS_MULTIPLE   4    /* Archive can contain multiple files   */
  50. #define PK_CAPS_DELETE     8    /* Can delete files                     */
  51. #define PK_CAPS_OPTIONS   16    /* Has options dialog                   */
  52.  
  53. typedef struct {
  54.     char ArcName[260];
  55.     char FileName[260];
  56.     int Flags;
  57.     int PackSize;
  58.     int UnpSize;
  59.     int HostOS;
  60.     int FileCRC;
  61.     int FileTime;
  62.     int UnpVer;
  63.     int Method;
  64.     int FileAttr;
  65.     char* CmtBuf;
  66.     int CmtBufSize;
  67.     int CmtSize;
  68.     int CmtState;
  69.   } tHeaderData;
  70.  
  71. typedef struct {
  72.     char* ArcName;
  73.     int OpenMode;
  74.     int OpenResult;
  75.     char* CmtBuf;
  76.     int CmtBufSize;
  77.     int CmtSize;
  78.     int CmtState;
  79.   } tOpenArchiveData;
  80.  
  81. /* Definition of callback functions called by the DLL
  82. Ask to swap disk for multi-volume archive */
  83. typedef int (__stdcall *tChangeVolProc)(char *ArcName,int Mode);
  84. /* Notify that data is processed - used for progress dialog */
  85. typedef int (__stdcall *tProcessDataProc)(unsigned char *Addr,int Size);
  86.  
  87. #endif //_WCX_H_
  88. // = End of WCX.H =