Hard Drive Serial Numbers 
Author Message
 Hard Drive Serial Numbers

Is there anyway to find the serial number of a hard drive using vb3.0?

Chris

--
---------------------------------------------

URL     : www.freenet.edmonton.ab.ca/~wagner/
PGP Key : Available by E-mail or my web page.
---------------------------------------------



Wed, 11 Aug 1999 03:00:00 GMT  
 Hard Drive Serial Numbers

Quote:

>Is there anyway to find the serial number of a hard drive using vb3.0?

find vbio.zip on the software sites
-------------------------------------------------------------



Thu, 12 Aug 1999 03:00:00 GMT  
 Hard Drive Serial Numbers

Quote:

>Is there anyway to find the serial number of a hard drive using vb3.0?

Id that what you're looking or ?? Leme know !

'* Declare Functions
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA"
(ByVal lpBuffer As String, ByVal nSize As Long) As Long
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

'* Local declaration
Dim ResultDev As Long
Dim lpRootPathName As String
Dim lpVolumeNameBuffer As String
Dim nVolumeNameSize As Long
Dim lpMaximumComponentLength As Long
Dim lpFileSystemFlags As Long
Dim lpFileSystemNameBuffer
Dim nFileSystemNameSize As Long

'* Get Windows Directory Name
  lpBuffer = String(50, " ")
  nSize = 100
  nWindowsPath = GetWindowsDirectory(lpBuffer, nSize)

'* Get Disk Serial Number where Windows is installed
lpRootPathName = Left$(lpBuffer, 3)         '* Get Drive Letter on witch Win is
installed
lpVolumeNameBuffer = String(12, " ")
nVolumeNameSize = 20
lpMaximumComponentLength = 48
lpFileSystemFlags = &H2
lpFileSystemNameBuffer = "FAT"
nFileSystemNameSize = 32

  '* Function to retreive the volume serial number and other informations
  ResultDev = GetVolumeInformation(lpRootPathName, lpVolumeNameBuffer,
nVolumeNameSize, lpVolumeSerialNumber, lpMaximumComponentLength,
lpFileSystemFlags, lpFileSystemNameBuffer, nFileSystemNameSize)

Stephane L Come
Oracle DBA, LeyLinks, Switzerland



Thu, 12 Aug 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Hard Drive Serial Number/Total Drive Size

2. hard drive serial number

3. Reading the Hard Drives Serial Number

4. Hard Drive Serial Number

5. Hard drive serial number

6. Getting Hard Drive Serial number

7. API call for hard drive serial number

8. Hard Drive Serial Numbers

9. Get hard drive serial numbers

10. Hard Drive Serial Number?

11. Hard drive serial number

12. Hard Drive Volume Serial Number

 

 
Powered by phpBB® Forum Software