Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code Comparison in VFP6 & VFP9
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01150666
Message ID:
01150671
Vues:
36
Full example:
&& To make exe readonly attribute
LCFILE=curdir()+"ACCOUNTS.EXE"
#DEFINE FILE_ATTRIBUTE_READONLY 0x01
#DEFINE FILE_ATTRIBUTE_HIDDEN0x02
#DEFINE FILE_ATTRIBUTE_SYSTEM0x04
#DEFINE FILE_ATTRIBUTE_DIRECTORY0x10
#DEFINE FILE_ATTRIBUTE_ARCHIVE0x20
#DEFINE FILE_ATTRIBUTE_NORMAL0x80
#DEFINE FILE_ATTRIBUTE_TEMPORARY0x0100
DECLARE INTEGER GetLastError IN kernel32 
DECLARE LONG SetFileAttributes IN WIN32API STRING FileName, LONG FileAttributes
DECLARE LONG GetFileAttributes IN WIN32API STRING FileName
lnFileAttributes = GetFileAttributes (LCFILE)
IF SetFileAttributes (LCFILE, BITOR(lnFileAttributes,FILE_ATTRIBUTE_READONLY)) = 0
   ?GetLastError() && what is value?
   * Error setting attributes
   RETURN .F.
ENDIF
IF lnFileAttributes = -1
   ?GetLastError() && what is value?
   RETURN .F.
ENDIF
"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