How would i compare a resource file in my project, with an actual file on the computer? heres my code, but it doesn't work. Anyone got any ideas or fixes?
That code doesn't really work for me. Any help?Code:Private Sub CheckBinary() Dim byteRes() as Byte, byteFile() as Byte Dim xFile as Integer 'Load the resource data to byteRes byteRes() = LoadResData(101,"CUSTOM") 'Load the computer file onto byteFile xFile = FreeFile Open "C:\Program.exe" For Binary Access Read As #xFile Get #xFile, ,byteFile() Close #xFile 'Compare both bytes together If byteRes() = byteFile() Then Msgbox "They are the same!" Else Msgbox "They are NOT the same!" End If End Sub
NOTE THAT BOTH THE RES FILE AND THE ACTUAL FILE ON THE COMPUTER ARE THE SAME FILES




Reply With Quote