Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Handling binary files
#1
I need to read, search, and extract a binary file's contents. The file contains many 0x00 chars. The string and file functions seem to think this is the end of the file so never read to the end. Is there anyway to handle this in QM. Thanks.
Matt B
#2
To search binary data, use findb().

Code:
Copy      Help
str s.getfile("$qm$\system.qml")

;search
int i=findb(s "OpenSaveDialog")
out i

;replace all 0 to 1
for(i 0 s.len) if(s[i]=0) s[i]=1
out s
#3
Duh, how dumb of me.:oops: If at first you don't succede read the directions.
Thanks thats what I needed . Your support is amazing.
Matt


Forum Jump:


Users browsing this thread: 1 Guest(s)