ZipDLL.h
Upload User: hzweiye
Upload Date: 2022-05-26
Package Size: 4688k
Code Size: 4k
Development Platform:

Visual C++

  1. #ifndef ZIPDLL_H
  2. #define ZIPDLL_H
  3. #include "windows.h"
  4. #include "..stdafx.h"
  5. #include "ZCallBck.h"
  6. struct CZipParams
  7. {
  8. HWND m_hwndHandle;
  9. /* "self" referance of the Delphi form */
  10. /* This is passed back to us in the callback function
  11.    so we can direct the info to the proper form instance
  12.    - thanks to Dennis Passmore for this idea. */
  13. void *m_pCaller;
  14. long int m_liVersion;   /* version of DLL we expect to see */
  15. ZFunctionPtrType m_pfCallbackFunction; /* type def in ZCallBck.PAS */
  16. BOOL m_bTraceEnabled;
  17.          /*============== Begin Zip Flag section ============== */
  18. char *m_pszZipPassword; /* password pointer */
  19. BOOL m_bSuffix;   /* not used yet */
  20. BOOL m_bEncrypt;  /* Encrypt files to be added? */
  21. /* include system and hidden files */
  22. BOOL m_bSystem;
  23. /* Include volume label */
  24. BOOL m_bVolume;
  25. /* Include extra file attributes (read-only, unix timestamps, etc) */
  26. BOOL m_bExtra;
  27. /* Do not add directory names to .ZIP archive */
  28. /* see also: fJunkDir */
  29. BOOL m_bNoDirEntries;
  30. /* Only add files newer a specified date */
  31. /* See the "Date" array below if you set this to TRUE */
  32. BOOL m_bDate;
  33. /* Give a little more information to the user via message boxes */
  34. BOOL m_bVerboseEnabled;
  35. /* Quiet operation - the DLL won't issue any messages at all. */
  36. /* Delphi program MUST handle ALL errors via it's callback function. */
  37. BOOL m_bQuiet;
  38. /* Compression level (0 - 9; 9=max, 0=none) */
  39. /* All of these levels are variations of deflate. */
  40. /* I strongly recommend you use one of 3 values here:
  41.           0 = no compression, just store file
  42.               3 = "fast" compression
  43.               9 = "best" compression */
  44. long int m_bLevel;
  45. /* Try to compress files that appear to be already compressed
  46.    based on their extension: .zip, .arc, .gif, ... */
  47. BOOL m_bComprSpecial;
  48. /* translate text file end-of-lines */
  49. BOOL m_bCRLF_LF;
  50. /* junk the directory names */
  51. /* If true, this says not to save dirnames as separate entries,
  52.    in addition to being save with filenames. */
  53. /* see also: fNoDirEntries */
  54. BOOL m_bJunkDir;
  55. /* Recurse into subdirectories */
  56. BOOL m_bRecurse;
  57. /* Allow appending to a zip file */
  58. BOOL m_bGrow;
  59. /* Convert filenames to DOS 8x3 names - for compatibility
  60.    with PKUNZIP v2.04g, which doesn't understand long filenames */
  61. BOOL m_bForce;
  62. /* Delete orig files that were added or updated in zip file */
  63. /* This is a variation of Add */
  64. BOOL m_bMove;
  65. /* Delete specified files from zip file */
  66. BOOL m_bDeleteEntries;
  67. /* Update zip -- if true, rezip changed, and add new files in fspec */
  68. /* This is a variation of Add */
  69. BOOL m_bUpdate;
  70. /* Freshen zip -- if true, rezip all changed files in fspec */
  71. /* This is a variation of Add */
  72. BOOL m_bFreshen;
  73. /* junk the SFX prefix on the self-extracing .EXE archives */
  74. BOOL m_bJunkSFX;
  75. /* Set zip file time to time of newest file in it */
  76. BOOL m_bLatestTime;
  77. /*============== End Zip Flag section ============== */
  78. /* Cutoff Date for Add-by-date; add files newer than this day */
  79. /* This is only used if the "fDate" option is TRUE */
  80. /* format = MMDDYY plus a trailing null */
  81. char m_cDate[8];
  82. /* Count of files to add or delete - don't forget to set this! */
  83. long int m_liFileCount;
  84. /* ptr to name of zip file */
  85. char *m_pszArchiveFileName;
  86. long int m_liSeven; /* pass a 7 here to validate struct size */
  87. /* Array of filenames contained in the ZIP archive */
  88. char* m_pszFileNames[MAX_FILES];
  89. };
  90. /*
  91. Main call to execute a ZIP add or Delete.  This call returns the
  92. number of files that were sucessfully operated on.
  93. */
  94. typedef DWORD (__stdcall *CZipDllExec)(CZipParams *pParams);
  95. typedef DWORD (__stdcall *CGetZipDllVersion)();
  96. #endif  //  ZIPDLL_H