Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programatically altering file properties
Message
De
03/12/2001 07:27:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
03/12/2001 07:12:38
Philip Jones
Cornwall County Council
Truro, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00588637
Message ID:
00588640
Vues:
16
>I'd like to be able to alter the properties of a free table I'm creating programatically. I want to hide it and make it read only. I also want to be able to change the read only attribute when I want to append records to it and them change it back again after appending. Can anyone suggest a way of simple doing this please.
lparameters tcFileName, tlReadOnly, tlHidden, tlSystem

#define BIT_READONLY  0
#define BIT_HIDDEN 1
#define BIT_SYSTEM 2

declare integer SetFileAttributes in Win32API ;
	string @ lpFileName,  integer dwFileAttributes
declare integer GetFileAttributes in Win32API ;
  string @ lpFileName
if tlReadOnly
 SetFileAttributes(@tcFilename, bitset(GetFileAttributes(@tcFilename),BIT_READONLY))
else
 SetFileAttributes(@tcFilename, bitclear(GetFileAttributes(@tcFilename),BIT_READONLY))
endif
if tlHidden
 SetFileAttributes(@tcFilename, bitset(GetFileAttributes(@tcFilename),BIT_HIDDEN))
else
 SetFileAttributes(@tcFilename, bitclear(GetFileAttributes(@tcFilename),BIT_HIDDEN))
endif
if tlSystem
 SetFileAttributes(@tcFilename, bitset(GetFileAttributes(@tcFilename),BIT_SYSTEM))
else
 SetFileAttributes(@tcFilename, bitclear(GetFileAttributes(@tcFilename),BIT_SYSTEM))
endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform