Hi!!!
I am in trouble.. no vb no api viewer no nothing...:(
What's the code for getting the processor ID? and/or Harddisk Volume Label?I need code.
Printable View
Hi!!!
I am in trouble.. no vb no api viewer no nothing...:(
What's the code for getting the processor ID? and/or Harddisk Volume Label?I need code.
Harddisk volume label...
Private Declare Function GetVolumeInformation Lib "Kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
Private Sub Form_Load()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: [email protected]
Dim Serial As Long, VName As String, FSName As String
'Create buffers
VName = String$(255, Chr$(0))
FSName = String$(255, Chr$(0))
'Get the volume information
GetVolumeInformation "C:\", VName, 255, Serial, 0, 0, FSName, 255
'Strip the extra chr$(0)'s
VName = Left$(VName, InStr(1, VName, Chr$(0)) - 1)
FSName = Left$(FSName, InStr(1, FSName, Chr$(0)) - 1)
MsgBox "The Volume name of C:\ is '" + VName + "', the File system name of C:\ is '" + FSName + "' and the serial number of C:\ is '" + Trim(Str$(Serial)) + "'", vbInformation + vbOKOnly, App.Title
End Sub
Check out ApiVolume code and ApiSystem class code - it should be in there somewhere...
hey Moin, is there a Hyderabad in Pakistan too...?
Thanku very much Faisal
Yes!!!Quote:
Originally Posted by faisalkm
hey Moin, is there a Hyderabad in Pakistan too...?