Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FSEEK() problems
Message
De
21/04/2003 08:34:39
 
 
À
21/04/2003 08:21:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00779708
Message ID:
00779719
Vues:
14
Amanda, just to be clear - there are two parameters after the file handle - the number of bytes to move and the relative from position from which to move. To position at the end of the file you would issue:
gnPosition = FSEEK(gnFileHandle, 0, 2)  &&  Move 0 bytes from the end of the file 2
In your original post you were only passing one parameter after the file handle which was the number of bytes to move. If you do not specify the relative from position it defaults to from the start.

If this still does work then please post your exact code here for us to see.

Also, are you checking that the FOPEN() was succesfull by checking the returned file handle?


>I just tried that and it is still returning 0. Any other thoughts?
>
>Thanks!!
>
>>The last (3) parametr must be set to 2, if You set this parametr to 0 You always go to the begin file !!!.
>>
>> parameter 0 - go to begin
>> 1 - current file pointer position
>> 2 - go end file
>>
>> wrong !!!! gnPosition = FSEEK(gnFileHandle, 0) // nothing do
>> good gnPosition = FSEEK(gnFileHandle, 0, 2) // end of file
>>
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform