home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / lbltools / lbltools.bas < prev    next >
Encoding:
BASIC Source File  |  1996-01-02  |  723 b   |  25 lines

  1. Attribute VB_Name = "Module1"
  2. ' LBLTOOLS.BAS
  3. ' Provides the function declarations and interface
  4. ' to the three functions for clearing, setting, and
  5. ' getting a volume label from a particular drive.
  6. ' *****
  7. ' Before writing a label delete the existing label with
  8. ' ClearLabel
  9.  
  10.  
  11. ' Pass the drive only
  12. Declare Function ClearLabel Lib "\DELTOOLS\LBLTOOLS" (ByVal drive As String) As Integer
  13.  
  14. ' Include the drive letter with the label name
  15. ' For example: "A:\DISK 1"
  16. Declare Function SetLabel Lib "\DELTOOLS\LBLTOOLS" (ByVal labelName As String) As Integer
  17.  
  18.  
  19. ' Proper syntax is: volName = GetLabel( "A:\")
  20. Public Function GetLabel(drive As String) As String
  21.  
  22.     GetLabel = Dir(drive, &H8)
  23.  
  24. End Function
  25.