|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
'如果出现弹出框就说明已经找到了,会出现一个偏移地址,然后手工对照一下是否正确,,,
Option Explicit
Sub test()
Dim data As Long, s, t, n As Long, filename As String, i As Long
filename = ThisWorkbook.Path & "\test.dat"
If Dir(filename) = vbNullString Then MsgBox filename: Exit Sub
s = "80BB6360"
For i = 7 To 1 Step -2
t = t & Mid(s, i, 2)
Next
n = Val("&H" & t)
Open filename For Binary Access Read As #1
For i = 1 To FileLen(filename) Step 8
Get #1, i, data
If n = data Then MsgBox "offset:" & Hex(i) & vbNewLine & Hex(data): Exit For
Next
Close #1
End Sub |
评分
-
1
查看全部评分
-
|