
While working with the WCX interface I came across the file attributes that can be set in ReadHeader(Ex) functions. I wanted to use them and was stumped when I realized that there are no constants defined for them!
I strongly recommend to add some constants for these to the WCX interface definition because using magic numbers instead of properly named constants is bad (and not recommended). This is what I've added to my definition:
Code: Select all
const
PK_ATTR_READONLY = $1;
PK_ATTR_HIDDEN = $2;
PK_ATTR_SYSTEM = $4;
PK_ATTR_VOLID = $8;
PK_ATTR_DIRECTORY = $10;
PK_ATTR_ARCHIVE = $20;
PK_ATTR_ANYFILE = $3F;
Code: Select all
#define PK_ATTR_READONLY 0x1
#define PK_ATTR_HIDDEN 0x2
#define PK_ATTR_SYSTEM 0x4
#define PK_ATTR_VOLID 0x8
#define PK_ATTR_DIRECTORY 0x10
#define PK_ATTR_ARCHIVE 0x20
#define PK_ATTR_ANYFILE 0x3F
Regards
Dalai