|
-
Sep 17th, 2002, 07:45 AM
#1
Thread Starter
Frenzied Member
Harddisk label
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.
-
Sep 17th, 2002, 07:53 AM
#2
Fanatic Member
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
Faisal Muhammed
Homepage:I Started making it in 1994 ...Still Under Construction  
Using
Visual Basic 6.0 Enterprise SP5
Embedded Visual Basic 3.0
SQL Server 2000
Windows 2000 Proff
Delphi 6.0
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-
Sep 17th, 2002, 07:54 AM
#3
Frenzied Member
Check out ApiVolume code and ApiSystem class code - it should be in there somewhere...
-
Sep 17th, 2002, 07:57 AM
#4
Fanatic Member
-
Sep 17th, 2002, 08:36 AM
#5
Thread Starter
Frenzied Member
Thanku very much Faisal
Originally Posted by faisalkm
hey Moin, is there a Hyderabad in Pakistan too...?
Yes!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|