Erwin Craps
Erwin.Craps at ithelps.be
Tue Aug 5 00:50:23 CDT 2003
The combination of severall items.
Windows version etc..
But the most unique I know, will be the serial number of the hard disk.
The serial of the processor but not al cpu have one, or turned off.
MAC address of the nic is also unique but can be easealy spoofed.
PC name should be unique in same domain.
Please note that the last two would require a network installed!!!
Public SysInfo As SYSTEM_INFO
Type SYSTEM_INFO
dwOemID As Long
dwPageSize As Long
lpMinimumApplicationAddress As Long
lpMaximumApplicationAddress As Long
dwActiveProcessorMask As Long
dwNumberOrfProcessors As Long
dwProcessorType As Long
dwAllocationGranularity As Long
dwReserved As Long
End Type
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
Declare Sub GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO)
Declare Function GetSystemDefaultLangID Lib "kernel32" () As Integer
Declare Function GetVersion Lib "kernel32" () As Long
Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA"
(ByVal lpBuffer As String, nSize As Long) As Long
Dim ctrSysinfo As SysInfo
Dim Result As Integer
Dim RootPathName As String, VolumeNameBuffer As String
Dim VolumeNameSize As Long, VolumeSerialNumber As Long
Dim MaximumComponentLength As Long, FileSystemFlags As Long
Dim FileSystemNameBuffer As String, FileSystemNameSize As Long
Result = GetVolumeInformation(RootPathName, VolumeNameBuffer,
VolumeNameSize, VolumeSerialNumber, MaximumComponentLength,
FileSystemFlags, FileSystemNameBuffer, FileSystemNameSize)
-----Original Message-----
From: Selina Iddon [mailto:selina at easydatabases.com.au]
Sent: Tuesday, August 05, 2003 5:27 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Computer Identifier
Good Afternoon Everyone
I am trying to confirm that a computer is eligible to open a distributed
.mde file by the startup screen first checking to see if it's identifier
exists in a separate password protected file. To do this I need to be
able to extract an unique identifier for each computer (say the Windows
Registry key or something).
Can anyone offer a suggestion of a PC identifier to use and how I would
retrieve it using code?
TIA
Cheers
Selina
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com