home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / QBAS / PBC22B.ZIP / PBC$BAS.ZIP / GETSER.BAS < prev    next >
BASIC Source File  |  1993-01-01  |  879b  |  26 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |        PBClone  Copyright (c) 1990-1993  Thomas G. Hanlin III        |
  4. '   |                                                                      |
  5. '   +----------------------------------------------------------------------+
  6.  
  7.    DECLARE SUB GetDOSv (MajorVersion%, MinorVersion%)
  8.  
  9.    DECLARE FUNCTION GetSerial00& (BYVAL DriveNr%)
  10.  
  11. FUNCTION GetSerial$(Drive$)
  12.    GetDOSv MajV%, MinV%
  13.    IF MajV% < 4 THEN
  14.       St$ = ""
  15.    ELSE
  16.       IF LEN(Drive$) THEN
  17.          D% = ASC(UCASE$(LEFT$(Drive$, 1))) - 64
  18.       ELSE
  19.          D% = 0
  20.       END IF
  21.       St$ = RIGHT$("00000000" + HEX$(GetSerial00&(D%)), 8)
  22.       St$ = LEFT$(St$, 4) + "-" + RIGHT$(St$, 4)
  23.    END IF
  24.    GetSerial$ = St$
  25. END FUNCTION
  26.