Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Low Level File Blues
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00405598
Message ID:
00405616
Vues:
20
Thanks! I have been staring at that for too loong and not seeing it!



>The first parameter in Fwrite, Fputs, Fflush and Fclose has to be a file handle from Fopen. It's gnFileHandle in your case .
>

>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform