OK heres the problem. I want to open a file, read from a specific location in the file, then modify the data at that location, and write it back to the file. The file can be quite large(8mb). Can someone point me in the right direction, or simply post an example?
thanks in advance.
CreateFile..... GENERIC_READ or GENERIC_WRITE...
SetFilePointer
ReadFile
SetFilePointer
WriteFile
CloseHandle
PS Patching files is a grey area for legality :8)
What sort of file is it?
It sounds something like reading records in a large database file. Let us know how the file is layed out as there are some very good techniques if the data is regular.
thanks for the replies. I figured it out using...
invoke createfile, invoke readfile, and invoke writefile