I am doing some fixing of Credit Card Postings in a pcc file. Here is how the file is opened:
Store FOPEN('a:\NPC1.pcc') TO gnFileHandle && Open the file
Store FSEEK(gnFileHandle, 0, 2) TO gnEnd && Move pointer to EOF
Store FSEEK(gnFileHandle, 0) TO gnTop && Move pointer to BOF
*-- gstring is the contents
gcString = FGETS(gnFileHandle, gnEnd) && Store contents
*-- what we started with
g1=gcString
I find my bits, switch them and then try to FWRITE() but it returns 0, and the changes are not stored.
Here is my closing :
w=Fwrite('a:\NPC1.pcc', gcString, gnEnd)
fflush('a:\NPC1.pcc')
fclose('a:\NPC1.pcc')
W will always = 0?
What am i missing?
If I do :
y=fputs('a:\NPC1.pcc', gcString, gnEnd)
it give no result = 0
TIA
__Stephen