PSS ID Number: 115238
Article Last Modified on 11/2/2001
' Note that you will want to load the VBDOS.QLB file when starting ' VBDOS to get this program to run. ' $INCLUDE: 'vbdos.bi' TYPE midstruc midinfolevel AS INTEGER ' Information level. midserialnum AS LONG ' Serial number. midvollabel AS STRING * 11 ' ASCII volume label. MidFileSysType AS STRING * 8 ' File system type. END TYPE DIM regs AS regtypex DIM ms AS midstruc ms.midserialnum = &HFFFFFFFF ' Set the new volume serial number. ms.midvollabel = "SIDEHACKERS" regs.ax = &H440D regs.bx = 1 ' Specifies drive A (2 for B, 3 for C..). regs.cx = &H846 ' Remove the apostrophe from the following line to change it from a comment ' to an executed line if you want to retrieve the current values of the ' volume label and the serial number for the specified drive: ' regs.cx = &H866 regs.ds = VARSEG(ms) regs.dx = VARPTR(ms) CALL INTERRUPTX(&H21, regs, regs) CLS IF (regs.flags AND 1) THEN ' Check for error. PRINT "problem : "; regs.ax ' Print error number. ELSE PRINT HEX$(ms.midSerialNum) ' Print successful return values. PRINT ms.midVolLabel PRINT ms.midFileSysType END IF
Keywords: kbhowto KB115238
Technology: kbAudDeveloper kbVB100DOS kbVBSearch kbZNotKeyword3