home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 13
/
CD_ASCQ_13_0494.iso
/
maj
/
419
/
getser.bas
< prev
next >
Wrap
BASIC Source File
|
1994-03-13
|
879b
|
26 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone Copyright (c) 1990-1994 Thomas G. Hanlin III |
' | |
' +----------------------------------------------------------------------+
DECLARE SUB GetDOSv (MajorVersion%, MinorVersion%)
DECLARE FUNCTION GetSerial00& (BYVAL DriveNr%)
FUNCTION GetSerial$(Drive$)
GetDOSv MajV%, MinV%
IF MajV% < 4 THEN
St$ = ""
ELSE
IF LEN(Drive$) THEN
D% = ASC(UCASE$(LEFT$(Drive$, 1))) - 64
ELSE
D% = 0
END IF
St$ = RIGHT$("00000000" + HEX$(GetSerial00&(D%)), 8)
St$ = LEFT$(St$, 4) + "-" + RIGHT$(St$, 4)
END IF
GetSerial$ = St$
END FUNCTION