Private Declare Function GetDriveType Lib "kernel32"_
Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Private Declare Function GetWindowsDirectory_
Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As
String, ByVal nSize As Long) As Long
Private Function DriveType (Drive As String) As String
''////fungsi mengecek drive
Dim sAns As String,1Ans As Long
'fix bad parameter values
If Len (Drive) = 1 Then Drive = Drive & ":\"
If Len (Drive) = 2 And Right$ (Drive,1) = ":\"_
Then Drive = Drive & "\"
1Ans = GetDriveTpye (Drive)
Select Case 1Ans
Case 2
sAns = "Removable Drive"
Case 3
sAns = "Fixed Drive"
Case 4
sAns = "Remote Drive"
Case 5
sAns = "CD-ROM"
Case 6
sAns = "RAM Disk"
Case Else
sAns = "Drive Doesn’t Exist"
End Select
DriveType = sAns
End Function
Next----->>
Jumat, 01 Juni 2012
Membuat Kode Penggandaan Virus
09.11
No comments
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar