Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FOPEN does not recognise file opened with other applicat
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00938799
Message ID:
00938907
Vues:
22
Ravi, You can use low level functions from VC++ Runtime
DECLARE LONG  fopen IN msvcrt20.dll AS _fopen STRING @, STRING @
DECLARE LONG  fclose IN msvcrt20.dll AS _fclose LONG
DECLARE LONG  fprintf IN msvcrt20.dll AS _fprintf LONG, STRING, STRING
DECLARE LONG  fwrite IN msvcrt20.dll AS _fwrite STRING @, INTEGER, INTEGER,  LONG
DECLARE LONG  _open IN msvcrt20.dll STRING @, INTEGER, INTEGER
DECLARE LONG  _close IN msvcrt20.dll LONG

liFile = _fopen( m.lcFile, ("at") ) &&  Add text to end file
IF m.liFile>0
   _fprintf(m.liFile, "%s", m.lcText)
   _fclose(m.liFile )
ENDIF
MartinJ


>Thanks to everyone for the useful suggestions, particularly that Notepad does not keep the file open. On further testing, I found that FOPEN() with read-write option can be used to confirm if the file is not open elsewhere. I am sure that I will be able to use the suggestions to solve the problem.
>
>- Ravi
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform