التنبيهات التالية ظهرت :
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 864 - File: showthread.php PHP 7.4.33 (Linux)
File Line Function
/showthread.php 864 errorHandler->error



تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
معرفة سيريال Drive معين
#1
كاتب الموضوع : AhmedEssawy

في التصريحات :


كود :
Option Explicit
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
الكود :


كود :
Public Function DriveSerialNumber(ByVal Drive As String) As Long

'usage: SN = DriveSerialNumber("C:\")

Dim lAns As Long
Dim lRet As Long
Dim sVolumeName As String, sDriveType As String
Dim sDrive As String
'Deal with one and two character input values
sDrive = Drive
If Len(sDrive) = 1 Then
sDrive = sDrive & ":\"
ElseIf Len(sDrive) = 2 And Right(sDrive, 1) = ":" Then
sDrive = sDrive & "\"
End If

sVolumeName = String$(255, Chr$(0))
sDriveType = String$(255, Chr$(0))

lRet = GetVolumeInformation(sDrive, sVolumeName, _
255, lAns, 0, 0, sDriveType, 255)
DriveSerialNumber = lAns
End Function
}}}
تم الشكر بواسطة:


الردود في هذا الموضوع
معرفة سيريال Drive معين - بواسطة Raggi Tech - 17-10-12, 01:07 AM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم