smartchecknsoftice.txt

来自「一部分关于VB编程的小技巧」· 文本 代码 · 共 27 行

TXT
27
字号
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 is detected.
retval = CloseHandle(hfile) ' Close the file handle
SoftICELoaded = True
Else
' SoftICE is not found.
SoftICELoaded = False
End If
End Function

Public Function SmartCheckLoaded() As Boolean
    Dim zoek As Long
    Dim dfg
    
    dfg = "NMSCMW50"
    'search classname
    zoek = FindWindow(dfg, vbNullString)
    'if result isn`t 0(nothing) then SC is on
    If zoek <> 0 Then
        SmartCheckLoaded = True
    Else
        SmartCheckLoaded = False
    End If
End Function

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?