Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
0x0000000000001
Message
From
20/11/2006 10:19:40
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
0x0000000000001
Environment versions
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01171178
Message ID:
01171178
Views:
70
? 0x00000001
? 0x00001
? 0x01
? 0x1
All are 1. However, in the next piece of code the declaration is 0x00000001. Can anyone tell me why? Will 0x1 not do the job?
#define FILE_ATTRIBUTE_READONLY    0x00000001  
#define FILE_ATTRIBUTE_HIDDEN      0x00000002  
#define FILE_ATTRIBUTE_SYSTEM      0x00000004  

local lnNewAttr
lnNewAttr = iif(tlReadonly,FILE_ATTRIBUTE_READONLY,0)+;
	  iif(tlHidden,FILE_ATTRIBUTE_HIDDEN,0)+;
	  iif(tlSystem,FILE_ATTRIBUTE_SYSTEM,0)

declare integer SetFileAttributes in Win32API ;
	string @ lpFileName,  integer dwFileAttributes
declare integer GetFileAttributes in Win32API ;
  string @ lpFileName

return ( SetFileAttributes(@tcFilename, ;
	bitor(bitand(GetFileAttributes(@tcFilename),0xFFFFFFF8),;
        lnNewAttr)) = 1)
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Next
Reply
Map
View

Click here to load this message in the networking platform