title image


Smiley Re: Seriennummer von Datenträger
Private Declare Function GetVolumeInformation Lib _    "Kernel32.dll" Alias "GetVolumeInformationA" (ByVal _    lpRootPathName As String, ByVal lpVolumeNameBuffer As _    String, ByVal nVolumeNameSize As Integer, _    lpVolumeSerialNumber As Long, _    lpMaximumComponentLength _    As Long, lpFileSystemFlags As Long, ByVal _    lpFileSystemNameBuffer As String, ByVal _    nFileSystemNameSize As Long) As Long Private Function Seriennummer(Laufwerk As String) As Long    Dim SerialNum As Long    Dim R As Long    Dim Temp1 As String    Dim Temp2 As String    Temp1 = String$(255, Chr$(0))    Temp2 = String$(255, Chr$(0))    R = GetVolumeInformation(Laufwerk, Temp1, _       Len(Temp1), SerialNum, 0, 0, Temp2, Len(Temp2))    Seriennummer = SerialNum End Function Sub Ermitteln()    s = Seriennummer("C:\")    h1 = Mid(s, 1, 4)    h2 = Mid(s, 4, 4)    h = Hex(h1) & ":" & Hex(h2)    MsgBox "Seriennummer von C: " & s & " (" & h & ")" End Sub  

geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: