IonelBurtan
Programmer
I want to update 2 bits in a large file at given offsets.
The big file is 8k paginated, and I also know in what page to make the update (
let us say that the absolute offset is 8196 in page 2 in the 1 Mb file. there i Have two bytes I want to overwrite with ascii characters 0 and 1.
How ca I Do that in VB. I have tried with MapViewOfFile, but I could not managed it to work.
Like that:
hFile = CreateFile...
hMap = CreateViewOfFile
hBaseMemory = MapViewOfFile
...
modify bytes with lstrcpy
...
UnmapViewOfFile hBaseMemory
CloseHandle hMap
CloseHandle hFile
any help apreciated,
tnx
s-)
Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
The big file is 8k paginated, and I also know in what page to make the update (
let us say that the absolute offset is 8196 in page 2 in the 1 Mb file. there i Have two bytes I want to overwrite with ascii characters 0 and 1.
How ca I Do that in VB. I have tried with MapViewOfFile, but I could not managed it to work.
Like that:
hFile = CreateFile...
hMap = CreateViewOfFile
hBaseMemory = MapViewOfFile
...
modify bytes with lstrcpy
...
UnmapViewOfFile hBaseMemory
CloseHandle hMap
CloseHandle hFile
any help apreciated,
tnx
s-)
Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...