Uploading file not possible here! can email you if you need...hard to find on net.... Please quick support...Thanks
USBPhysic_lib.bas
Code: Select all
Attribute VB_Name = "USBPhysic_lib"
Public Declare Function Init Lib "USBPhysic.dll" (ByVal sUser As String, ByVal sRegCode As String) As Long
Public Declare Function GetUSBPhysicInfo Lib "USBPhysic.dll" (ByVal diskIndex As Long, ByVal InfoType As Long, ByVal pHddInfo As String) As Long
Code: Select all
Private Sub Command1_Click()
Dim iDiskNo As Long
Dim sBuffer As String
Dim iReturn As Long
If Combo1.ListIndex = -1 Then
Exit Sub
End If
sBuffer = Space(1024) ' make room in the buffer
iDiskNo = Combo1.ListIndex 'get selected disk number
ClearEdit
iReturn = GetUSBPhysicInfo(iDiskNo, 0, sBuffer) '0 = serial number
Text1.Text = Left(sBuffer, iReturn)
iReturn = GetUSBPhysicInfo(iDiskNo, 1, sBuffer) '1 = usb product name
Text2.Text = Left(sBuffer, iReturn)
iReturn = GetUSBPhysicInfo(iDiskNo, 2, sBuffer) '2 = usb manufacturer
Text3.Text = Left(sBuffer, iReturn)
iReturn = GetUSBPhysicInfo(iDiskNo, 3, sBuffer) '3 = usb drive letter mapped on windows
Text6.Text = Left(sBuffer, iReturn)
End Sub
Private Sub Form_Load()
Dim tDiscs As Long
Dim intX As Integer
Dim WinHdd As Integer
tDiscs = Init("your reg name here", "your reg code here")
If tDiscs > 0 Then
For intX = 0 To tDiscs - 1
Combo1.AddItem intX
Next
Combo1.ListIndex = 0
End If
End Sub


