سنتر العرب
 

ماشاء الله تبارك الله ماشاء الله لاقوة الا بالله , اللهم اني اسالك الهدى والتقى والعفاف والغنى

   

 

 

    تويتر فيس بوك

 

Loading


العودة   منتديات سنتر العرب > سنتر العرب - الاقسام العامة > سنتر العرب - الأنترنت والكمبيوتر و الـ DSL > سنتر العرب لخدمات الويب > لغات البرمجه, php , asp,Ajax, visual basic Java

لغات البرمجه, php , asp,Ajax, visual basic Java لغات البرمجه, php , asp,Ajax, visual basic Java,لغات البرمجه, php , asp,Ajax, visual basic Java,لغات البرمجه, php , asp,Ajax, visual basic Java,لغات البرمجه, php , asp,Ajax, visual basic Java,



إضافة رد
 
أدوات الموضوع
قديم 07-12-2010, 12:13 PM   رقم المشاركة : [1]
عنـ الشوق ـاد
,

 الصورة الرمزية عنـ الشوق ـاد
 





عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold

 
افتراضي كود لمعرفة جميع ال Drivers الموجودة في جهاز الكومبيوتر

كود لمعرفة جميع ال Drivers الموجودة في جهاز الكومبيوتر



يختص هذا الأمر بالعودة بجميع (السواقات ) Drivers الموجودة في جهازك ، وبدلالة أرقام معينة سيتم توضيحها بعد ضمن الكود باستخدام جملة Select Case .

في الجينرال :

اقتباس:
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" _
(ByVal nDrive As String) As Long
Private Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" _
(ByVal lpRootPathName As String, lpSectorsPerCluster As Long, _
lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, _
lpTtoalNumberOfClusters As Long) As Long

Private Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectoryA" _
(ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Private Declare Function GetWindowsDirectory Lib "kernel32" _
Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Const DRIVE_CDROM = 5
Const DRIVE_FIXED = 3
Const DRIVE_RAMDISK = 6
Const DRIVE_REMOTE = 4
Const DRIVE_REMOVABLE = 2


اقتباس:
Dim driveType As Long
Dim freeSpace As Long
Dim Sectors As Long
Dim Bytes As Long
Dim freeClusters As Long
Dim totalClusters As Long
Dim retValue As Long
Dim buffer As String * 255
driveType = GetDriveType(Drive1.Drive & "\")
Select Case driveType
Case 0
Label5.Caption = "UNDETERMINED"
Case 1
Label5.Caption = "NO ROOT"
Case DRIVE_REMOVABLE
Label5.Caption = "REMOVABLE"
Case DRIVE_FIXED
Label5.Caption = "FIXED"
Case DRIVE_REMOTE
Label5.Caption = "REMOTE"
Case DRIVE_CDROM
Label5.Caption = "CDROM"
Case DRIVE_RAMDISK
Label5.Caption = "RAMDISK"
End Select
retValue = GetDiskFreeSpace(Left(Drive1.Drive, 2) & "\", Sectors, Bytes, freeClusters, totalClusters)
If retValue > 0 Then
Label6.Caption = Sectors * Bytes * freeClusters
Label12.Caption = Sectors
Label13.Caption = Bytes
Label14.Caption = freeClusters
Else
Label6.Caption = "Not Available"
Label12.Caption = "Not Available"
Label13.Caption = "Not Available"
Label14.Caption = "Not Available"
End If
retValue = GetCurrentDirectory(255, buffer)
Label7.Caption = buffer
retValue = GetWindowsDirectory(buffer, 255)
Label8.Caption = buffer

توقيع عنـ الشوق ـاد
عنـ الشوق ـاد غير متواجد حالياً   رد مع اقتباس
إضافة رد

مواقع النشر (المفضلة)

الكلمات الدلالية (Tags)
كود لمعرفة جميع ال drivers الموجودة في جهاز الكومبيوتر


الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 
أدوات الموضوع

تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML متاحة

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

  Bookmark and Share

  


الساعة الآن 12:54 PM

|

www.swsws.net® Version 3.8.6
Copyright ©2000 - 2012, 7: swsws Ltd.
تنبية جميع ما يتم كتابته في المنتدى يعبر عن رأي كاتبه فقط ولا تتحمل إدارة منتديات سنتر العرب أدنى مسؤولية

Security team