Private Declare Function CRC_16 Lib "crcbyhoho.dll" (ByRef buf As Byte, ByVal nLen As Long) As Long
Private Sub Command1_Click()
Dim FileNumber As Long, lngSize As Long
Dim bytFileContent() As Byte
FileNumber = FreeFile()
Open App.Path & "\文件名.jpg" For Binary As #FileNumber
lngSize = LOF(FileNumber)
ReDim bytFileContent(lngSize - 1)
Get #FileNumber, , bytFileContent
Close #FileNumber
lngCRC = CRC_16(bytFileContent(0), lngSize - 1)
debug.print Hex(lngCRC)
End Sub
- 1
- 2
- 3
- 4
- 5
前往页