home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / SOFTWARE / LIBS / VBLZH.ZIP / README.TXT (.txt) < prev    next >
Text File  |  1995-08-13  |  11KB  |  271 lines

  1. VBLZH.DLL by Philip Bush - Copyright 1995
  2.  
  3. File Compression/Decompression, file functions, and disk
  4. space functions for Visual Basic
  5.  
  6. SHAREWARE FEE $15
  7.  
  8. Registration Benefits:  - Unlimited redistribution rights.
  9.                         - Receive the latest registered 
  10.                           version by floppy disk.
  11.                         - Removes shareware notice from 
  12.                           compression/decompression status
  13.                           window.
  14.  
  15. Borland Delphi (pascal) VBLZH.DLL source code $99.
  16.  
  17. Philip Bush
  18. Macware
  19. 748 N. Hwy 67, Suite 163
  20. Florissant, MO  63031
  21.  
  22. check/money order/cash/Visa/Mastercard payments accepted
  23.  
  24. phone: (314) 838-7620    email: WWHH86A@PRODIGY.COM
  25.  
  26.  
  27. INTRODUCTION:
  28.  
  29. VBLZH.DLL is user-supported software provided to you at no
  30. charge on a trial basis.  If you use the software and find
  31. it of value, please send $15.00 for a registered copy and 
  32. support the shareware concept.  Registered users receive 
  33. the most current version on disk, are provided with 
  34. information about program updates and are entitled to user
  35. support.
  36.  
  37. You are encouraged to share this software with others, and/or
  38. to post it to bulletin boards, provided that it is distributed
  39. complete with documentation and in unmodified form and that no
  40. fee or other consideration is charged or accepted.
  41.  
  42. All commercial, business and government users must register 
  43. each developer copy in use.  Please contact me for multiple
  44. copy or site license terms.
  45.  
  46. Registered users may distribute the VBLZH.DLL to an unlimited
  47. number of end users (run-time) along with their compiled
  48. applications.  Inquire if you have special needs, I'm sure we
  49. can come to a fair agreement.
  50.  
  51. The Visual Basic program TEST.EXE (and VB source code: 
  52. TEST.MAK, TEST.FRM, VBLZH.BAS) demonstrates the functions
  53. contained in VBLZH.DLL.  Feel free to copy and use the source 
  54. code in any manner.
  55.  
  56. NOTES:
  57.  
  58. I am willing to add functionality to the DLL.  Send any your
  59. requests to the address listed at the top or e-mail.  Future
  60. ideas could include disk formatting/set date & time stamp/
  61. Win '95 support/?.  I'm putting this version out as shareware
  62. to "test the waters".  It was originally written by me for a
  63. commercial program.  I don't want to invest lots of additional
  64. time in development if the DLL isn't going to be used!
  65.  
  66. The DLL's size is 196K, in large part because of the 
  67. compression/decompression status window.  Send a request with
  68. your registration if you want a copy without a status window
  69. (it is approx 25k).
  70.  
  71. I always like to get replies with or without the registration
  72. fee.  Send your suggestions.  I also am available for contract
  73. programming (VB & Delphi).
  74.  
  75.  
  76. LEGAL & WARRANTIES:
  77.  
  78. PHILIP BUSH/MACWARE MAKES NO WARRANTIES, EXPRESS OR IMPLIED,
  79. AND SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF
  80. MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE. 
  81. The customer's sole remedies are set forth in the warranty
  82. clause above.  Philip Bush/MacWare liability for damages 
  83. shall not exceed the current registration fee for the
  84. product.  In no event will Philip Bush/MacWare be liable for
  85. any special, incidental or consequential damages even if 
  86. Philip Bush/MacWare has been advised of the possibility of
  87. the same.
  88.  
  89.  
  90. REFERENCE:
  91.  
  92. The files included in the VBLZH.DLL package (VBLZH.ZIP):
  93.  
  94. FILE_ID.DIZ   short description
  95. README.TXT    this file (long description)
  96. TEST.EXE      compiled VB example program
  97. TEST.FRM      example program VB source: main form 
  98. TEST.MAK      example program VB source: project file 
  99. VBLZH.BAS     example program VB source: basic declarations 
  100. VBLZH.DLL     the DLL 
  101.  
  102.  
  103. The information listed below is included in the VBLZH.BAS file.
  104.  
  105. **SUMMARY**
  106.  
  107. LZH                lzh compression & decompression of files, includes status Window
  108. DelFile%           deletes file from a disk
  109. RenFile%           renames a file
  110. GetFileSize&       file size in bytes
  111. FileExist%         does file exist
  112. CopyFile%          copies a file
  113. RetrieveFileName$  retrieves the file name from fully or partially qualified path name
  114. RetrieveFilePath$  retrieves the file path from fully or partially qualified path name
  115. FileDate&          date of the file named by FName as a LongInt (use CVDATE to evaluate)
  116. FileExtension$     returns a string containing the three-character extension
  117. FSearch$           searches through directories for a particular file name
  118. FAttribDescr$      returns a file attribute description (/ delimited text description)
  119. FAttribVal%        returns file attribute value
  120. FileSetAttrib%     set a file's attributes
  121. DiskFreeSpace&     returns a disk's free space in bytes
  122. DiskSpace&         returns disk size in bytes
  123.  
  124. **DECLARE**
  125.  
  126. Declare Sub LZH Lib "LZH.DLL" (ByVal fromfile$, ByVal tofile$, ByVal action$, errc&, inf&, otf&)
  127. Declare Function DelFile% Lib "LZH.DLL" (ByVal Fname$)
  128. Declare Function RenFile% Lib "LZH.DLL" (ByVal Old$,ByVal New$)
  129. Declare Function GetFileSize& Lib "LZH.DLL" (ByVal Fname$)
  130. Declare Function FileExist% Lib "LZH.DLL" (ByVal Fname$)
  131. Declare Function CopyFile% Lib "LZH.DLL" (ByVal FromF$, ByVal ToF$)
  132. Declare Function RetrieveFileName$ Lib "LZH.DLL" (ByVal FName$)
  133. Declare Function RetrieveFilePath$ Lib "LZH.DLL" (ByVal FName$)
  134. Declare Function FileDate& Lib "LZH.DLL" (ByVal FName$)
  135. Declare Function FileExtension$ Lib "LZH.DLL" (ByVal FName$)
  136. Declare Function FileSearch$ Lib "LZH.DLL" (ByVal Name$, Byval DirList$)
  137. Declare Function FAttribVal% Lib "LZH.DLL" (ByVal FName$)
  138. Declare Function FAttribDescr$ Lib "LZH.DLL" (ByVal FName$)
  139. Declare Function FileSetAttrib% Lib "LZH.DLL" (ByVal FName$, ByVal attr%)
  140. Declare Function DiskSpace& Lib "LZH.DLL" (ByVal driveltr$)
  141.  
  142. **INSTRUCTIONS**
  143.  
  144. *LZH file compression & decompression
  145.  usage:
  146.   fromfile$ = original file
  147.   tofile$   = destination file (caution, will be overwritten!)
  148.   action$   = "E" = compresss (encode)  "D" = uncompress (decode)
  149.  
  150.  returns:
  151.   errc& (error codes):
  152.    errc& = -1   no error encountered
  153.    errc& =  1   Error reading input file
  154.    errc& =  2   Error writing output file
  155.    errc& =  3   Error opening input
  156.    errc& =  4   Error opening output
  157.    errc& =  5   Error: use [D] for Decompression or [E] for Compression
  158.    errc& =  6   overflow read error - usually during decode on a non-compressed file
  159.    errc& =  7   overflow write error - usually during decode on a non-compressed file
  160.    errc& =  8   Error getting filesize
  161.  
  162.   inf& = original file size in bytes
  163.   otf& = destination file size in bytes
  164.  
  165. Declare Sub LZH Lib "VBLZH.DLL" (ByVal fromfile$, ByVal tofile$, ByVal action$, errc&, inf&, otf&)
  166.  
  167. *Delete File
  168.  -1 = successful, 0 = failed (file cannot be deleted or does not exist)
  169.  
  170. Declare Function DelFile% Lib "VBLZH.DLL" (ByVal Fname$)
  171.  
  172. *RenFile function attempts to change the name of the file specified by Old to New
  173.  -1 = successful, false = failed (will not rename if new already exists)
  174.  
  175. Declare Function RenFile% Lib "VBLZH.DLL" (ByVal OldF$,ByVal NewF$)
  176.  
  177. *GetFileSize function returns the file size in bytes
  178. HFILE_ERROR or -1 = failed, >= 0 file size in bytes
  179.  
  180. Declare Function GetFileSize& Lib "VBLZH.DLL" (ByVal Fname$)
  181.  
  182. *FileExist function tests if a file exists
  183.  -1 = file exists, 0 = file doesn't exist
  184.  
  185. Declare Function FileExist% Lib "VBLZH.DLL" (ByVal Fname$)
  186.  
  187. *CopyFile function copies the FromFile to the ToFile
  188.  -1 = successful, 0 = file copy failed
  189.  
  190. Declare Function CopyFile% Lib "VBLZH.DLL" (ByVal FromF$, ByVal ToF$)
  191.  
  192. *RetrieveFileName takes a fully or partially qualified path name in FName and returns
  193.   a string containing only the file name part, including the name and extension.
  194.  
  195. Declare Function RetrieveFileName$ Lib "VBLZH.DLL" (ByVal FName$)
  196.  
  197. *RetrieveFilePath takes a fully or partially qualified path name in FName and returns
  198.   a string containing only the path part (drive letter and directories).
  199.  
  200. Declare Function RetrieveFilePath$ Lib "VBLZH.DLL" (ByVal FName$)
  201.  
  202. *FileDate function returns the date of the file named by FName as a LongInt.
  203.   Use the VB function CVDATE to evaluate. Ex: Dt$=CVDATE(FileDate&("C:\AUTOEXEC.