Getting the serial number is the information to read the soft hard disc, which can be obtained by using the following function:
Public Declare Function getvolumeinformation Lib "kernel32.dll" Alias "Getvolumeinformationa" (ByVal lpRootPathName as St Ring, ByVal Lpvolumenamebuffer as String, ByVal nvolumenamesize as Integer, Lpvolumeserialnumber as Long, Lpmaximumcompone Ntlength as Long, lpfilesystemflags as Long, ByVal Lpfilesystemnamebuffer as String, ByVal nfilesystemnamesize as Long) as Long.
Now explain this function:
It is used to obtain a serial number, volume label, disk information (such as whether compression, etc.) the following example:
Set the custom function to call it first:
Function GetItNum(strDrv As String) As Long
Dim GetNum As Long
Dim Rs As Long
Dim Temp1 As String
Dim Temp2 As String
Temp1 = String$(255, Chr$(0))
Temp2 = String$(255, Chr$(0))
Rs = GetVolumeInformation(strDrv, Temp1, Len(Temp1), GetNum, 0, 0, Temp2, Len(Temp2))
MsgBox "卷标为:"+Temp1
MsgBox "序列号为:"+Hex(SerialNum)
End Function
Call Getitnum When you use it later ("Disk") on it!
This can be very smooth to control the mouse!