|
-
Jul 15th, 2002, 08:58 AM
#1
Thread Starter
Addicted Member
Identify PC
Is there a way to get an unique Identifier of a Computer?... like a vendor code of the processor or the harddisk...
thanks
-
Jul 15th, 2002, 11:39 AM
#2
This will get the hard disk serial number.
VB Code:
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
Public Function GetSerialNumber() As Long
Dim strVolumeBuffer As String
Dim strSysName As String
Dim lngSerialNumber As Long
Dim lngSysFlags As Long
Dim lngComponentLen As Long
Dim lngResult As Long
strVolumeBuffer$ = String$(256, 0)
strSysName$ = String$(256, 0)
lngResult = GetVolumeInformation("C:\", strVolumeBuffer$, 255, lngSerialNumber, _
lngComponentLen, lngSysFlags, strSysName$, 255)
GetSerialNumber = lngSerialNumber
End Function
-
Jul 15th, 2002, 12:06 PM
#3
There is nothing on a PC that will remain completely unique throughout the life of a PC. Computer Names can get changed, hard drives can be swapped out, etc.
There should be a tag somewhere on the outside of the PC with the actual PC serial number, but this is not something you can obtain programmatically.
-
Jul 15th, 2002, 12:37 PM
#4
Hyperactive Member
If you could get and ID or Serial number of the processor that would probably be more usefull. Most people don't buy a new processor very often, and usually when they do they just buy a whole new computer.
-
Jul 16th, 2002, 04:35 PM
#5
New Member
Serial ID of Server (or Network) Drive
Originally posted by MartinLiss
This will get the hard disk serial number.
VB Code:
snipped for the sake of brevity...
It doesn't seem to work consistently for network drives. Does somebody have code demonstrating the ability to consistently get the serial number of network drives as well as local drives in W97 to WordXP?
Thanks!
ck
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
|