Public Declare Function CreateFileNS Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Long, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Public Declare Function WriteFileNO Lib "kernel32" Alias "WriteFile" (ByVal hfile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, ByVal lpOverlapped As Long) As Long
Public Const GENERIC_READ = &H80000000
Public Const GENERIC_WRITE = &H40000000
Public Const FILE_SHARE_READ = &H1
Public Const FILE_SHARE_WRITE = &H2
Public Const OPEN_EXISTING = 3
Public Const FILE_ATTRIBUTE_NORMAL = &H80
'Daha Sonra Bir Public Fonksiyon Yazıyoruz Bu da ;
Public Function SoftICELoaded() As Boolean
Dim hfile As Long, retval As Long
hfile = CreateFileNS("\\.\SICE", GENERIC_WRITE Or GENERIC_READ, FILE_SHARE_READ Or FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)
If hfile <> -1 Then
' SoftICE Bulundu.
retval = CloseHandle(hfile)
SoftICELoaded = True
Else
' SoftICE Bulunamadı.
SoftICELoaded = False
End If
End Function
'Son Olarak Bir Altprogram Kodu Daha Yazacağız
If SoftICELoaded Then 'SoftICE Bulundu Mu ?MsgBox "SoftICE Yüklü Lütfen Kapatın", vbMsgBoxSetForeground + vbInformation, "SoftICE-Detector"
End ' Eğer Bulunduysa Kapat
End If
MsgBox "SoftICE Hafızada Yüklü Değil", vbMsgBoxSetForeground + vbInformation, "SoftICE-Detector"
'Buraya Gitmek İstediğiniz Formu Yazın