Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set file readonly
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Set file readonly
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01656088
Message ID:
01656088
Vues:
57
I want to set a file from read-write to read-only and copy the following code (from Google) to my program, but failed. Anyone can point out what is wrong?

TIA
Ben

*--------------------------------------------
FUNC changeattr
DECLARE INTEGER SetFileAttributes IN kernel32 STRING @,INTEGER @
PRIVATE cFn
cFilename="e:\testingfa\testfile.txt"
#DEFINE FILE_ATTRIBUTE_READONLY 0x1
m=SetFileAttributes(@cFilename,FILE_ATTRIBUTE_READONLY)
RETURN m
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform