SerialNumber Property |
Description
Returns the decimal serial number used to uniquely identify a disk volume.
PowerBASIC Syntax
Return Value
LONG. The serial number.
You can use the SerialNumber property to ensure that the correct disk is inserted in a drive with removable media.
Example [PowerBASIC]
#INCLUDE "windows.inc" #INCLUDE "scrrun.inc"
DIM fso AS IFileSystem DIM pDrive AS IDrive
' Create an instance of the FileSystemObject fso = NEWCOM "Scripting.FileSystemObject" ' Get a reference to the IDrive interface pDrive = fso.GetDrive((UCODE$("C:")) ' Get and display the serial number STDOUT STR$(pDrive.SerialNumber)
|